Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
"Two small fixes to the mpi3mr driver. One to avoid oversize
allocations in tracing and the other to fix an uninitialized spinlock
in the user to driver feature request code (used to trigger dumps and
the like)"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: mpi3mr: Avoid MAX_PAGE_ORDER WARNING for buffer allocations
scsi: mpi3mr: Add missing spin_lock_init() for mrioc->trigger_lock

+9 -3
+8 -3
drivers/scsi/mpi3mr/mpi3mr_app.c
··· 100 100 dprint_init(mrioc, 101 101 "trying to allocate trace diag buffer of size = %dKB\n", 102 102 trace_size / 1024); 103 - if (mpi3mr_alloc_trace_buffer(mrioc, trace_size)) { 103 + if (get_order(trace_size) > MAX_PAGE_ORDER || 104 + mpi3mr_alloc_trace_buffer(mrioc, trace_size)) { 104 105 retry = true; 105 106 trace_size -= trace_dec_size; 106 107 dprint_init(mrioc, "trace diag buffer allocation failed\n" ··· 119 118 diag_buffer->type = MPI3_DIAG_BUFFER_TYPE_FW; 120 119 diag_buffer->status = MPI3MR_HDB_BUFSTATUS_NOT_ALLOCATED; 121 120 if ((mrioc->facts.diag_fw_sz < fw_size) && (fw_size >= fw_min_size)) { 122 - diag_buffer->addr = dma_alloc_coherent(&mrioc->pdev->dev, 123 - fw_size, &diag_buffer->dma_addr, GFP_KERNEL); 121 + if (get_order(fw_size) <= MAX_PAGE_ORDER) { 122 + diag_buffer->addr 123 + = dma_alloc_coherent(&mrioc->pdev->dev, fw_size, 124 + &diag_buffer->dma_addr, 125 + GFP_KERNEL); 126 + } 124 127 if (!retry) 125 128 dprint_init(mrioc, 126 129 "%s:trying to allocate firmware diag buffer of size = %dKB\n",
+1
drivers/scsi/mpi3mr/mpi3mr_os.c
··· 5234 5234 spin_lock_init(&mrioc->watchdog_lock); 5235 5235 spin_lock_init(&mrioc->chain_buf_lock); 5236 5236 spin_lock_init(&mrioc->sas_node_lock); 5237 + spin_lock_init(&mrioc->trigger_lock); 5237 5238 5238 5239 INIT_LIST_HEAD(&mrioc->fwevt_list); 5239 5240 INIT_LIST_HEAD(&mrioc->tgtdev_list);