lkml.org 
[lkml]   [2020]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] scsi: Fix incorrect usage of shost_for_each_device
Date
On Mon, 18 May 2020 15:44:20 +0800, Ye Bin wrote:

> shost_for_each_device(sdev, shost) \
> for ((sdev) = __scsi_iterate_devices((shost), NULL); \
> (sdev); \
> (sdev) = __scsi_iterate_devices((shost), (sdev)))
>
> When terminating shost_for_each_device() iteration with break or return,
> scsi_device_put() should be used to prevent stale scsi device references from
> being left behind.

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: core: Fix incorrect usage of shost_for_each_device
https://git.kernel.org/mkp/scsi/c/4dea170f4fb2

--
Martin K. Petersen Oracle Linux Engineering

\
 
 \ /
  Last update: 2020-05-20 04:31    [W:0.048 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site