Patch "RDMA/siw: Fix pointer-to-int-cast warning in siw_rx_pbl()" has been added to the 5.7-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    RDMA/siw: Fix pointer-to-int-cast warning in siw_rx_pbl()

to the 5.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rdma-siw-fix-pointer-to-int-cast-warning-in-siw_rx_p.patch
and it can be found in the queue-5.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 4b9f843c230303878b2c3600821e7b73606eba1c
Author: Tom Seewald <tseewald@xxxxxxxxx>
Date:   Wed Jun 10 12:47:17 2020 -0500

    RDMA/siw: Fix pointer-to-int-cast warning in siw_rx_pbl()
    
    [ Upstream commit 6769b275a313c76ddcd7d94c632032326db5f759 ]
    
    The variable buf_addr is type dma_addr_t, which may not be the same size
    as a pointer.  To ensure it is the correct size, cast to a uintptr_t.
    
    Fixes: c536277e0db1 ("RDMA/siw: Fix 64/32bit pointer inconsistency")
    Link: https://lore.kernel.org/r/20200610174717.15932-1-tseewald@xxxxxxxxx
    Signed-off-by: Tom Seewald <tseewald@xxxxxxxxx>
    Reviewed-by: Bernard Metzler <bmt@xxxxxxxxxxxxxx>
    Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/infiniband/sw/siw/siw_qp_rx.c b/drivers/infiniband/sw/siw/siw_qp_rx.c
index 650520244ed0c..7271d705f4b06 100644
--- a/drivers/infiniband/sw/siw/siw_qp_rx.c
+++ b/drivers/infiniband/sw/siw/siw_qp_rx.c
@@ -139,7 +139,8 @@ static int siw_rx_pbl(struct siw_rx_stream *srx, int *pbl_idx,
 			break;
 
 		bytes = min(bytes, len);
-		if (siw_rx_kva(srx, (void *)buf_addr, bytes) == bytes) {
+		if (siw_rx_kva(srx, (void *)(uintptr_t)buf_addr, bytes) ==
+		    bytes) {
 			copied += bytes;
 			offset += bytes;
 			len -= bytes;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux