Search Linux Wireless

Re: patch staging-add-w35und-wifi-driver.patch added to gregkh-2.6 tree

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

 



On Thu, Oct 02, 2008 at 01:05:09AM +0200, Ian Schram wrote:
> > +
> > +static int wbsoft_tx(struct ieee80211_hw *dev, struct sk_buff *skb,
> > +		      struct ieee80211_tx_control *control)
> > +{
> > +	char *buffer = kmalloc(skb->len, GFP_ATOMIC);
> > +	printk("Sending frame %d bytes\n", skb->len);
> > +	memcpy(buffer, skb->data, skb->len);
> > +	if (1 == MLMESendFrame(my_adapter, buffer, skb->len, FRAME_TYPE_802_11_MANAGEMENT))
> > +		printk("frame sent ok (%d bytes)?\n", skb->len);
> > +	return NETDEV_TX_OK;
> > +}
> > +
> 
> Looks to me, that this is an Oops waiting to happen, might be cautious to check
> if kmalloc succeeded, before copying to the address.

Patches gladly accepted :)

thanks,

greg k-h
--
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