diff options
| author | Nicholas Bellinger <nab@linux-iscsi.org> | 2016-11-03 23:06:53 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-07-04 11:51:15 +0200 |
| commit | 8ca84f8b6b7f65424f61fa6a72d91dcbd260dfbf (patch) | |
| tree | 47ce5a71c6c9a7bfcb73c3d9bca2a2c668082c83 /scripts | |
| parent | ad20e0987983ff6f8f71d4518954b5ea403d66f4 (diff) | |
target/pscsi: Fix TYPE_TAPE + TYPE_MEDIMUM_CHANGER export
commit a04e54f2c35823ca32d56afcd5cea5b783e2f51a upstream.
The following fixes a divide by zero OOPs with TYPE_TAPE
due to pscsi_tape_read_blocksize() failing causing a zero
sd->sector_size being propigated up via dev_attrib.hw_block_size.
It also fixes another long-standing bug where TYPE_TAPE and
TYPE_MEDIMUM_CHANGER where using pscsi_create_type_other(),
which does not call scsi_device_get() to take the device
reference. Instead, rename pscsi_create_type_rom() to
pscsi_create_type_nondisk() and use it for all cases.
Finally, also drop a dump_stack() in pscsi_get_blocks() for
non TYPE_DISK, which in modern target-core can get invoked
via target_sense_desc_format() during CHECK_CONDITION.
[js] cast max_sectors to unsigned to avoid warnings
Reported-by: Malcolm Haak <insanemal@gmail.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
