diff options
| author | Jason Xing <kernelxing@tencent.com> | 2024-05-31 23:46:34 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-09-08 07:56:34 +0200 |
| commit | c6447078795981345ab20eab35b8f5709fa18a32 (patch) | |
| tree | d3566a34265569ce54cd29e5ef869b15e8f8057b /include | |
| parent | 7ef1d2e240c32b1f337a37232d037b07e3919e1a (diff) | |
| download | linux-c6447078795981345ab20eab35b8f5709fa18a32.tar.gz linux-c6447078795981345ab20eab35b8f5709fa18a32.tar.bz2 linux-c6447078795981345ab20eab35b8f5709fa18a32.zip | |
net: remove NULL-pointer net parameter in ip_metrics_convert
[ Upstream commit 61e2bbafb00e4b9a5de45e6448a7b6b818658576 ]
When I was doing some experiments, I found that when using the first
parameter, namely, struct net, in ip_metrics_convert() always triggers NULL
pointer crash. Then I digged into this part, realizing that we can remove
this one due to its uselessness.
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/ip.h | 3 | ||||
| -rw-r--r-- | include/net/tcp.h | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index 6d735e00d3f3..c5606cadb1a5 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -506,8 +506,7 @@ static inline unsigned int ip_skb_dst_mtu(struct sock *sk, return mtu - lwtunnel_headroom(skb_dst(skb)->lwtstate, mtu); } -struct dst_metrics *ip_fib_metrics_init(struct net *net, struct nlattr *fc_mx, - int fc_mx_len, +struct dst_metrics *ip_fib_metrics_init(struct nlattr *fc_mx, int fc_mx_len, struct netlink_ext_ack *extack); static inline void ip_fib_metrics_put(struct dst_metrics *fib_metrics) { diff --git a/include/net/tcp.h b/include/net/tcp.h index 32815a40dea1..45bbb54e42e8 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1216,7 +1216,7 @@ extern struct tcp_congestion_ops tcp_reno; struct tcp_congestion_ops *tcp_ca_find(const char *name); struct tcp_congestion_ops *tcp_ca_find_key(u32 key); -u32 tcp_ca_get_key_by_name(struct net *net, const char *name, bool *ecn_ca); +u32 tcp_ca_get_key_by_name(const char *name, bool *ecn_ca); #ifdef CONFIG_INET char *tcp_ca_get_name_by_key(u32 key, char *buffer); #else |
