[Bug 200565] New: Wrong return error code when dma_mapping_error() fails in drivers/infiniband/hw/qib/qib_sdma.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=200565

            Bug ID: 200565
           Summary: Wrong return error code when dma_mapping_error() fails
                    in drivers/infiniband/hw/qib/qib_sdma.c
           Product: Drivers
           Version: 2.5
    Kernel Version: v4.18-rc4
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Infiniband/RDMA
          Assignee: drivers_infiniband-rdma@xxxxxxxxxxxxxxxxxxxx
          Reporter: jasonwood2031@xxxxxxxxx
        Regression: No

Function qib_sdma_verbs_send() defined in drivers/infiniband/hw/qib/qib_sdma.c
returns wrong error code when function dma_mapping_error() fails. Codes related
to this bug are shown as follows.

drivers/infiniband/hw/qib/qib_sdma.c:
  577           addr = dma_map_single(&ppd->dd->pcidev->dev, sge->vaddr,
  578                                 dw << 2, DMA_TO_DEVICE);
  579:          if (dma_mapping_error(&ppd->dd->pcidev->dev, addr))
  580                   goto unmap;
...
  634:  unmap:
...
  658:          goto unlock;
...
  693   unlock:
  694           spin_unlock_irqrestore(&ppd->sdma_lock, flags);
  695           return ret;     // leaving the ret unchanged as 0, should be
-ENOMEM

Thanks for attention!
JW, ZG
IMChecker Group, THU

-- 
You are receiving this mail because:
You are watching the assignee of the bug.--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux