All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 0/2] Fixes for IEEE 802.15.4
@ 2009-09-16 13:22 Dmitry Eremin-Solenikov
  2009-09-16 13:22 ` [PATCH 1/2] af_ieee802154: setsockopt optlen arg isn't __user Dmitry Eremin-Solenikov
  2009-09-17  3:55 ` [GIT PULL 0/2] Fixes for IEEE 802.15.4 David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Dmitry Eremin-Solenikov @ 2009-09-16 13:22 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-zigbee-devel, Sergey Lapin, netdev

Hi, David,

Please pull both into net/master and net-next/master (as I'd like
to submit few patches into net-next/master depending on this).

The following changes since commit 4e36a95e591e9c58dd10bb4103c00993917c27fd:
  David Howells (1):
        RxRPC: Use uX/sX rather than uintX_t/intX_t types

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git for-linus

Dmitry Eremin-Solenikov (2):
      af_ieee802154: setsockopt optlen arg isn't __user
      ieee802154: add locking for seq numbers

 net/ieee802154/dgram.c   |    2 +-
 net/ieee802154/netlink.c |    4 ++++
 net/ieee802154/raw.c     |    2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] af_ieee802154: setsockopt optlen arg isn't __user
  2009-09-16 13:22 [GIT PULL 0/2] Fixes for IEEE 802.15.4 Dmitry Eremin-Solenikov
@ 2009-09-16 13:22 ` Dmitry Eremin-Solenikov
  2009-09-16 13:22   ` [PATCH 2/2] ieee802154: add locking for seq numbers Dmitry Eremin-Solenikov
  2009-09-17  3:55 ` [GIT PULL 0/2] Fixes for IEEE 802.15.4 David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Dmitry Eremin-Solenikov @ 2009-09-16 13:22 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-zigbee-devel, Sergey Lapin, netdev

Remove __user annotation from optlen arg as it's bogus.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 net/ieee802154/dgram.c |    2 +-
 net/ieee802154/raw.c   |    2 +-
 2 files changed, 2 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/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;
 }
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ieee802154: add locking for seq numbers
  2009-09-16 13:22 ` [PATCH 1/2] af_ieee802154: setsockopt optlen arg isn't __user Dmitry Eremin-Solenikov
@ 2009-09-16 13:22   ` Dmitry Eremin-Solenikov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Eremin-Solenikov @ 2009-09-16 13:22 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-zigbee-devel, Sergey Lapin, netdev

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 net/ieee802154/netlink.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

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;
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [GIT PULL 0/2] Fixes for IEEE 802.15.4
  2009-09-16 13:22 [GIT PULL 0/2] Fixes for IEEE 802.15.4 Dmitry Eremin-Solenikov
  2009-09-16 13:22 ` [PATCH 1/2] af_ieee802154: setsockopt optlen arg isn't __user Dmitry Eremin-Solenikov
@ 2009-09-17  3:55 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2009-09-17  3:55 UTC (permalink / raw)
  To: dbaryshkov; +Cc: linux-zigbee-devel, slapin, netdev

From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Date: Wed, 16 Sep 2009 17:22:11 +0400

> Hi, David,
> 
> Please pull both into net/master and net-next/master (as I'd like
> to submit few patches into net-next/master depending on this).
> 
> The following changes since commit 4e36a95e591e9c58dd10bb4103c00993917c27fd:
>   David Howells (1):
>         RxRPC: Use uX/sX rather than uintX_t/intX_t types
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git for-linus

Pulled thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-17  3:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-16 13:22 [GIT PULL 0/2] Fixes for IEEE 802.15.4 Dmitry Eremin-Solenikov
2009-09-16 13:22 ` [PATCH 1/2] af_ieee802154: setsockopt optlen arg isn't __user Dmitry Eremin-Solenikov
2009-09-16 13:22   ` [PATCH 2/2] ieee802154: add locking for seq numbers Dmitry Eremin-Solenikov
2009-09-17  3:55 ` [GIT PULL 0/2] Fixes for IEEE 802.15.4 David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.