* [PATCH bluetooth-next 1/2] 6lowpan: ndisc: fix double read unlock
@ 2016-06-21 8:27 Alexander Aring
2016-06-21 8:27 ` [PATCH bluetooth-next 2/2] 6lowpan: ndisc: add missing 802.15.4 only check Alexander Aring
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Alexander Aring @ 2016-06-21 8:27 UTC (permalink / raw)
To: linux-wpan; +Cc: linux-bluetooth, kernel, dan.carpenter, Alexander Aring
This patch removes a double unlock case to accessing neighbour private
data.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alexander Aring <aar@pengutronix.de>
---
net/6lowpan/ndisc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/6lowpan/ndisc.c b/net/6lowpan/ndisc.c
index ae1d419..030504e 100644
--- a/net/6lowpan/ndisc.c
+++ b/net/6lowpan/ndisc.c
@@ -135,8 +135,9 @@ static int lowpan_ndisc_opt_addr_space(const struct net_device *dev,
read_unlock_bh(&neigh->lock);
addr_space += __ndisc_opt_addr_space(IEEE802154_SHORT_ADDR_LEN, 0);
*ha = ha_buf;
+ } else {
+ read_unlock_bh(&neigh->lock);
}
- read_unlock_bh(&neigh->lock);
break;
case NDISC_NEIGHBOUR_ADVERTISEMENT:
case NDISC_NEIGHBOUR_SOLICITATION:
--
2.9.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH bluetooth-next 2/2] 6lowpan: ndisc: add missing 802.15.4 only check
2016-06-21 8:27 [PATCH bluetooth-next 1/2] 6lowpan: ndisc: fix double read unlock Alexander Aring
@ 2016-06-21 8:27 ` Alexander Aring
2016-06-22 13:36 ` Stefan Schmidt
2016-06-27 6:04 ` Marcel Holtmann
2016-06-22 13:30 ` [PATCH bluetooth-next 1/2] 6lowpan: ndisc: fix double read unlock Stefan Schmidt
2016-06-27 6:03 ` Marcel Holtmann
2 siblings, 2 replies; 6+ messages in thread
From: Alexander Aring @ 2016-06-21 8:27 UTC (permalink / raw)
To: linux-wpan; +Cc: linux-bluetooth, kernel, dan.carpenter, Alexander Aring
This patch adds a missing check to handle short address parsing for
802.15.4 6LoWPAN only.
Signed-off-by: Alexander Aring <aar@pengutronix.de>
---
net/6lowpan/ndisc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/6lowpan/ndisc.c b/net/6lowpan/ndisc.c
index 030504e..79c5fa9 100644
--- a/net/6lowpan/ndisc.c
+++ b/net/6lowpan/ndisc.c
@@ -47,6 +47,9 @@ static int lowpan_ndisc_parse_options(const struct net_device *dev,
struct nd_opt_hdr *nd_opt,
struct ndisc_options *ndopts)
{
+ if (!lowpan_is_ll(dev, LOWPAN_LLTYPE_IEEE802154))
+ return 0;
+
switch (nd_opt->nd_opt_type) {
case ND_OPT_SOURCE_LL_ADDR:
case ND_OPT_TARGET_LL_ADDR:
--
2.9.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH bluetooth-next 1/2] 6lowpan: ndisc: fix double read unlock
2016-06-21 8:27 [PATCH bluetooth-next 1/2] 6lowpan: ndisc: fix double read unlock Alexander Aring
2016-06-21 8:27 ` [PATCH bluetooth-next 2/2] 6lowpan: ndisc: add missing 802.15.4 only check Alexander Aring
@ 2016-06-22 13:30 ` Stefan Schmidt
2016-06-27 6:03 ` Marcel Holtmann
2 siblings, 0 replies; 6+ messages in thread
From: Stefan Schmidt @ 2016-06-22 13:30 UTC (permalink / raw)
To: Alexander Aring, linux-wpan; +Cc: linux-bluetooth, kernel, dan.carpenter
Hello.
On 21/06/16 10:27, Alexander Aring wrote:
> This patch removes a double unlock case to accessing neighbour private
> data.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Alexander Aring <aar@pengutronix.de>
> ---
> net/6lowpan/ndisc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/6lowpan/ndisc.c b/net/6lowpan/ndisc.c
> index ae1d419..030504e 100644
> --- a/net/6lowpan/ndisc.c
> +++ b/net/6lowpan/ndisc.c
> @@ -135,8 +135,9 @@ static int lowpan_ndisc_opt_addr_space(const struct net_device *dev,
> read_unlock_bh(&neigh->lock);
> addr_space += __ndisc_opt_addr_space(IEEE802154_SHORT_ADDR_LEN, 0);
> *ha = ha_buf;
> + } else {
> + read_unlock_bh(&neigh->lock);
> }
> - read_unlock_bh(&neigh->lock);
> break;
> case NDISC_NEIGHBOUR_ADVERTISEMENT:
> case NDISC_NEIGHBOUR_SOLICITATION:
Dan, thanks for finding this one!
Reviewed-by: Stefan Schmidt<stefan@osg.samsung.com> regards Stefan Schmidt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bluetooth-next 2/2] 6lowpan: ndisc: add missing 802.15.4 only check
2016-06-21 8:27 ` [PATCH bluetooth-next 2/2] 6lowpan: ndisc: add missing 802.15.4 only check Alexander Aring
@ 2016-06-22 13:36 ` Stefan Schmidt
2016-06-27 6:04 ` Marcel Holtmann
1 sibling, 0 replies; 6+ messages in thread
From: Stefan Schmidt @ 2016-06-22 13:36 UTC (permalink / raw)
To: Alexander Aring, linux-wpan; +Cc: linux-bluetooth, kernel, dan.carpenter
Hello.
On 21/06/16 10:27, Alexander Aring wrote:
> This patch adds a missing check to handle short address parsing for
> 802.15.4 6LoWPAN only.
>
> Signed-off-by: Alexander Aring <aar@pengutronix.de>
> ---
> net/6lowpan/ndisc.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/6lowpan/ndisc.c b/net/6lowpan/ndisc.c
> index 030504e..79c5fa9 100644
> --- a/net/6lowpan/ndisc.c
> +++ b/net/6lowpan/ndisc.c
> @@ -47,6 +47,9 @@ static int lowpan_ndisc_parse_options(const struct net_device *dev,
> struct nd_opt_hdr *nd_opt,
> struct ndisc_options *ndopts)
> {
> + if (!lowpan_is_ll(dev, LOWPAN_LLTYPE_IEEE802154))
> + return 0;
> +
> switch (nd_opt->nd_opt_type) {
> case ND_OPT_SOURCE_LL_ADDR:
> case ND_OPT_TARGET_LL_ADDR:
Reviewed-by: Stefan Schmidt<stefan@osg.samsung.com> regards Stefan Schmidt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bluetooth-next 1/2] 6lowpan: ndisc: fix double read unlock
2016-06-21 8:27 [PATCH bluetooth-next 1/2] 6lowpan: ndisc: fix double read unlock Alexander Aring
2016-06-21 8:27 ` [PATCH bluetooth-next 2/2] 6lowpan: ndisc: add missing 802.15.4 only check Alexander Aring
2016-06-22 13:30 ` [PATCH bluetooth-next 1/2] 6lowpan: ndisc: fix double read unlock Stefan Schmidt
@ 2016-06-27 6:03 ` Marcel Holtmann
2 siblings, 0 replies; 6+ messages in thread
From: Marcel Holtmann @ 2016-06-27 6:03 UTC (permalink / raw)
To: Alexander Aring; +Cc: linux-wpan, linux-bluetooth, kernel, dan.carpenter
Hi Alex,
> This patch removes a double unlock case to accessing neighbour private
> data.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Alexander Aring <aar@pengutronix.de>
> ---
> net/6lowpan/ndisc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bluetooth-next 2/2] 6lowpan: ndisc: add missing 802.15.4 only check
2016-06-21 8:27 ` [PATCH bluetooth-next 2/2] 6lowpan: ndisc: add missing 802.15.4 only check Alexander Aring
2016-06-22 13:36 ` Stefan Schmidt
@ 2016-06-27 6:04 ` Marcel Holtmann
1 sibling, 0 replies; 6+ messages in thread
From: Marcel Holtmann @ 2016-06-27 6:04 UTC (permalink / raw)
To: Alexander Aring; +Cc: linux-wpan, linux-bluetooth, kernel, dan.carpenter
Hi Alex,
> This patch adds a missing check to handle short address parsing for
> 802.15.4 6LoWPAN only.
>
> Signed-off-by: Alexander Aring <aar@pengutronix.de>
> ---
> net/6lowpan/ndisc.c | 3 +++
> 1 file changed, 3 insertions(+)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-06-27 6:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-21 8:27 [PATCH bluetooth-next 1/2] 6lowpan: ndisc: fix double read unlock Alexander Aring
2016-06-21 8:27 ` [PATCH bluetooth-next 2/2] 6lowpan: ndisc: add missing 802.15.4 only check Alexander Aring
2016-06-22 13:36 ` Stefan Schmidt
2016-06-27 6:04 ` Marcel Holtmann
2016-06-22 13:30 ` [PATCH bluetooth-next 1/2] 6lowpan: ndisc: fix double read unlock Stefan Schmidt
2016-06-27 6:03 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).