Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

Commit 2eae40b

Browse files
shanthoshkutemeikito
authored andcommitted
UPSTREAM: net: bpfilter: Fix type cast and pointer warnings
Fixes the following Sparse warnings: net/bpfilter/bpfilter_kern.c:62:21: warning: cast removes address space of expression net/bpfilter/bpfilter_kern.c:101:49: warning: Using plain integer as NULL pointer Change-Id: I18ad265abd911bab943a3c84a3dac540e28a1da6 Signed-off-by: Shanthosh RK <shanthosh.rk@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
1 parent a1df7e8 commit 2eae40b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

net/bpfilter/bpfilter_kern.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static int __bpfilter_process_sockopt(struct sock *sk, int optname,
5959
req.is_set = is_set;
6060
req.pid = current->pid;
6161
req.cmd = optname;
62-
req.addr = (long)optval;
62+
req.addr = (long __force __user)optval;
6363
req.len = optlen;
6464
mutex_lock(&bpfilter_lock);
6565
if (!info.pid)
@@ -98,7 +98,7 @@ static int __init load_umh(void)
9898
pr_info("Loaded bpfilter_umh pid %d\n", info.pid);
9999

100100
/* health check that usermode process started correctly */
101-
if (__bpfilter_process_sockopt(NULL, 0, 0, 0, 0) != 0) {
101+
if (__bpfilter_process_sockopt(NULL, 0, NULL, 0, 0) != 0) {
102102
stop_umh();
103103
return -EFAULT;
104104
}

0 commit comments

Comments
 (0)