[SCSI] Revert "sg: no need sg_open_exclusive_lock"
authorJames Bottomley <JBottomley@Parallels.com>
Fri, 25 Oct 2013 09:26:38 +0000 (10:26 +0100)
committerJames Bottomley <JBottomley@Parallels.com>
Fri, 25 Oct 2013 09:59:32 +0000 (10:59 +0100)
commit98481ff0bb8792ebfb832e330e56d3c629ba5fa6
treeaa1b08cd6848d0ab8e1110480ef701eb0e2a3ce1
parentbafc8ad82d482f9ecb9111969a3fdcef366bf8cb
[SCSI] Revert "sg: no need sg_open_exclusive_lock"

This reverts commit 00b2d9d6d05b56fc1d77071ff8ccbd2c65b48dec.

This is one of four patches that was causing this bug

[  205.372823] ================================================
[  205.372901] [ BUG: lock held when returning to user space! ]
[  205.372979] 3.12.0-rc6-hw-debug-pagealloc+ #67 Not tainted
[  205.373055] ------------------------------------------------
[  205.373132] megarc.bin/5283 is leaving the kernel with locks still held!
[  205.373212] 1 lock held by megarc.bin/5283:
[  205.373285]  #0:  (&sdp->o_sem){.+.+..}, at: [<ffffffff8161e650>] sg_open+0x3a0/0x4d0

Cc: Vaughan Cao <vaughan.cao@oracle.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/sg.c