Remove redundant fops null check
Fixes: 30c8bd5aa8b2c ("net: Introduce generic failover module")
Signed-off-by: Gaurav Singh
---
net/core/failover.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/failover.c b/net/core/failover.c
index b5cd3c727285..63
abel() that accesses np without check which
may cause a segment violation.
Fixes: 513674b5a2c9c ("net: reevalulate autoflowlabel setting after sysctl
setting")
Signed-off-by: Gaurav Singh
---
net/ipv6/ip6_output.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/
info cannot be NULL here since its being accessed earlier
in the function: nlmsg_parse(info->nlhdr...). Remove this
redundant NULL check.
Signed-off-by: Gaurav Singh
---
net/ethtool/linkmodes.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/ethtool/linkmodes.c b/
e have a call
ip6_flow_hdr(hdr, tclass, ip6_make_flowlabel(net, skb, fl6->flowlabel,
ip6_autoflowlabel(net, np), fl6)); .
Hence np = NULL gets passed in
the function ip6_autoflowlabel() which accesses np-> without check which
may cause a segment violation.
Signed-off-by: Gaurav Singh
---
ne
ipv6_pinfo is initlialized by inet6_sk() which returns NULL.
Hence it can cause segmentation fault. Fix this by adding a
NULL check.
Signed-off-by: Gaurav Singh
---
net/ipv6/ip6_output.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ipv6/ip6_output.c b/net/ipv6
netfilter: ip6tables: Remove redundant null checks
Signed-off-by: Gaurav Singh
---
net/ipv6/netfilter/ip6t_ah.c | 3 +--
net/ipv6/netfilter/ip6t_frag.c | 3 +--
net/ipv6/netfilter/ip6t_hbh.c | 3 +--
net/ipv6/netfilter/ip6t_rt.c | 3 +--
4 files changed, 4 insertions(+), 8 deletions
rh cannot be NULL here since its already checked above
assignment and is being dereferenced before. Remove the
redundant null check.
Signed-off-by: Gaurav Singh
---
net/ipv6/netfilter/ip6t_rt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/ipv6/netfilter/ip6t_rt.c b
oh cannot be NULL since its already checked above after
assignment and is being dereferenced before. Remove the
redundant null check.
Signed-off-by: Gaurav Singh
---
net/ipv6/netfilter/ip6t_hbh.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/ipv6/netfilter/ip6t_hbh.c
fh cannot be NULL since its already checked above after
assignment and is being dereferenced before. Remove the
redundant null check.
Signed-off-by: Gaurav Singh
---
net/ipv6/netfilter/ip6t_frag.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/ipv6/netfilter
ah cannot be NULL since its already checked above after
assignment and is being dereferenced before in pr().
Remove the redundant null check.
Signed-off-by: Gaurav Singh
---
net/ipv6/netfilter/ip6t_ah.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/ipv6/netfilter
Check i < io bounds before accessing io[i].
Signed-off-by: Gaurav Singh
---
drivers/net/wan/cosa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index 5d6532ad6b78..8797adfa0ab0 100644
--- a/drivers/net/wan/cosa.c
++
dev cannot be NULL here since its already being accessed
before. Remove the redundant null check.
Signed-off-by: Gaurav Singh
---
drivers/net/ethernet/xircom/xirc2ps_cs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/xircom/xirc2ps_cs.c
b/drivers/net
dev cannot be NULL here since its already being accessed
before. Remove the redundant null check.
Signed-off-by: Gaurav Singh
---
net/decnet/dn_route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 06b9983325cc
skb cannot be NULL here since its already being accessed
before: sock_net(skb->sk). Remove the redundant null check.
Signed-off-by: Gaurav Singh
---
net/dcb/dcbnl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index d2a4553bc
arg cannot be NULL since its already being dereferenced
before. Remove the redundant NULL check.
Signed-off-by: Gaurav Singh
---
net/sched/cls_tcindex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c
index 61e95029c18f
Remove the redundant null check for skb.
Signed-off-by: Gaurav Singh
---
net/dcb/dcbnl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index d2a4553bcf39..84dde5a2066e 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -1736,7 +1736,7
Fix check in ethtool_rx_flow_rule_create
Signed-off-by: Gaurav Singh
---
net/ethtool/ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
index b5df90c981c2..21d5fc0f6bb3 100644
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
Remove the redundant null check for skb.
Signed-off-by: Gaurav Singh
---
net/sched/act_api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 8ac7eb0a8309..90be8fe9128c 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
parent cannot be NULL here since its in the else part
of the if (parent == NULL) condition. Remove the extra
check on parent pointer.
Signed-off-by: Gaurav Singh
---
net/sched/sch_api.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/sched/sch_api.c b/net/sched
parent cannot be NULL here since its in the else part
of the if (parent == NULL) condition. Remove the extra
check on parent pointer.
Signed-off-by: Gaurav Singh
---
net/sched/sch_api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
Signed-off-by: Gaurav Singh
Fix build errors
Signed-off-by: Gaurav Singh
---
net/sched/sch_api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 9a3449b56bd6..be93ebcdb18d 100644
--- a/net/sched/sch_api.c
+++ b/net/sched
Add null check for skb
Signed-off-by: Gaurav Singh
---
net/sched/act_api.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 8ac7eb0a8309..fd584821d75a 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -1473,9
parent cannot be NULL here since its in the else part
of the if (parent == NULL) condition. Remove the extra
check on parent pointer.
Signed-off-by: Gaurav Singh
---
net/sched/sch_api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
Memset() on the pointer right after malloc() can cause
a null pointer dereference if it failed to allocate memory.
Fix this by replacing malloc/memset with a single calloc().
Signed-off-by: Gaurav Singh
---
samples/bpf/xdp_redirect_cpu_user.c | 11 +++
1 file changed, 3 insertions(+), 8
Memset() on the pointer right after malloc() can cause
a null pointer dereference if it failed to allocate memory.
Fix this by replacing malloc/memset with a single calloc().
Signed-off-by: Gaurav Singh
---
samples/bpf/xdp_monitor_user.c | 8 ++--
1 file changed, 2 insertions(+), 6
The bpf_prog is being checked for !NULL after uml_kmalloc
but later its used directly for example:
bpf_prog->filter = bpf and is also later returned upon
success. Fix this, do a NULL check and return right away.
Signed-off-by: Gaurav Singh
---
arch/um/drivers/vector_user.c | 8 +---
1 f
Memset on the pointer right after malloc can cause a
null pointer deference if it failed to allocate memory.
A simple fix is to replace malloc/memset with a calloc()
Fixes: 0fca931a6f21 ("samples/bpf: program demonstrating access to
xdp_rxq_info")
Signed-off-by: Gaurav Singh
---
s
Replace malloc/memset with calloc
Fixes: 0fca931a6f21 ("samples/bpf: program demonstrating access to
xdp_rxq_info")
Signed-off-by: Gaurav Singh
---
samples/bpf/xdp_rxq_info_user.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/samples/bpf/xdp_rxq_i
Replace malloc/memset with calloc
Fixes: 0fca931a6f21 ("samples/bpf: program demonstrating access to
xdp_rxq_info") Signed-off-by: Gaurav Singh
---
samples/bpf/xdp_rxq_info_user.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/samples/bpf/xdp_rxq_i
Replace malloc/memset with calloc
Signed-off-by: Gaurav Singh
---
samples/bpf/xdp_rxq_info_user.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/samples/bpf/xdp_rxq_info_user.c b/samples/bpf/xdp_rxq_info_user.c
index 4fe47502ebed..caa4e7ffcfc7 100644
--- a
The bpf_prog is being checked for !NULL after uml_kmalloc but
later its used directly for example:
bpf_prog->filter = bpf and is also later returned upon success.
Fix this, do a NULL check and return right away.
Signed-off-by: Gaurav Singh
---
arch/um/drivers/vector_user.c | 8 +---
1 f
Signed-off-by: Gaurav Singh
The bpf_prog is being checked for !NULL after uml_kmalloc but
later its used directly for example:
bpf_prog->filter = bpf and is also later returned upon success.
Fix this, do a NULL check and return right away.
---
arch/um/drivers/vector_user.c | 8 +---
Signed-off-by: Gaurav Singh
The memset call is made right after malloc call which
can return a NULL pointer upon failure causing a
segmentation fault. Fix this by adding a null check
right after malloc() and then do memset().
---
samples/bpf/xdp_rxq_info_user.c | 6 +++---
1 file changed, 3
The memset call is made right after malloc call. To fix this, add the null
check right after malloc and then do memset.
Signed-off-by: Gaurav Singh
---
samples/bpf/xdp_rxq_info_user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf/xdp_rxq_info_user.c b/samples
Signed-off-by: Gaurav Singh
---
samples/bpf/xdp_rxq_info_user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf/xdp_rxq_info_user.c b/samples/bpf/xdp_rxq_info_user.c
index 4fe47502ebed..490b07b7df78 100644
--- a/samples/bpf/xdp_rxq_info_user.c
+++ b/samples/bpf
Please find the patch below.
Thanks and regards,
Gaurav.
>From Gaurav Singh # This line is ignored.
From: Gaurav Singh
Reply-To:
Subject:
In-Reply-To:
36 matches
Mail list logo