Message ID | 20160621082719.9903-1-aar@pengutronix.de (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-wpan" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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 -- To unsubscribe from this list: send the line "unsubscribe linux-wpan" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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:
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(-)