mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stoyan Gaydarov <stoyboyker@gmail.com>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, osst@riede.org
Subject: Re: [PATCH 06/13] [scsi] changed ioctls to unlocked
Date: Tue, 24 Mar 2009 16:28:57 -0500	[thread overview]
Message-ID: <6d291e080903241428n325d7805v6a61653d8d6516ba@mail.gmail.com> (raw)
In-Reply-To: <1237929888.3308.31.camel@localhost.localdomain>

On Tue, Mar 24, 2009 at 4:24 PM, James Bottomley
<James.Bottomley@hansenpartnership.com> wrote:
> On Tue, 2009-03-24 at 16:12 -0500, stoyboyker@gmail.com wrote:
>> From: Stoyan Gaydarov <stoyboyker@gmail.com>
>>
>> Signed-off-by: Stoyan Gaydarov <stoyboyker@gmail.com>
>> ---
>>  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

  reply	other threads:[~2009-03-24 21:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-24 21:12 stoyboyker
2009-03-24 21:24 ` James Bottomley
2009-03-24 21:28   ` Stoyan Gaydarov [this message]
2009-03-25  4:21 ` Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6d291e080903241428n325d7805v6a61653d8d6516ba@mail.gmail.com \
    --to=stoyboyker@gmail.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=osst@riede.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®