Alexander Smirnov | 1 Sep 2011 14:21
Picon

[PATCH 1/1 -next] 6LoWPAN: fix skb_copy call

This patch fixes 2 issues in lowpan_skb_deliver function:
1. Check for return status of skb_copy call;
2. Use skb_copy with proper GFP flag depending on context.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@...>
---
 net/ieee802154/6lowpan.c |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index cf304cc..cac1361 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
 <at>  <at>  -477,9 +477,15  <at>  <at>  static int lowpan_skb_deliver(struct sk_buff *skb, struct ipv6hdr *hdr)
 	struct sk_buff *new;
 	struct lowpan_dev_record *entry;
 	int stat = NET_RX_SUCCESS;
+	gfp_t mask;

-	new = skb_copy_expand(skb, sizeof(struct ipv6hdr), skb_tailroom(skb),
-								GFP_KERNEL);
+	if (in_interrupt())
+		mask = GFP_ATOMIC;
+	else
+		mask = GFP_KERNEL;
+
+	new = skb_copy_expand(skb, sizeof(struct ipv6hdr),
+					skb_tailroom(skb), mask);
 	kfree_skb(skb);

(Continue reading)

Alexander Smirnov | 1 Sep 2011 14:54
Picon

[PATCH v2 -next] 6LoWPAN: fix skb_copy call

This patch fixes 2 issues in lowpan_skb_deliver function:
1. Check for return status of skb_copy call;
2. Use skb_copy with proper GFP flag depending on context.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@...>
---
 net/ieee802154/6lowpan.c |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index cf304cc..16100be 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
 <at>  <at>  -477,9 +477,15  <at>  <at>  static int lowpan_skb_deliver(struct sk_buff *skb, struct ipv6hdr *hdr)
 	struct sk_buff *new;
 	struct lowpan_dev_record *entry;
 	int stat = NET_RX_SUCCESS;
+	gfp_t mask;

-	new = skb_copy_expand(skb, sizeof(struct ipv6hdr), skb_tailroom(skb),
-								GFP_KERNEL);
+	if (in_interrupt())
+		mask = GFP_ATOMIC;
+	else
+		mask = GFP_KERNEL;
+
+	new = skb_copy_expand(skb, sizeof(struct ipv6hdr),
+					skb_tailroom(skb), mask);
 	kfree_skb(skb);

(Continue reading)

Alexander Smirnov | 1 Sep 2011 15:55
Picon

[PATCH v3 -next] 6LoWPAN: fix skb_copy call

This patch fixes 2 issues in lowpan_skb_deliver function:
1. Check for return status of skb_copy call;
2. Use skb_copy with proper GFP flag, drop check for non-interrupt
context.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@...>
---
 net/ieee802154/6lowpan.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index cf304cc..deb2adf 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
 <at>  <at>  -479,10 +479,10  <at>  <at>  static int lowpan_skb_deliver(struct sk_buff *skb, struct ipv6hdr *hdr)
 	int stat = NET_RX_SUCCESS;

 	new = skb_copy_expand(skb, sizeof(struct ipv6hdr), skb_tailroom(skb),
-								GFP_KERNEL);
+								GFP_ATOMIC);
 	kfree_skb(skb);

-	if (NULL == new)
+	if (!new)
 		return -ENOMEM;

 	skb_push(new, sizeof(struct ipv6hdr));
 <at>  <at>  -495,13 +495,14  <at>  <at>  static int lowpan_skb_deliver(struct sk_buff *skb, struct ipv6hdr *hdr)
 	rcu_read_lock();
 	list_for_each_entry_rcu(entry, &lowpan_devices, list)
(Continue reading)

M M | 9 Sep 2011 16:12
Picon

HowTo steps about linux-zigbee on Ubuntu.

Hi All,
I'm read and download the sources files on linux-zigbee on my pc. I have one usb adapter zigbee and host Ubuntu 10. The usb adapter has been reading with success on Ubuntu. I try to configure a basic step with the Getting Started steps, but when I try the first step (on root):

# iz listphy

I read the follow error message:
"receive failed: netlink error (errno = no such file or directory"

So, also, I would to add the wpan-phy0 on ifconfig, but I do not know what to do.
Can anyone help me, please ?

Thanks.
Best Regards.

