Search Linux Wireless

Re: [PATCH wireless-next] brcmsmac: avoid 512 byte stack variable

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

 



On 02/07/2013 09:19 PM, Joe Perches wrote:
> On Thu, 2013-02-07 at 13:13 -0700, Tim Gardner wrote:
>> Dynamically allocate the probe response template which
>> avoids potential stack corruption. Observed with smatch:
> 
> trivial:
> 
>> diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
> []
>> @@ -7408,9 +7408,16 @@ brcms_c_bss_update_probe_resp(struct brcms_c_info *wlc,
> []
>> +	prb_resp = kmalloc(BCN_TMPL_LEN, GFP_ATOMIC);
>> +	if (!prb_resp) {
>> +		wiphy_err(wlc->wiphy, "wl: %s: failed to alloc %u bytes\n",
>> +			__func__, BCN_TMPL_LEN);
> 
> Please remove the error message.
> alloc's don't need specific OOM messages.
> 
> The mm subsystem already provides a standardized
> message with a dump_stack().

You beat me to the finish line :-)

Gr. AvS


--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux