On Wed, Apr 21, 2021 at 02:33:46PM +0200, Martin Wilck wrote: > On Wed, 2021-04-21 at 18:40 +0800, Ming Lei wrote: > > On Wed, Apr 21, 2021 at 12:19:00PM +0200, Martin Wilck wrote: > > > On Wed, 2021-04-21 at 15:55 +0800, Ming Lei wrote: > > > > Hello Guys, > > > > > > > > fnic uses the following way to walk scsi commands in failure > > > > handling, > > > > which is obvious wrong, because caller of scsi_host_find_tag has > > > > to > > > > guarantee that the tag is active. > > > > > > > > for (tag = 0; tag < fnic->fnic_max_tag_id; tag++) { > > > > ... > > > > sc = scsi_host_find_tag(fnic->lport->host, tag); > > > > ... > > > > } > > > > > > > > Fix the issue by using blk_mq_tagset_busy_iter() to walk > > > > request/scsi_command. > > > > > > How does this relate to Hannes' previous patch? > > > https://marc.info/?l=linux-scsi&m=161400059528859&w=2 > > > > oops, this patch is actually same or similar with Hannes's. > > > > Given these patches are bug fix, can we cherry-pick them for 5.13? > > No objections in principle, but the differences between your patch and > Hannes' are pretty large. I couldn't tell which one is more > appropriate. > > Question: Both your patch set and Hannes' patch replace a couple of > scsi_host_find_tag() calls in the fnic driver, while leaving some > others in place. It's not clear to me why we can be sure that no > corruption occurs in any of the latter. Could you explain? Caller of scsi_host_find_tag() has to guarantee that the passed tag is active. The changed functions do pass invalid tag to scsi_host_find_tag(), so we need to fix them. Thanks, Ming