Re: kernel panic in sg_complete

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

 



On Sun, 21 Jul 2013, Greg Kroah-Hartman wrote:

> On Mon, Jul 22, 2013 at 01:00:41AM +0200, Marcin Ślusarz wrote:
> > If you want me to test some patches, just shout ;)
> 
> Interesting patch, it makes sense to have this applied.  Can you resend
> it with a "Signed-off-by:" line so that I can add it to the tree?

Wait a minute.  The patch catches cases where io->dev is NULL in
sg_complete().  But how does that happen?

The only place io->dev gets set to NULL is in sg_clean(), and 
sg_clean() gets called in only two places:

	if an URB could not be allocated in usb_sg_init(),

	or after all the URBs have completed in usb_sg_wait().

In either case, no more URBs will complete after sg_clean() is called, 
so sg_complete() won't run.

A patch like this merely covers up the symptom without fixing the 
underlying cause.  How did this manage to go wrong in the first place?  
There must be a bug in the logic of sg_complete() or usb_sg_wait().  
_That_ logic bug is what needs to be fixed.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux