summaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
commit27cfca1ec98e91261b1a5355d10a8996464b63af (patch)
tree8e895a53e372fa682b4c0a585b9377d67ed70d0e /net/netlink
parent6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff)
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too o Upgrade to 2.1.89. Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/.cvsignore1
-rw-r--r--net/netlink/af_netlink.c19
-rw-r--r--net/netlink/netlink_dev.c2
3 files changed, 11 insertions, 11 deletions
diff --git a/net/netlink/.cvsignore b/net/netlink/.cvsignore
index 4671378ae..857dd22e9 100644
--- a/net/netlink/.cvsignore
+++ b/net/netlink/.cvsignore
@@ -1 +1,2 @@
.depend
+.*.flags
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 81c53edda..3f02f4c3c 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -359,6 +359,7 @@ retry:
#ifdef NL_EMULATE_DEV
if (sk->protinfo.af_netlink.handler) {
+ skb_orphan(skb);
len = sk->protinfo.af_netlink.handler(protocol, skb);
netlink_unlock(sk);
return len;
@@ -370,7 +371,7 @@ retry:
if (nonblock) {
sti();
netlink_unlock(sk);
- kfree_skb(skb, 0);
+ kfree_skb(skb);
return -EAGAIN;
}
interruptible_sleep_on(sk->sleep);
@@ -378,7 +379,7 @@ retry:
sti();
if (signal_pending(current)) {
- kfree_skb(skb, 0);
+ kfree_skb(skb);
return -ERESTARTSYS;
}
goto retry;
@@ -392,7 +393,7 @@ Nprintk("unicast_deliver %d\n", skb->len);
netlink_unlock(sk);
return len;
}
- kfree_skb(skb, 0);
+ kfree_skb(skb);
return -ECONNREFUSED;
}
@@ -400,6 +401,7 @@ static __inline__ int netlink_broadcast_deliver(struct sock *sk, struct sk_buff
{
#ifdef NL_EMULATE_DEV
if (sk->protinfo.af_netlink.handler) {
+ skb_orphan(skb);
sk->protinfo.af_netlink.handler(sk->protocol, skb);
return 0;
} else
@@ -466,8 +468,8 @@ void netlink_broadcast(struct sock *ssk, struct sk_buff *skb, pid_t pid,
netlink_unlock_table(protocol, allocation == GFP_KERNEL);
if (skb2)
- kfree_skb(skb2, 0);
- kfree_skb(skb, 0);
+ kfree_skb(skb2);
+ kfree_skb(skb);
}
void netlink_set_err(struct sock *ssk, pid_t pid, unsigned group, int code)
@@ -630,7 +632,7 @@ netlink_kernel_create(int unit, void (*input)(struct sock *sk, int len))
static void netlink_destroy_callback(struct netlink_callback *cb)
{
if (cb->skb)
- kfree_skb(cb->skb, 0);
+ kfree_skb(cb->skb);
kfree(cb);
}
@@ -758,16 +760,13 @@ void netlink_detach(int unit)
int netlink_post(int unit, struct sk_buff *skb)
{
if (netlink_kernel[unit]) {
+ memset(skb->cb, 0, sizeof(skb->cb));
netlink_broadcast(netlink_kernel[unit]->sk, skb, 0, ~0, GFP_ATOMIC);
return 0;
}
return -EUNATCH;;
}
-EXPORT_SYMBOL(netlink_attach);
-EXPORT_SYMBOL(netlink_detach);
-EXPORT_SYMBOL(netlink_post);
-
#endif
#if 0
diff --git a/net/netlink/netlink_dev.c b/net/netlink/netlink_dev.c
index cbd48c1c0..2a1dd160c 100644
--- a/net/netlink/netlink_dev.c
+++ b/net/netlink/netlink_dev.c
@@ -42,7 +42,7 @@ static unsigned int netlink_poll(struct file *file, poll_table * wait)
if (sock->ops->poll==NULL)
return 0;
- return sock->ops->poll(sock, wait);
+ return sock->ops->poll(file, sock, wait);
}
/*