]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: core: Reduce memory required for SCSI logging
authorBart Van Assche <bvanassche@acm.org>
Thu, 1 Aug 2019 22:38:14 +0000 (15:38 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 8 Aug 2019 01:47:29 +0000 (21:47 -0400)
commitc8e60123bb130951d032dab534df9f020f0982c9
tree39784bbebbcf8cb2f5ad45de1f331790640117dc
parentd6721a098a627b47606b8f90a78f100a99aa0322
scsi: core: Reduce memory required for SCSI logging

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 859abe302a04 ("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>
drivers/scsi/scsi_logging.c
include/scsi/scsi_dbg.h