Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+12 -4
+2
Documentation/devicetree/bindings/vendor-prefixes.yaml
··· 507 507 description: Espressif Systems Co. Ltd. 508 508 "^est,.*": 509 509 description: ESTeem Wireless Modems 510 + "^eswin,.*": 511 + description: Beijing ESWIN Technology Group Co. Ltd. 510 512 "^ettus,.*": 511 513 description: NI Ettus Research 512 514 "^eukrea,.*":
+2 -2
drivers/of/device.c
··· 17 17 18 18 /** 19 19 * of_match_device - Tell if a struct device matches an of_device_id list 20 - * @matches: array of of device match structures to search in 21 - * @dev: the of device structure to match against 20 + * @matches: array of of_device_id match structures to search in 21 + * @dev: the OF device structure to match against 22 22 * 23 23 * Used by a driver to check whether an platform_device present in the 24 24 * system is in its list of supported devices.
+7 -2
drivers/of/dynamic.c
··· 935 935 return -ENOMEM; 936 936 937 937 ret = of_changeset_add_property(ocs, np, new_pp); 938 - if (ret) 938 + if (ret) { 939 939 __of_prop_free(new_pp); 940 + return ret; 941 + } 940 942 941 - return ret; 943 + new_pp->next = np->deadprops; 944 + np->deadprops = new_pp; 945 + 946 + return 0; 942 947 } 943 948 944 949 /**
+1
drivers/of/of_reserved_mem.c
··· 771 771 return -EINVAL; 772 772 773 773 resource_set_range(res, rmem->base, rmem->size); 774 + res->flags = IORESOURCE_MEM; 774 775 res->name = rmem->name; 775 776 return 0; 776 777 }