linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gertjan van Wingerde <gwingerde@gmail.com>
To: Felix Fietkau <nbd@openwrt.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	John Linville <linville@tuxdriver.com>,
	Stanislaw Gruszka <sgruszka@redhat.com>
Subject: Re: [PATCH] rt2x00: fix a crash bug in the HT descriptor handling fix
Date: Fri, 15 Nov 2013 09:39:45 +0100	[thread overview]
Message-ID: <CAL1gcdORndm_fQ6G7uwWwuJfTyWrrHvxBA4WbDqwW8Nx7cJ0Jw@mail.gmail.com> (raw)
In-Reply-To: <1384461195-37185-1-git-send-email-nbd@openwrt.org>

On Thu, Nov 14, 2013 at 9:33 PM, Felix Fietkau <nbd@openwrt.org> wrote:
> Commit "rt2x00: fix HT TX descriptor settings regression"
> assumes that the control parameter to rt2x00mac_tx is always non-NULL.
> There is an internal call in rt2x00lib_bc_buffer_iter where NULL is
> passed. Fix the resulting crash by adding an initialized dummy on-stack
> ieee80211_tx_control struct.
>
> Cc: stable@vger.kernel.org # 3.7+
> Signed-off-by: Felix Fietkau <nbd@openwrt.org>

Good catch!

Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>

> ---
>  drivers/net/wireless/rt2x00/rt2x00dev.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
> index 080b1fc..9dd92a7 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00dev.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
> @@ -181,6 +181,7 @@ static void rt2x00lib_autowakeup(struct work_struct *work)
>  static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac,
>                                      struct ieee80211_vif *vif)
>  {
> +       struct ieee80211_tx_control control = {};
>         struct rt2x00_dev *rt2x00dev = data;
>         struct sk_buff *skb;
>
> @@ -195,7 +196,7 @@ static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac,
>          */
>         skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
>         while (skb) {
> -               rt2x00mac_tx(rt2x00dev->hw, NULL, skb);
> +               rt2x00mac_tx(rt2x00dev->hw, &control, skb);
>                 skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
>         }
>  }
> --
> 1.8.3.4 (Apple Git-47)
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
---
Gertjan

      reply	other threads:[~2013-11-15  8:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-14 20:33 [PATCH] rt2x00: fix a crash bug in the HT descriptor handling fix Felix Fietkau
2013-11-15  8:39 ` Gertjan van Wingerde [this message]

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=CAL1gcdORndm_fQ6G7uwWwuJfTyWrrHvxBA4WbDqwW8Nx7cJ0Jw@mail.gmail.com \
    --to=gwingerde@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=nbd@openwrt.org \
    --cc=sgruszka@redhat.com \
    /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 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).