On Tue, Mar 24, 2009 at 4:24 PM, James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> wrote: > On Tue, 2009-03-24 at 16:12 -0500, stoyboyker@xxxxxxxxx wrote: >> From: Stoyan Gaydarov <stoyboyker@xxxxxxxxx> >> >> Signed-off-by: Stoyan Gaydarov <stoyboyker@xxxxxxxxx> >> --- >> drivers/scsi/osst.c | 12 ++++++++---- >> 1 files changed, 8 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c >> index 0ea78d9..80e7e98 100644 >> --- a/drivers/scsi/osst.c >> +++ b/drivers/scsi/osst.c >> @@ -4856,9 +4856,10 @@ static int os_scsi_tape_close(struct inode * inode, struct file * filp) >> >> >> /* The ioctl command */ >> -static int osst_ioctl(struct inode * inode,struct file * file, >> - unsigned int cmd_in, unsigned long arg) >> +static long osst_ioctl(struct file * file, unsigned int cmd_in, >> + unsigned long arg) >> { >> + lock_kernel(); > > What necessitates the kernel locking? When st was audited, it didn't > need it; since osst is in many ways a copy of st, I'm surprised it does. > > James The lock was there before, because it is used before calling osst_ioctl, my patches don't change any functionality. It is meant to show the maintainers of the code that the lock is there and to allow them make a decision as to how best to handle the code without the kernel locking. If it is not needed then the locks can be removed and the function call can remain under the unlocked_ioctl. -Stoyan > > > -- -Stoyan -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html