Re: [PATCH 2/4] scsi: Fix device removal NULL pointer dereference

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

 



Hey, James.

On Mon, Jun 25, 2012 at 10:14:49PM +0100, James Bottomley wrote:
> > @@ -1490,11 +1489,7 @@ static void scsi_request_fn(struct request_queue *q)
> >  	struct scsi_cmnd *cmd;
> >  	struct request *req;
> >  
> > -	if (!sdev) {
> > -		while ((req = blk_peek_request(q)) != NULL)
> > -			scsi_kill_request(req, q);
> > -		return;
> > -	}
> 
> That means that this hunk of code has to stay, but needs to be gated on
> blk_queue_dead(q); there's still a race where this can occur.

Wouldn't the scsi_device_online() check down below be enough?  Block
layer drain is gonna loop until all requests are done, so the looping
is handled from block layer.

Thanks.

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