lkml.org 
[lkml]   [2021]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] scsi: libsas: use _safe() loop in sas_resume_port()
From
Date
On 19/05/2021 15:20, Dan Carpenter wrote:
> If sas_notify_lldd_dev_found() fails then this code calls:
>
> sas_unregister_dev(port, dev);
>
> which removes "dev", our list iterator, from the list. This could
> lead to an endless loop. We need to use list_for_each_entry_safe().
>
> Fixes: 303694eeee5e ("[SCSI] libsas: suspend / resume support")
> Signed-off-by: Dan Carpenter<dan.carpenter@oracle.com>

Reviewed-by: John Garry <john.garry@huawei.com>

\
 
 \ /
  Last update: 2021-05-19 16:50    [W:0.094 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site