diff options
author | David S. Miller <davem@davemloft.net> | 2009-09-16 23:55:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-16 23:55:28 -0400 |
commit | 12cbcfd386df56dce8b8ba6ba2c7f85680793716 (patch) | |
tree | b0d84f2771298d7c36a11c29683b206e3c3a1ddc /net | |
parent | 0aad191c5fea3627c8efbc453cfebb6d1dca496c (diff) | |
parent | c4835d81efb1795eb8bbeb40b73d74e5c04b1257 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan
Diffstat (limited to 'net')
-rw-r--r-- | net/ieee802154/dgram.c | 2 | ||||
-rw-r--r-- | net/ieee802154/netlink.c | 4 | ||||
-rw-r--r-- | net/ieee802154/raw.c | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/net/ieee802154/dgram.c b/net/ieee802154/dgram.c index 77ae6852b93d..51593a48f2dd 100644 --- a/net/ieee802154/dgram.c +++ b/net/ieee802154/dgram.c | |||
@@ -414,7 +414,7 @@ static int dgram_getsockopt(struct sock *sk, int level, int optname, | |||
414 | } | 414 | } |
415 | 415 | ||
416 | static int dgram_setsockopt(struct sock *sk, int level, int optname, | 416 | static int dgram_setsockopt(struct sock *sk, int level, int optname, |
417 | char __user *optval, int __user optlen) | 417 | char __user *optval, int optlen) |
418 | { | 418 | { |
419 | struct dgram_sock *ro = dgram_sk(sk); | 419 | struct dgram_sock *ro = dgram_sk(sk); |
420 | int val; | 420 | int val; |
diff --git a/net/ieee802154/netlink.c b/net/ieee802154/netlink.c index 2106ecbf0308..ca767bde17a4 100644 --- a/net/ieee802154/netlink.c +++ b/net/ieee802154/netlink.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <net/ieee802154_netdev.h> | 35 | #include <net/ieee802154_netdev.h> |
36 | 36 | ||
37 | static unsigned int ieee802154_seq_num; | 37 | static unsigned int ieee802154_seq_num; |
38 | static DEFINE_SPINLOCK(ieee802154_seq_lock); | ||
38 | 39 | ||
39 | static struct genl_family ieee802154_coordinator_family = { | 40 | static struct genl_family ieee802154_coordinator_family = { |
40 | .id = GENL_ID_GENERATE, | 41 | .id = GENL_ID_GENERATE, |
@@ -57,12 +58,15 @@ static struct sk_buff *ieee802154_nl_create(int flags, u8 req) | |||
57 | { | 58 | { |
58 | void *hdr; | 59 | void *hdr; |
59 | struct sk_buff *msg = nlmsg_new(NLMSG_GOODSIZE, GFP_ATOMIC); | 60 | struct sk_buff *msg = nlmsg_new(NLMSG_GOODSIZE, GFP_ATOMIC); |
61 | unsigned long f; | ||
60 | 62 | ||
61 | if (!msg) | 63 | if (!msg) |
62 | return NULL; | 64 | return NULL; |
63 | 65 | ||
66 | spin_lock_irqsave(&ieee802154_seq_lock, f); | ||
64 | hdr = genlmsg_put(msg, 0, ieee802154_seq_num++, | 67 | hdr = genlmsg_put(msg, 0, ieee802154_seq_num++, |
65 | &ieee802154_coordinator_family, flags, req); | 68 | &ieee802154_coordinator_family, flags, req); |
69 | spin_unlock_irqrestore(&ieee802154_seq_lock, f); | ||
66 | if (!hdr) { | 70 | if (!hdr) { |
67 | nlmsg_free(msg); | 71 | nlmsg_free(msg); |
68 | return NULL; | 72 | return NULL; |
diff --git a/net/ieee802154/raw.c b/net/ieee802154/raw.c index 4681501aae93..13198859982e 100644 --- a/net/ieee802154/raw.c +++ b/net/ieee802154/raw.c | |||
@@ -244,7 +244,7 @@ static int raw_getsockopt(struct sock *sk, int level, int optname, | |||
244 | } | 244 | } |
245 | 245 | ||
246 | static int raw_setsockopt(struct sock *sk, int level, int optname, | 246 | static int raw_setsockopt(struct sock *sk, int level, int optname, |
247 | char __user *optval, int __user optlen) | 247 | char __user *optval, int optlen) |
248 | { | 248 | { |
249 | return -EOPNOTSUPP; | 249 | return -EOPNOTSUPP; |
250 | } | 250 | } |