Cc: Alan Stern <stern@...>, Maciej Rutecki <maciej.rutecki@...>, Linux Kernel Mailing List <linux-kernel@...>, USB list <linux-usb@...>, USB Storage list <usb-storage@...>, SCSI development list <linux-scsi@...>
Umm. Maybe it SHOULD NOT HAVE BEEN!
The thing is, if we can get partial results back, we really *should*
either error out, or we should have at least cleared the buffer (either
beforehand or when seeing the partial result). Returning a buffer with the
old random contents is a bug.
And if clearing the buffer not only avoids any security holes and possible
undefined behavior, but _also_ ends up fixing the write protect sense
issue, all the better!
Linus
--