diff options
author | Bart Van Assche <bvanassche@acm.org> | 2019-08-01 15:38:14 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-07 21:01:01 +0200 |
commit | 764029c0aaa6c84fb2420cefb15eed7845b411fa (patch) | |
tree | 50a29272c18f6209c2cd51f96c9f5879aa5d10aa /include/scsi | |
parent | e0fe918193a2f230b3295275fbd9ab21b2e84759 (diff) | |
download | linux-stable-764029c0aaa6c84fb2420cefb15eed7845b411fa.tar.gz linux-stable-764029c0aaa6c84fb2420cefb15eed7845b411fa.tar.bz2 linux-stable-764029c0aaa6c84fb2420cefb15eed7845b411fa.zip |
scsi: core: Reduce memory required for SCSI logging
[ Upstream commit dccc96abfb21dc19d69e707c38c8ba439bba7160 ]
The data structure used for log messages is so large that it can cause a
boot failure. Since allocations from that data structure can fail anyway,
use kmalloc() / kfree() instead of that data structure.
See also https://bugzilla.kernel.org/show_bug.cgi?id=204119.
See also commit ded85c193a39 ("scsi: Implement per-cpu logging buffer") # v4.0.
Reported-by: Jan Palus <jpalus@fastmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Jan Palus <jpalus@fastmail.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_dbg.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/scsi/scsi_dbg.h b/include/scsi/scsi_dbg.h index f8170e90b49d..bbe71a6361db 100644 --- a/include/scsi/scsi_dbg.h +++ b/include/scsi/scsi_dbg.h @@ -5,8 +5,6 @@ struct scsi_cmnd; struct scsi_device; struct scsi_sense_hdr; -#define SCSI_LOG_BUFSIZE 128 - extern void scsi_print_command(struct scsi_cmnd *); extern size_t __scsi_format_command(char *, size_t, const unsigned char *, size_t); |