On 05/23/2017 04:39 PM, Jens Axboe wrote: > I tried to look up that commit: > > 48ae8484e9fc ("scsi: sg: don't return bogus Sg_requests") > > but that isn't in Linus' tree. Even searched for just the title, still > didn't find anything. It's queued up in Martin's tree [1]. > > I'm assuming this is a bug in the sg.c driver, in which case the 2/3 > prep and real test case looks fine. For generic device testing, we > should just use SG_IO and not bother with sg.c at all. The world would > be a better place if we could just get rid of sg.c... Agreed. Yes the bug is in the sg.c driver and we did have quite some of these lately thanks to the syzcaller folks. My intention with these tests was to have a place where we can throw in the syzcaller reproducers and run it in nicely Qemu. [1] https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git/commit/?h=4.12/scsi-fixes&id=48ae8484e9fc324b4968d33c585e54bc98e44d61 -- Johannes Thumshirn Storage jthumshirn@xxxxxxx +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850