aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pmcraid.c
diff options
context:
space:
mode:
authorMing Lei <[email protected]>2019-06-06 08:34:08 +0000
committerMartin K. Petersen <[email protected]>2019-06-20 19:21:33 +0000
commitb79d9a09ae23c7047bdce3a15e284398334198ea (patch)
treeb2cdeab4564fdd2bc3706eb1aa0864e3e4ec1e6f /drivers/scsi/pmcraid.c
parentscsi: core: avoid preallocating big SGL for data (diff)
downloadkernel-b79d9a09ae23c7047bdce3a15e284398334198ea.tar.gz
kernel-b79d9a09ae23c7047bdce3a15e284398334198ea.zip
scsi: lib/sg_pool.c: clear 'first_chunk' in case of no preallocation
If user doesn't ask to preallocate by passing zero 'nents_first_chunk' to sg_alloc_table_chained, we need to make sure that 'first_chunk' is cleared. Otherwise, __sg_alloc_table() still may think that the 1st SGL should be from the preallocation. Fixes the issue by clearing 'first_chunk' in sg_alloc_table_chained() if 'nents_first_chunk' is zero. Cc: Christoph Hellwig <[email protected]> Cc: Bart Van Assche <[email protected]> Cc: Ewan D. Milne <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: Guenter Roeck <[email protected]> Reported-by: Guenter Roeck <[email protected]> Tested-by: Guenter Roeck <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'drivers/scsi/pmcraid.c')
0 files changed, 0 insertions, 0 deletions