All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, Lennert Buytenhek <buytenh@marvell.com>
Subject: Re: [PATCH] mwl8k: use integral index instead of pointer for driver_data
Date: Fri, 6 Nov 2009 22:56:59 +0100	[thread overview]
Message-ID: <200911062257.01590.mb@bu3sch.de> (raw)
In-Reply-To: <1257543727-5449-1-git-send-email-linville@tuxdriver.com>

On Friday 06 November 2009 22:42:07 John W. Linville wrote:
> @@ -3379,7 +3378,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
>  	priv = hw->priv;
>  	priv->hw = hw;
>  	priv->pdev = pdev;
> -	priv->device_info = (void *)id->driver_data;
> +	priv->device_info = &mwl8k_info_tbl[id->driver_data];
>  	priv->rxd_ops = priv->device_info->rxd_ops;
>  	priv->sniffer_enabled = false;
>  	priv->wmm_enabled = false;

What about a sanity check for id->driver_data on the array range? Otherwise one could crash
the kernel with sysfs/new_id by accident, as far as I can tell.

-- 
Greetings, Michael.

  reply	other threads:[~2009-11-06 21:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-06 21:42 [PATCH] mwl8k: use integral index instead of pointer for driver_data John W. Linville
2009-11-06 21:56 ` Michael Buesch [this message]
2009-11-06 22:01   ` Michael Buesch

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=200911062257.01590.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=buytenh@marvell.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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 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.