Re: [PATCH 2/2] cciss: Fix SCSI device reset handler

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

 



On Tue, 2 Jun 2009 14:50:11 +0200
Jens Axboe <jens.axboe@xxxxxxxxxx> wrote:

> On Fri, May 29 2009, Andrew Morton wrote:
> > On Wed, 27 May 2009 15:30:07 -0500
> > scameron@xxxxxxxxxxxxxxxxxxxxxxx wrote:
> > 
> > > +static int wait_for_device_to_become_ready(ctlr_info_t *h,
> > > +	unsigned char lunaddr[])
> > > +{
> > > +	int rc;
> > > +	int count = 0;
> > > +	int waittime = HZ;
> > > +	CommandList_struct *c;
> > > +
> > > +	c = cmd_alloc(h, 1);
> > > +	if (!c) {
> > > +		printk(KERN_WARNING "cciss%d: out of memory in "
> > > +			"wait_for_device_to_become_ready.\n", h->ctlr);
> > > +		return IO_ERROR;
> > > +	}
> > > +
> > > +	/* Send test unit ready until device ready, or give up. */
> > > +	while (count < 20) {
> > > +
> > > +		/* Wait for a bit.  do this first, because if we send
> > > +		 * the TUR right away, the reset will just abort it.
> > > +		 */
> > > +		set_current_state(TASK_INTERRUPTIBLE);
> > > +		schedule_timeout(waittime);
> > 
> > That's schedule_timeout_interruptible().
> > 
> > The problem with interruptible sleeps of this nature is that they are
> > no-ops if the calling process happens to have signal_pending().  I
> > suspect that this condition will break your driver.
> > 
> > If so, switching to schedule_timeout_uninterruptible() will unbreak it.
> 
> I added Stephens patch and your fixup.

My cciss-fix-scsi-device-reset-handler-fix.patch was a simple cleanup -
it uses schedule_timeout_interruptible().

I believe that this should be changed to
schedule_timeout_uninterruptible() for the above reasons, but the cciss
guys fell asleep on me.

--
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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux