Re: [PATCH] target: Fix incorrect use of __transport_register_session

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

 



On 04/10/15 23:21, Nicholas A. Bellinger wrote:
On Fri, 2015-04-10 at 14:59 +0200, Bart Van Assche wrote:
__transport_register_session() must be called with se_tpg->session_lock
held. Fix the call sites where this lock is not held.

Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx>
Cc: Christoph Hellwig <hch@xxxxxx>
Cc: <qla2xxx-upstream@xxxxxxxxxx>
Cc: Felipe Balbi <balbi@xxxxxx>
Cc: Michael S. Tsirkin <mst@xxxxxxxxxx>
Cc: Juergen Gross <jgross@xxxxxxxx>
---
  drivers/scsi/qla2xxx/tcm_qla2xxx.c         | 6 ++----
  drivers/target/loopback/tcm_loop.c         | 7 ++-----
  drivers/usb/gadget/legacy/tcm_usb_gadget.c | 5 ++---
  drivers/vhost/scsi.c                       | 5 ++---
  drivers/xen/xen-scsiback.c                 | 7 ++-----
  5 files changed, 10 insertions(+), 20 deletions(-)

This series was broken out and merged in v4.0-rc5 code.

The qla2xxx one has already been pushed to stable, and you've been CC'ed
on a dozen emails for it.

The other fabrics only ever use a single session per endpoint, so they
can't run into problems here.

Hello Nic,

The only reason why the qla2xxx changes were present in my patch is because I had started from your for-next branch and because the qla2xxx changes are not yet present in your for-next branch. But you are right, it would have been better if I would have left out these changes from my patch.

Even though the other target drivers only use a single session per endpoint, what these other target drivers do conflicts with the comment above __transport_register_session():

/*
 * Called with spin_lock_irqsave(&struct se_portal_group->session_lock
 * called.
 */

I'm afraid that kernel developers who have not followed this discussion, who notice the __transport_register_session() calls and who see the above comment will get confused. Is it OK for you if I send a second version of my patch that clears up this confusion ?

Thanks,

Bart.

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux