summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-09-16 20:55:28 -0700
committerDavid S. Miller <davem@davemloft.net>2009-09-16 20:55:28 -0700
commit12cbcfd386df56dce8b8ba6ba2c7f85680793716 (patch)
treeb0d84f2771298d7c36a11c29683b206e3c3a1ddc /net
parent0aad191c5fea3627c8efbc453cfebb6d1dca496c (diff)
parentc4835d81efb1795eb8bbeb40b73d74e5c04b1257 (diff)
downloadop-kernel-dev-12cbcfd386df56dce8b8ba6ba2c7f85680793716.zip
op-kernel-dev-12cbcfd386df56dce8b8ba6ba2c7f85680793716.tar.gz
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.c2
-rw-r--r--net/ieee802154/netlink.c4
-rw-r--r--net/ieee802154/raw.c2
3 files changed, 6 insertions, 2 deletions
diff --git a/net/ieee802154/dgram.c b/net/ieee802154/dgram.c
index 77ae685..51593a4 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,
}
static int dgram_setsockopt(struct sock *sk, int level, int optname,
- char __user *optval, int __user optlen)
+ char __user *optval, int optlen)
{
struct dgram_sock *ro = dgram_sk(sk);
int val;
diff --git a/net/ieee802154/netlink.c b/net/ieee802154/netlink.c
index 2106ecb..ca767bd 100644
--- a/net/ieee802154/netlink.c
+++ b/net/ieee802154/netlink.c
@@ -35,6 +35,7 @@
#include <net/ieee802154_netdev.h>
static unsigned int ieee802154_seq_num;
+static DEFINE_SPINLOCK(ieee802154_seq_lock);
static struct genl_family ieee802154_coordinator_family = {
.id = GENL_ID_GENERATE,
@@ -57,12 +58,15 @@ static struct sk_buff *ieee802154_nl_create(int flags, u8 req)
{
void *hdr;
struct sk_buff *msg = nlmsg_new(NLMSG_GOODSIZE, GFP_ATOMIC);
+ unsigned long f;
if (!msg)
return NULL;
+ spin_lock_irqsave(&ieee802154_seq_lock, f);
hdr = genlmsg_put(msg, 0, ieee802154_seq_num++,
&ieee802154_coordinator_family, flags, req);
+ spin_unlock_irqrestore(&ieee802154_seq_lock, f);
if (!hdr) {
nlmsg_free(msg);
return NULL;
diff --git a/net/ieee802154/raw.c b/net/ieee802154/raw.c
index 4681501..1319885 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,
}
static int raw_setsockopt(struct sock *sk, int level, int optname,
- char __user *optval, int __user optlen)
+ char __user *optval, int optlen)
{
return -EOPNOTSUPP;
}
OpenPOWER on IntegriCloud