diff options
Diffstat (limited to 'net/netlink/af_netlink.c')
-rw-r--r-- | net/netlink/af_netlink.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index a4957bf2ca60..320d0423a240 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -455,9 +455,14 @@ static int netlink_create(struct net *net, struct socket *sock, int protocol, | |||
455 | if (nl_table[protocol].registered && | 455 | if (nl_table[protocol].registered && |
456 | try_module_get(nl_table[protocol].module)) | 456 | try_module_get(nl_table[protocol].module)) |
457 | module = nl_table[protocol].module; | 457 | module = nl_table[protocol].module; |
458 | else | ||
459 | err = -EPROTONOSUPPORT; | ||
458 | cb_mutex = nl_table[protocol].cb_mutex; | 460 | cb_mutex = nl_table[protocol].cb_mutex; |
459 | netlink_unlock_table(); | 461 | netlink_unlock_table(); |
460 | 462 | ||
463 | if (err < 0) | ||
464 | goto out; | ||
465 | |||
461 | err = __netlink_create(net, sock, cb_mutex, protocol); | 466 | err = __netlink_create(net, sock, cb_mutex, protocol); |
462 | if (err < 0) | 467 | if (err < 0) |
463 | goto out_module; | 468 | goto out_module; |
@@ -1973,12 +1978,12 @@ static int netlink_seq_show(struct seq_file *seq, void *v) | |||
1973 | if (v == SEQ_START_TOKEN) | 1978 | if (v == SEQ_START_TOKEN) |
1974 | seq_puts(seq, | 1979 | seq_puts(seq, |
1975 | "sk Eth Pid Groups " | 1980 | "sk Eth Pid Groups " |
1976 | "Rmem Wmem Dump Locks Drops\n"); | 1981 | "Rmem Wmem Dump Locks Drops Inode\n"); |
1977 | else { | 1982 | else { |
1978 | struct sock *s = v; | 1983 | struct sock *s = v; |
1979 | struct netlink_sock *nlk = nlk_sk(s); | 1984 | struct netlink_sock *nlk = nlk_sk(s); |
1980 | 1985 | ||
1981 | seq_printf(seq, "%p %-3d %-6d %08x %-8d %-8d %p %-8d %-8d\n", | 1986 | seq_printf(seq, "%p %-3d %-6d %08x %-8d %-8d %p %-8d %-8d %-8lu\n", |
1982 | s, | 1987 | s, |
1983 | s->sk_protocol, | 1988 | s->sk_protocol, |
1984 | nlk->pid, | 1989 | nlk->pid, |
@@ -1987,7 +1992,8 @@ static int netlink_seq_show(struct seq_file *seq, void *v) | |||
1987 | sk_wmem_alloc_get(s), | 1992 | sk_wmem_alloc_get(s), |
1988 | nlk->cb, | 1993 | nlk->cb, |
1989 | atomic_read(&s->sk_refcnt), | 1994 | atomic_read(&s->sk_refcnt), |
1990 | atomic_read(&s->sk_drops) | 1995 | atomic_read(&s->sk_drops), |
1996 | sock_i_ino(s) | ||
1991 | ); | 1997 | ); |
1992 | 1998 | ||
1993 | } | 1999 | } |