git: 288ad162e68c - stable/13 - qlnx: qlnxe: Fix kernel address leakage

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Sun, 29 Sep 2024 04:01:56 UTC
The branch stable/13 has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=288ad162e68cb239069b2886ee887e6ca0ac2b7a

commit 288ad162e68cb239069b2886ee887e6ca0ac2b7a
Author:     Fuqian Huang <huangfq.daxian@gmail.com>
AuthorDate: 2024-05-28 05:45:52 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2024-09-29 03:59:36 +0000

    qlnx: qlnxe: Fix kernel address leakage
    
    In function qlnx_rdma_deregister_if,
    the address of object rdma_if will be printed out.
    rdma_if is the address of a global variable qlnxr_drv,
    which is passed from dev/qlnx/qlnxr/qlnxr_os.c
    A kernel address leakage happens.
    Fix this by removing the printf statement.
    
    PR:             238646
    
    (cherry picked from commit 9370f49ad1c4625cd73c4d84d3e42ed3e20fabbf)
---
 sys/dev/qlnx/qlnxe/qlnx_rdma.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sys/dev/qlnx/qlnxe/qlnx_rdma.c b/sys/dev/qlnx/qlnxe/qlnx_rdma.c
index 522ef74cf9ce..e5b7c1a62e01 100644
--- a/sys/dev/qlnx/qlnxe/qlnx_rdma.c
+++ b/sys/dev/qlnx/qlnxe/qlnx_rdma.c
@@ -256,8 +256,6 @@ qlnx_rdma_deregister_if(qlnx_rdma_if_t *rdma_if)
 	int ret = 0;
 	qlnx_host_t *ha;
 
-	printf("%s: enter rdma_if = %p\n", __func__, rdma_if);
-
         if (mtx_initialized(&qlnx_rdma_dev_lock)) {
                 mtx_lock(&qlnx_rdma_dev_lock);
 
@@ -288,7 +286,6 @@ qlnx_rdma_deregister_if(qlnx_rdma_if_t *rdma_if)
 
                 mtx_unlock(&qlnx_rdma_dev_lock);
         }
-	printf("%s: exit rdma_if = %p\n", __func__, rdma_if);
 
         return (ret);
 }