Commit 12cbcfd3 authored by David S. Miller's avatar David S. Miller
parents 0aad191c c4835d81
...@@ -414,7 +414,7 @@ static int dgram_getsockopt(struct sock *sk, int level, int optname, ...@@ -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, 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); struct dgram_sock *ro = dgram_sk(sk);
int val; int val;
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <net/ieee802154_netdev.h> #include <net/ieee802154_netdev.h>
static unsigned int ieee802154_seq_num; static unsigned int ieee802154_seq_num;
static DEFINE_SPINLOCK(ieee802154_seq_lock);
static struct genl_family ieee802154_coordinator_family = { static struct genl_family ieee802154_coordinator_family = {
.id = GENL_ID_GENERATE, .id = GENL_ID_GENERATE,
...@@ -57,12 +58,15 @@ static struct sk_buff *ieee802154_nl_create(int flags, u8 req) ...@@ -57,12 +58,15 @@ static struct sk_buff *ieee802154_nl_create(int flags, u8 req)
{ {
void *hdr; void *hdr;
struct sk_buff *msg = nlmsg_new(NLMSG_GOODSIZE, GFP_ATOMIC); struct sk_buff *msg = nlmsg_new(NLMSG_GOODSIZE, GFP_ATOMIC);
unsigned long f;
if (!msg) if (!msg)
return NULL; return NULL;
spin_lock_irqsave(&ieee802154_seq_lock, f);
hdr = genlmsg_put(msg, 0, ieee802154_seq_num++, hdr = genlmsg_put(msg, 0, ieee802154_seq_num++,
&ieee802154_coordinator_family, flags, req); &ieee802154_coordinator_family, flags, req);
spin_unlock_irqrestore(&ieee802154_seq_lock, f);
if (!hdr) { if (!hdr) {
nlmsg_free(msg); nlmsg_free(msg);
return NULL; return NULL;
......
...@@ -244,7 +244,7 @@ static int raw_getsockopt(struct sock *sk, int level, int optname, ...@@ -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, static int raw_setsockopt(struct sock *sk, int level, int optname,
char __user *optval, int __user optlen) char __user *optval, int optlen)
{ {
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment