linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: "Kalle Valo" <kvalo@adurom.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org,
	"Fengguang Wu" <fengguang.wu@intel.com>,
	"Franky Lin" <frankyl@broadcom.com>
Subject: Re: [PATCH] brcmfmac: check return from kzalloc in brcmf_fweh_process_event
Date: Tue, 20 Nov 2012 20:51:39 +0100	[thread overview]
Message-ID: <50ABDF4B.5020506@broadcom.com> (raw)
In-Reply-To: <87y5hwwvtg.fsf@purkki.adurom.net>

On 11/20/2012 08:57 AM, Kalle Valo wrote:
> "Arend van Spriel" <arend@broadcom.com> writes:
>
>> On 11/19/2012 04:53 PM, John W. Linville wrote:
>>> From: "John W. Linville" <linville@tuxdriver.com>
>>>
>>> Signed-off-by: John W. Linville <linville@tuxdriver.com>
>>> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
>
> [...]
>
>>>    	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


      reply	other threads:[~2012-11-20 19:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19 15:53 [PATCH] brcmfmac: check return from kzalloc in brcmf_fweh_process_event John W. Linville
2012-11-19 17:39 ` Arend van Spriel
2012-11-20  7:57   ` Kalle Valo
2012-11-20 19:51     ` Arend van Spriel [this message]

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=50ABDF4B.5020506@broadcom.com \
    --to=arend@broadcom.com \
    --cc=fengguang.wu@intel.com \
    --cc=frankyl@broadcom.com \
    --cc=kvalo@adurom.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).