aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-03-05 05:06:47 -0500
committerDavid S. Miller <davem@davemloft.net>2009-03-05 05:06:47 -0500
commit508827ff0ac3981d420edac64a70de7f4e304d38 (patch)
treeb0cee8ddef9f0ceab68c388e4ae46b7295eb2cb5 /net/netlink
parent2c3c3d02f28801d7ad2da4952b2c7ca6621ef221 (diff)
parent72e2240f181871675d3a979766330c91d48a1673 (diff)
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.c10
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:
1091 return 0; 1091 return 0;
1092} 1092}
1093 1093
1094/**
1095 * netlink_set_err - report error to broadcast listeners
1096 * @ssk: the kernel netlink socket, as returned by netlink_kernel_create()
1097 * @pid: the PID of a process that we want to skip (if any)
1098 * @groups: the broadcast group that will notice the error
1099 * @code: error code, must be negative (as usual in kernelspace)
1100 */
1094void netlink_set_err(struct sock *ssk, u32 pid, u32 group, int code) 1101void netlink_set_err(struct sock *ssk, u32 pid, u32 group, int code)
1095{ 1102{
1096 struct netlink_set_err_data info; 1103 struct netlink_set_err_data info;
@@ -1100,7 +1107,8 @@ void netlink_set_err(struct sock *ssk, u32 pid, u32 group, int code)
1100 info.exclude_sk = ssk; 1107 info.exclude_sk = ssk;
1101 info.pid = pid; 1108 info.pid = pid;
1102 info.group = group; 1109 info.group = group;
1103 info.code = code; 1110 /* sk->sk_err wants a positive error value */
1111 info.code = -code;
1104 1112
1105 read_lock(&nl_table_lock); 1113 read_lock(&nl_table_lock);
1106 1114