Search Linux Wireless

Re: [PATCH] brcmfmac: check return from kzalloc in brcmf_fweh_process_event

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

 



On 11/20/2012 08:57 AM, Kalle Valo wrote:
"Arend van Spriel" <arend@xxxxxxxxxxxx> writes:

On 11/19/2012 04:53 PM, John W. Linville wrote:
From: "John W. Linville" <linville@xxxxxxxxxxxxx>

Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
Reported-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>

[...]

   	event = kzalloc(sizeof(*event) + datalen, alloc_flag);
+	if (!event)

My fix included a debug statement about the discarded event from firmware.

Someone once suggested that memory allocation errors should not be
printed by the drivers as the memory subsystem does that anyway. No idea
if that's a good advice or not, but I try to follow it.


Hi Kalle,

In general, I follow the same suggestion. However, in this particular code path we are handling an event message from the device, which is being discarded due to the allocation failure. That could be derived from the trace that kzalloc spews, but I preferred to have it explicitly stated in the logs.

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