On Wed, 23 Mar 2011, James Bottomley wrote: > > > Without this fix, some USB mass-storage devices crash when > > > they > > > receive a MODE SENSE command with page code 0x3F asking for > > > only 4 > > > bytes of data. > > > > > > Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> > > > Reported-and-tested-by: Richard Senior <richard@xxxxxxxxxxxxxxxxxxxx> > > > CC: Luben Tuikov <ltuikov@xxxxxxxxx> > > > CC: <stable@xxxxxxxxxx> > > > > Acked-by: Luben Tuikov <ltuikov@xxxxxxxxx> > > I put the original patch in on the understanding from both of you that > the chances of finding a USB device which crashed with the change was > very small. I should have checked the patch against the context of the existing code more carefully. :-( > Given that several have been found and we're on the eve of the merge > window closure, I'll just revert the original, and you two can work on > getting a bullet proof version for the next merge window. Reverting the original patch for now is fine with me. As for the next merge window, let me submit a more bullet-proof version of the second patch. It's possible that some wierd USB device will report that more than 192 bytes of mode-sense data is available and then fail when the host asks for the reported amount. You'd think no device could be that stupid, but I have seen an example of a device doing exactly this (except that it was for INQUIRY data rather than MODE SENSE data -- which is perhaps even worse!). Alan Stern -- 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