All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gustavo F. Padovan" <gustavo@padovan.org>
To: Dan Carpenter <error27@gmail.com>
Cc: Jiri Pirko <jpirko@redhat.com>,
	linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: potential bug in bnep_net_set_mc_list()
Date: Fri, 18 Jun 2010 21:22:13 -0300	[thread overview]
Message-ID: <20100619002213.GC14514@vigoh> (raw)
In-Reply-To: <20100618230916.GA5467@bicker>

Hi Dan,

* Dan Carpenter <error27@gmail.com> [2010-06-19 01:09:17 +0200]:

> This is from ff6e2163f28a: "net: convert multiple drivers to use
> netdev_for_each_mc_addr, part7"
> 
> net/bluetooth/bnep/netdev.c
>    101                  i = 0;
>    102                  netdev_for_each_mc_addr(ha, dev) {
>    103                          if (i == BNEP_MAX_MULTICAST_FILTERS)
>                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
>    104                                  break;
>    105                          memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN);
>    106                          memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN);
>    107                  }
> 
> "i" is never incremented here so the check is always false.

Bring back the increment should fix this. I'll send a fix for this.

-- 
Gustavo F. Padovan
http://padovan.org

WARNING: multiple messages have this Message-ID (diff)
From: "Gustavo F. Padovan" <gustavo-THi1TnShQwVAfugRpC6u6w@public.gmane.org>
To: Dan Carpenter <error27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Jiri Pirko <jpirko-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: potential bug in bnep_net_set_mc_list()
Date: Fri, 18 Jun 2010 21:22:13 -0300	[thread overview]
Message-ID: <20100619002213.GC14514@vigoh> (raw)
In-Reply-To: <20100618230916.GA5467@bicker>

Hi Dan,

* Dan Carpenter <error27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> [2010-06-19 01:09:17 +0200]:

> This is from ff6e2163f28a: "net: convert multiple drivers to use
> netdev_for_each_mc_addr, part7"
> 
> net/bluetooth/bnep/netdev.c
>    101                  i = 0;
>    102                  netdev_for_each_mc_addr(ha, dev) {
>    103                          if (i == BNEP_MAX_MULTICAST_FILTERS)
>                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
>    104                                  break;
>    105                          memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN);
>    106                          memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN);
>    107                  }
> 
> "i" is never incremented here so the check is always false.

Bring back the increment should fix this. I'll send a fix for this.

-- 
Gustavo F. Padovan
http://padovan.org

  reply	other threads:[~2010-06-19  0:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-18 23:09 potential bug in bnep_net_set_mc_list() Dan Carpenter
2010-06-18 23:09 ` Dan Carpenter
2010-06-19  0:22 ` Gustavo F. Padovan [this message]
2010-06-19  0:22   ` Gustavo F. Padovan
2010-06-19  0:24   ` [PATCH] Bluetooth: Bring back var 'i' increment Gustavo F. Padovan
2010-06-19  0:24     ` Gustavo F. Padovan
2010-06-19  0:28     ` Gustavo F. Padovan
2010-06-19  0:28       ` Gustavo F. Padovan
2010-06-25  5:08       ` David Miller
2010-06-25  5:08         ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100619002213.GC14514@vigoh \
    --to=gustavo@padovan.org \
    --cc=error27@gmail.com \
    --cc=jpirko@redhat.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.