Johannes Thumshirn f1f1fadaca scsi: sd: don't crash the host on invalid commands
When sd_init_command() get's a command with a unknown req_op() it crashes the
system via BUG().

This makes debugging the actual reason for the broken request cmd_flags pretty
hard as the system is down before it's able to write out debugging data on the
serial console or the trace buffer.

Change the BUG() to a WARN_ON() and return BLKPREP_KILL to fail gracefully and
return an I/O error to the producer of the request.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-09-21 12:42:57 -04:00
..
2018-06-14 16:35:32 +09:00
2018-06-19 22:02:25 -04:00
2018-07-10 22:42:47 -04:00
2018-06-12 16:19:22 -07:00
2018-08-15 22:06:26 -07:00
2018-06-12 16:19:22 -07:00
2018-08-15 22:06:26 -07:00
2018-08-15 22:06:26 -07:00
2018-08-15 22:06:26 -07:00
2018-08-21 23:54:17 -04:00
2018-06-12 16:19:22 -07:00
2018-09-20 21:58:42 -04:00
2017-12-04 20:32:53 -05:00
2018-06-19 22:02:25 -04:00
2018-06-19 22:02:25 -04:00
2018-06-19 22:02:25 -04:00
2018-06-12 16:19:22 -07:00
2018-05-18 12:03:51 -04:00
2018-06-19 22:02:25 -04:00
2018-06-19 22:02:25 -04:00
2017-08-25 17:21:10 -04:00
2018-08-15 22:06:26 -07:00
2018-08-15 22:06:26 -07:00
2018-06-10 13:01:12 -07:00
2017-11-14 16:23:44 -08:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-08-15 22:06:26 -07:00
2018-08-15 22:06:26 -07:00
2017-11-14 16:23:44 -08:00
2017-04-13 13:58:20 -04:00
2018-08-15 22:06:26 -07:00
2018-06-10 13:01:12 -07:00
2018-06-04 07:58:06 -07:00
2018-06-19 22:02:25 -04:00
2018-08-15 22:06:26 -07:00
2018-06-12 16:19:22 -07:00
2018-08-15 22:06:26 -07:00
2017-04-26 18:32:29 -04:00
2018-05-01 23:30:12 -04:00