mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 13:30:45 -05:00
Merge tag 'devicetree-fixes-for-6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull devicetree fixes from Rob Herring: - Fix a memory leak for of_pci_add_properties() failure case. Then fix the introduced UAF. - Add missing IORESOURCE_MEM flag on of_reserved_mem_region_to_resource() - Add already in use vendor prefix "eswin" - Clarify "of of" comment in of_match_device(). After many years of drive-by patches dropping the 2nd "of" (which referred to OpenFirmware), a correct patch finally arrived * tag 'devicetree-fixes-for-6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of: dynamic: Fix use after free in of_changeset_add_prop_helper() dt-bindings: vendor-prefixes: add eswin of: reserved_mem: Add missing IORESOURCE_MEM flag on resources of: dynamic: Fix memleak when of_pci_add_properties() failed of: Clarify OF device context in of_match_device() comment
This commit is contained in:
@@ -507,6 +507,8 @@ patternProperties:
|
||||
description: Espressif Systems Co. Ltd.
|
||||
"^est,.*":
|
||||
description: ESTeem Wireless Modems
|
||||
"^eswin,.*":
|
||||
description: Beijing ESWIN Technology Group Co. Ltd.
|
||||
"^ettus,.*":
|
||||
description: NI Ettus Research
|
||||
"^eukrea,.*":
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
/**
|
||||
* of_match_device - Tell if a struct device matches an of_device_id list
|
||||
* @matches: array of of device match structures to search in
|
||||
* @dev: the of device structure to match against
|
||||
* @matches: array of of_device_id match structures to search in
|
||||
* @dev: the OF device structure to match against
|
||||
*
|
||||
* Used by a driver to check whether an platform_device present in the
|
||||
* system is in its list of supported devices.
|
||||
|
||||
@@ -935,10 +935,15 @@ static int of_changeset_add_prop_helper(struct of_changeset *ocs,
|
||||
return -ENOMEM;
|
||||
|
||||
ret = of_changeset_add_property(ocs, np, new_pp);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
__of_prop_free(new_pp);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
new_pp->next = np->deadprops;
|
||||
np->deadprops = new_pp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -771,6 +771,7 @@ int of_reserved_mem_region_to_resource(const struct device_node *np,
|
||||
return -EINVAL;
|
||||
|
||||
resource_set_range(res, rmem->base, rmem->size);
|
||||
res->flags = IORESOURCE_MEM;
|
||||
res->name = rmem->name;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user