Search Linux Wireless

Re: [PATCH] mwl8k: use integral index instead of pointer for driver_data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 06 November 2009 22:56:59 Michael Buesch wrote:
> 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.
> 

Ok docs say that:
> Note that driver_data must match the value used by any of the pci_device_id
> entries defined in the driver. 

So ignore me.

-- 
Greetings, Michael.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux