aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink/af_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/netlink/af_netlink.c')
-rw-r--r--net/netlink/af_netlink.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index c8a1eb6eca2d..c0353d55d56f 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -669,6 +669,9 @@ static int netlink_bind(struct socket *sock, struct sockaddr *addr,
669 struct sockaddr_nl *nladdr = (struct sockaddr_nl *)addr; 669 struct sockaddr_nl *nladdr = (struct sockaddr_nl *)addr;
670 int err; 670 int err;
671 671
672 if (addr_len < sizeof(struct sockaddr_nl))
673 return -EINVAL;
674
672 if (nladdr->nl_family != AF_NETLINK) 675 if (nladdr->nl_family != AF_NETLINK)
673 return -EINVAL; 676 return -EINVAL;
674 677
@@ -2059,7 +2062,7 @@ static int netlink_seq_show(struct seq_file *seq, void *v)
2059 struct sock *s = v; 2062 struct sock *s = v;
2060 struct netlink_sock *nlk = nlk_sk(s); 2063 struct netlink_sock *nlk = nlk_sk(s);
2061 2064
2062 seq_printf(seq, "%pK %-3d %-6d %08x %-8d %-8d %pK %-8d %-8d %-8lu\n", 2065 seq_printf(seq, "%pK %-3d %-6u %08x %-8d %-8d %pK %-8d %-8d %-8lu\n",
2063 s, 2066 s,
2064 s->sk_protocol, 2067 s->sk_protocol,
2065 nlk->portid, 2068 nlk->portid,