Re: [PATCH 1/2] of: address: Fix empty resource handling in __of_address_resource_bounds()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 20 Jan 2025 15:09:40 +0100, Thomas Weißschuh wrote:
> "resource->end" needs to always be equal to "resource->start + size - 1".
> The previous version of the function did not perform the "- 1" in case
> of an empty resource.
> 
> Also make sure to allow an empty resource at address 0.
> 
> Reported-by: Basharath Hussain Khaja <basharath@xxxxxxxxxxx>
> Closes: https://lore.kernel.org/lkml/20250108140414.13530-1-basharath@xxxxxxxxxxx/
> Fixes: 1a52a094c2f0 ("of: address: Unify resource bounds overflow checking")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
> ---
>  drivers/of/address.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 

Applied, thanks!

Please resend the kunit test with 0-day issues fixed.

Rob




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux