Re: [PATCH v2] staging: vchiq: Fix list_for_each exit tests

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

 



On Tue, 2020-10-06 at 16:47 +0300, Dan Carpenter wrote:
> After a list_for_each_entry() loop, the list iterator is always non-NULL
> so these conditions don't work.  If the "waiter" is not found then this
> results in an out of bounds access.
> 
> I have fixed it by introducing a new "found" variable.  In one case, I
> used an else statement for readability.
> 
> Fixes: 46e4b9ec4fa4 ("staging: vchiq_arm: use list_for_each_entry when accessing bulk_waiter_list")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> ---

Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@xxxxxxx>

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux