All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Christian Lamparter <chunkeey@googlemail.com>
Cc: John W Linville <linville@tuxdriver.com>,
	chaoming_li@realsil.com.cn, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] rtlwifi: Fix panic due to memory allocation failure
Date: Wed, 11 May 2011 11:36:16 -0500	[thread overview]
Message-ID: <4DCABB00.6000709@lwfinger.net> (raw)
In-Reply-To: <201105111828.26261.chunkeey@googlemail.com>

On 05/11/2011 11:28 AM, Christian Lamparter wrote:
> On Wednesday 11 May 2011 18:17:51 Larry Finger wrote:
>> The PCI routine of this driver is allocating receive buffers of order 2,
>> which causes an unnecessary fragmentation of memory. To make matters
>> worse, there are locations that fail to check for allocation failures,
>> or return success when the allocation actually failed. Kernel panics
>> result.
>>
>> Signed-off-by: Larry Finger<Larry.Finger@lwfinger.net>
>> Cc: Stable<stable@vger.kernel.org>               [2.6.37 and 2.6.38]
>> ---
>>
>> John,
>>
>> This is 2.6.39 material. I hope we make the cutoff.
>>
>> Larry
>> ---
>>
>> Index: wireless-testing-new/drivers/net/wireless/rtlwifi/pci.c
>> ===================================================================
>> --- wireless-testing-new.orig/drivers/net/wireless/rtlwifi/pci.c
>> +++ wireless-testing-new/drivers/net/wireless/rtlwifi/pci.c
>> @@ -996,7 +998,7 @@ static void _rtl_pci_init_trx_var(struct
>>   	 */
>>   	rtlpci->txringcount[BE_QUEUE] = RT_TXDESC_NUM_BE_QUEUE;
>>
>> -	rtlpci->rxbuffersize = 9100;	/*2048/1024; */
>> +	rtlpci->rxbuffersize = 4096;
>>   	rtlpci->rxringcount = RTL_PCI_MAX_RX_COUNT;	/*64; */
>>   }
>>
> Are you sure this change won't break 8k AMSDU rx?
> [or is there some magic that disables disable_amsdu_8k
> for pci devices?]

It is disabled in the newest driver that is not yet submitted, but not in the 
two other PCI drivers. I need to rework this patch.

John - please drop it.

Larry

      reply	other threads:[~2011-05-11 16:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-11 16:17 [PATCH] rtlwifi: Fix panic due to memory allocation failure Larry Finger
2011-05-11 16:28 ` Christian Lamparter
2011-05-11 16:36   ` Larry Finger [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=4DCABB00.6000709@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=chaoming_li@realsil.com.cn \
    --cc=chunkeey@googlemail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.