Re: [staging: r8192ee] WARNING: CPU: 0 PID: 1 at net/mac80211/rate.c:43 ieee80211_rate_control_register()

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

 



On 05/26/2014 09:55 AM, Jet Chen wrote:

Jet,

0day kernel testing robot got the below dmesg and the first bad commit is

git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next
commit 0629f3b8c33899140b48d5897259eab8ebae78ca
Author:     Larry Finger <Larry.Finger@xxxxxxxxxxxx>
AuthorDate: Wed May 21 16:25:36 2014 -0500
Commit:     Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
CommitDate: Fri May 23 11:33:56 2014 +0900

     staging: r8192ee: Turn on build of the new driver
         In addition, this commit contains a TODO file for this driver
         Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
     Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

The splat comes from the driver trying to register a rate-control algorithm that is already registered. That could happen because a driver is calling the registration routine twice, or because more than one driver is using the same routine name. As I think there is code to prevent the former, and I have never seen that splat here, I suspect that more than one driver has used the name. On my real hardware, I can only have one of these devices in the machine at a time.

Is if possible to test the attached patch to see if it fixes the problem? If not, could you get a listing of the loaded modules at the time of the splat? If this is not the fix, I will try to duplicate it here.

Thanks,

Larry

>From ea453949765b07692e384a1d4fd36b83311e8c80 Mon Sep 17 00:00:00 2001
From: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
Date: Mon, 26 May 2014 11:45:52 -0500
Subject: [PATCH] staging: r8192ee: Fix kernel WARN splat associated with rate
 control
To: gregkh@xxxxxxxxxxxxxxxxxxx
Cc: netdev@xxxxxxxxxxxxxxx,
    devel@xxxxxxxxxxxxxxxxxxxx

The 0day kernel testing robot got the kernel warning caused by trying
to register a particular rate-control algorithm more than once. I believe
that the core already protects against a particular driver doing the
registration more than once, but an analysis of the code reveals that
the identical name is used for the rtlwifi drivers in the regular
wireless tree, and the staging drivers r8192ee and r8821ae. The fix
is to rename the algorithm used in r8192ee.

Reported-by: Jet Chen <jet.chen@xxxxxxxxx>
Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
---
 drivers/staging/rtl8192ee/rc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192ee/rc.c b/drivers/staging/rtl8192ee/rc.c
index f0ce6a9..c4c34dd 100644
--- a/drivers/staging/rtl8192ee/rc.c
+++ b/drivers/staging/rtl8192ee/rc.c
@@ -267,7 +267,7 @@ static void rtl_rate_free_sta(void *rtlpriv,
 }
 
 static struct rate_control_ops rtl_rate_ops = {
-	.name = "rtl_rc",
+	.name = "rtl_rc_92e",
 	.alloc = rtl_rate_alloc,
 	.free = rtl_rate_free,
 	.alloc_sta = rtl_rate_alloc_sta,
-- 
1.8.4.5

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux