git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
net
/
econet
/
af_econet.c
diff --git
a/net/econet/af_econet.c
b/net/econet/af_econet.c
index
07b4cff
..
fc31ae1
100644
(file)
--- a/
net/econet/af_econet.c
+++ b/
net/econet/af_econet.c
@@
-39,6
+39,7
@@
#include <net/udp.h>
#include <net/ip.h>
#include <linux/spinlock.h>
#include <net/udp.h>
#include <net/ip.h>
#include <linux/spinlock.h>
+#include <linux/rcupdate.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/system.h>
@@
-401,16
+402,17
@@
static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
y.x maps to IP a.b.c.x. This should be replaced with something
more flexible and more aware of subnet masks. */
{
y.x maps to IP a.b.c.x. This should be replaced with something
more flexible and more aware of subnet masks. */
{
- struct in_device *idev
= in_dev_get(dev)
;
+ struct in_device *idev;
unsigned long network = 0;
unsigned long network = 0;
+
+ rcu_read_lock();
+ idev = __in_dev_get(dev);
if (idev) {
if (idev) {
- read_lock(&idev->lock);
if (idev->ifa_list)
network = ntohl(idev->ifa_list->ifa_address) &
0xffffff00; /* !!! */
if (idev->ifa_list)
network = ntohl(idev->ifa_list->ifa_address) &
0xffffff00; /* !!! */
- read_unlock(&idev->lock);
- in_dev_put(idev);
}
}
+ rcu_read_unlock();
udpdest.sin_addr.s_addr = htonl(network | addr.station);
}
udpdest.sin_addr.s_addr = htonl(network | addr.station);
}