------------------------------------------------------------------------------
Why Cloud-Based Security and Archiving Make Sense
Osterman Research conducted this study that outlines how and why cloud
computing security and archiving is rapidly being adopted across the IT 
space for its ease of implementation, lower cost, and increased 
reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@...
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
Alexander Smirnov | 9 Sep 2011 17:50
Picon

Re: HowTo steps about linux-zigbee on Ubuntu.

Hi,

first of all could you please specify following points:
1. Which chip do you use?
2. What do you mean by sources (kernel, iz-tools...)?
3. Am I right that you try to use ubuntu kernel?

Thank you,
Alexander

2011/9/9 M M <tmarco03@...>:
> Hi All,
> I'm read and download the sources files on linux-zigbee on my pc. I have one
> usb adapter zigbee and host Ubuntu 10. The usb adapter has been reading with
> success on Ubuntu. I try to configure a basic step with the Getting Started
> steps, but when I try the first step (on root):
>
> # iz listphy
>
>
> I read the follow error message:
> "receive failed: netlink error (errno = no such file or directory"
>
>
> So, also, I would to add the wpan-phy0 on ifconfig, but I do not know what
> to do.
>
> Can anyone help me, please ?
>
> Thanks.
> Best Regards.
>
>
> ------------------------------------------------------------------------------
> Why Cloud-Based Security and Archiving Make Sense
> Osterman Research conducted this study that outlines how and why cloud
> computing security and archiving is rapidly being adopted across the IT
> space for its ease of implementation, lower cost, and increased
> reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/
> _______________________________________________
> Linux-zigbee-devel mailing list
> Linux-zigbee-devel@...
> https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
>
>

------------------------------------------------------------------------------
Why Cloud-Based Security and Archiving Make Sense
Osterman Research conducted this study that outlines how and why cloud
computing security and archiving is rapidly being adopted across the IT 
space for its ease of implementation, lower cost, and increased 
reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/
David Miller | 15 Sep 2011 21:42
Favicon

Re: [patch 1/3 -next] 6LoWPAN: use kfree_skb() instead of kfree()

From: Dan Carpenter <error27@...>
Date: Tue, 30 Aug 2011 16:45:52 +0300

> Use kfree_skb() to free sbk_buffs.
> 
> Signed-off-by: Dan Carpenter <error27@...>

Applied.

------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
David Miller | 15 Sep 2011 21:42
Favicon

Re: [patch 2/3 -next] 6LoWPAN: use the _safe version of list_for_each

From: Dan Carpenter <error27@...>
Date: Tue, 30 Aug 2011 16:46:40 +0300

> When we kfree(entry) that causes a use-after-free bug so we have to
> use list_for_each_entry_safe() safe here.
> 
> Signed-off-by: Dan Carpenter <error27@...>

Applied.

------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
David Miller | 15 Sep 2011 21:42
Favicon

Re: [patch 3/3 -next] 6LoWPAN: call dev_put() on error in lowpan_newlink()

From: Dan Carpenter <error27@...>
Date: Tue, 30 Aug 2011 16:51:09 +0300

> We should release the dev_hold() on error before returning here.
> 
> Signed-off-by: Dan Carpenter <error27@...>

Applied.

------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
David Miller | 15 Sep 2011 21:42
Favicon

Re: [PATCH v2 -next] 6LoWPAN: fix skb_copy call

From: Alexander Smirnov <alex.bluesman.smirnov@...>
Date: Thu,  1 Sep 2011 16:54:13 +0400

> This patch fixes 2 issues in lowpan_skb_deliver function:
> 1. Check for return status of skb_copy call;
> 2. Use skb_copy with proper GFP flag depending on context.
> 
> Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@...>

Applied.

------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
David Miller | 15 Sep 2011 21:43
Favicon

Re: [PATCH v3 -next] 6LoWPAN: fix skb_copy call

From: Alexander Smirnov <alex.bluesman.smirnov@...>
Date: Thu,  1 Sep 2011 17:55:15 +0400

> This patch fixes 2 issues in lowpan_skb_deliver function:
> 1. Check for return status of skb_copy call;
> 2. Use skb_copy with proper GFP flag, drop check for non-interrupt
> context.
> 
> Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@...>

Just to make it clear, I applied -v3 of this patch not -v2. :-)

------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/

Gmane