mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
Devicetree fixes for v6.17, part 1:
- 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. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEktVUI4SxYhzZyEuo+vtdtY28YcMFAmisyBAACgkQ+vtdtY28 YcObaw/+JazBJy6SKKZPE0X3Ry69DtOVOgTKFwMAekWwasFGdgzth47Wore9EqmA smqwDGMB20NCUzbXCx7NIzzjp5enH9OQOcSyXN/xHRE6khg4t3Qq0iYfevfwXRtv Y9eTYIGoUvdVcxObpbbRGPq9AszUlwQBCpQcTJKl2MiHGqa3IpBrr0ypMjxXtstY Om7q51iKSi5yIYO2lxPgXRI6PtT2q8MisoyNHnGocsY3xnNBQb1RDBJe70R3XXZP 78piVoumBb/3jnH1qsCFLGi6RSR/chjb8JwAJ4SuGpCVzWhmysLQJP72SggTIptq Z5igbf7bQ5FhWab+XhMGg9OsaXEnZ58Qvg1KAswwU3/k3MN8w5V4qLLOPTFI3m8w K7etUL91lw6q5EguzZ5VveV9qPagu8waTPP56JfA597IR6VdT9omT1XAPbeM2nrz 0k7qnX/9Pb3M400Z6jNu1Fk++c4xzC0+w8T2acE3BGVwnGzCf9tdDd8ixlCDDWPx HsQxbnFjxggRBqulrR4IElCSEYcbwHgLh4WWNJVmDsJFBvZUQ0mscgDT9/bkELu1 IHvvwoeY1saa+oI3PkhVvhE+yA9wmMrTrb61/hIFliU3sDJfn/notNWdOy5Rbtci e+5ec6LFZnW6Ig8XG9o3FYFdv5rcHk8ExdqIiQosYgNirRdLVgM= =0m5V -----END PGP SIGNATURE----- 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:
commit
fab1beda75
@ -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,12 +935,17 @@ 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;
|
||||
}
|
||||
|
||||
new_pp->next = np->deadprops;
|
||||
np->deadprops = new_pp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* of_changeset_add_prop_string - Add a string property to a changeset
|
||||
*
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user