diff options
author | Laura Abbott <labbott@redhat.com> | 2018-09-04 11:47:40 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-09-11 20:47:08 -0400 |
commit | 679fcae46c8b2352bba3485d521da070cfbe68e6 (patch) | |
tree | 7dd0d16bc5f68c5d459e39089d2dc81a678f2047 /drivers/scsi/qla2xxx/qla_target.h | |
parent | c77a2fa3ff8f73d1a485e67e6f81c64823739d59 (diff) | |
download | linux-679fcae46c8b2352bba3485d521da070cfbe68e6.tar.gz linux-679fcae46c8b2352bba3485d521da070cfbe68e6.tar.bz2 linux-679fcae46c8b2352bba3485d521da070cfbe68e6.zip |
scsi: iscsi: target: Don't use stack buffer for scatterlist
Fedora got a bug report of a crash with iSCSI:
kernel BUG at include/linux/scatterlist.h:143!
...
RIP: 0010:iscsit_do_crypto_hash_buf+0x154/0x180 [iscsi_target_mod]
...
Call Trace:
? iscsi_target_tx_thread+0x200/0x200 [iscsi_target_mod]
iscsit_get_rx_pdu+0x4cd/0xa90 [iscsi_target_mod]
? native_sched_clock+0x3e/0xa0
? iscsi_target_tx_thread+0x200/0x200 [iscsi_target_mod]
iscsi_target_rx_thread+0x81/0xf0 [iscsi_target_mod]
kthread+0x120/0x140
? kthread_create_worker_on_cpu+0x70/0x70
ret_from_fork+0x3a/0x50
This is a BUG_ON for using a stack buffer with a scatterlist. There
are two cases that trigger this bug. Switch to using a dynamically
allocated buffer for one case and do not assign a NULL buffer in
another case.
Signed-off-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_target.h')
0 files changed, 0 insertions, 0 deletions