All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Brian King <brking@us.ibm.com>,
	dougg@torque.net, James.Bottomley@steeleye.com,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] sg_cmd_done - another oops
Date: Sun, 6 Jun 2004 10:49:28 +0200	[thread overview]
Message-ID: <20040606084925.GA2733@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.44.0406051448470.1429-100000@poirot.grange>

On Sat, Jun 05 2004, Guennadi Liakhovetski wrote:
> On Fri, 4 Jun 2004, Brian King wrote:
> 
> > static int
> >+sg_srp_done(Sg_request *srp, Sg_fd *sfp)
> >+{
> >+       unsigned long iflags;
> >+       int done;
> >+
> >+       read_lock_irqsave(&sfp->rq_list_lock, iflags);
> >+       done = srp->done;
> >+       read_unlock_irqrestore(&sfp->rq_list_lock, iflags);
> >+       return done;
> >+}
> 
> Hm, maybe I don't understand something - why do you have to close local
> interrupts here
> 
> >@@ -772,7 +784,9 @@ sg_ioctl(struct inode *inode, struct fil
> >                                srp->orphan = 1;
> >                                return result;  /* -ERESTARTSYS because signal
> >hit process */
> >                        }
> >+                       write_lock_irqsave(&sfp->rq_list_lock, iflags);
> >                        srp->done = 2;
> >+                       write_unlock_irqrestore(&sfp->rq_list_lock, iflags);
> 
> and here? Wouldn't a read/write_lock() suffice?

interrupt -> sg_cmd_done -> sg_finish_rem_req -> write_lock on
rq_list_lock.

-- 
Jens Axboe


  reply	other threads:[~2004-06-06  8:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-04 15:34 [PATCH] sg_cmd_done - another oops Brian King
2004-06-05 12:57 ` Guennadi Liakhovetski
2004-06-06  8:49   ` Jens Axboe [this message]
2004-06-06 14:32     ` Guennadi Liakhovetski
2004-06-07  2:57 ` Douglas Gilbert
2004-06-09 14:44   ` Brian King
2004-08-31 20:16   ` Brian King

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=20040606084925.GA2733@suse.de \
    --to=axboe@suse.de \
    --cc=James.Bottomley@steeleye.com \
    --cc=brking@us.ibm.com \
    --cc=dougg@torque.net \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-scsi@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.