diff options
author | David S. Miller <davem@davemloft.net> | 2009-03-05 02:06:47 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-05 02:06:47 -0800 |
commit | 508827ff0ac3981d420edac64a70de7f4e304d38 (patch) | |
tree | b0cee8ddef9f0ceab68c388e4ae46b7295eb2cb5 /net/netlink | |
parent | 2c3c3d02f28801d7ad2da4952b2c7ca6621ef221 (diff) | |
parent | 72e2240f181871675d3a979766330c91d48a1673 (diff) | |
download | linux-508827ff0ac3981d420edac64a70de7f4e304d38.tar.bz2 |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/tokenring/tmspci.c
drivers/net/ucc_geth_mii.c
Diffstat (limited to 'net/netlink')
-rw-r--r-- | net/netlink/af_netlink.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index e57d700bf6d9..a007dbb4c9f1 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1091,6 +1091,13 @@ out: return 0; } +/** + * netlink_set_err - report error to broadcast listeners + * @ssk: the kernel netlink socket, as returned by netlink_kernel_create() + * @pid: the PID of a process that we want to skip (if any) + * @groups: the broadcast group that will notice the error + * @code: error code, must be negative (as usual in kernelspace) + */ void netlink_set_err(struct sock *ssk, u32 pid, u32 group, int code) { struct netlink_set_err_data info; @@ -1100,7 +1107,8 @@ void netlink_set_err(struct sock *ssk, u32 pid, u32 group, int code) info.exclude_sk = ssk; info.pid = pid; info.group = group; - info.code = code; + /* sk->sk_err wants a positive error value */ + info.code = -code; read_lock(&nl_table_lock); |