Return-path: Received: from mail-wg0-f49.google.com ([74.125.82.49]:62502 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754688AbaCOQJk (ORCPT ); Sat, 15 Mar 2014 12:09:40 -0400 MIME-Version: 1.0 In-Reply-To: <1394898081.30941.5.camel@jlt4.sipsolutions.net> References: <20140305125703.GA7193@localhost> <20140305132317.GB10880@localhost> <20140308121138.GA8359@localhost> <20140312173446.GD2983@piware.de> <1394896841.30941.4.camel@jlt4.sipsolutions.net> <1394898081.30941.5.camel@jlt4.sipsolutions.net> From: Krishna Chaitanya Date: Sat, 15 Mar 2014 21:39:18 +0530 Message-ID: (sfid-20140315_171004_993209_CE9AB227) Subject: Re: [mac80211_hwsim] BUG: unable to handle kernel paging request at ce1db404 To: Johannes Berg Cc: Martin Pitt , Fengguang Wu , linux-wireless , netdev , linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Sat, Mar 15, 2014 at 9:11 PM, Johannes Berg wrote: > On Sat, 2014-03-15 at 21:03 +0530, Krishna Chaitanya wrote: > >> > > what RC are u using? Default should be minstrel, i dont see >> > > a reason for rc alloc to fail (remote reason kmalloc failure), >> > > so did you disable RC completely? No prints either w.r.t RC either in >> > > dmesg? >> > >> > Pay attention to the .config. >> > >> Missed the attachment, thanks for pointing. >> As guessed the rate control is empty causing the registration fail. > > It still shouldn't crash though. Looks like there's a fix in this > thread, can somebody verify & post it? > Yes, it should not crash. The change suggested by martin is not correct there is no double free as the the list he mentioned will be empty. (Only after successful registration we will add the radio to the list) the problem here is platform_driver_unregister internally calls the driver_unregister which tries to get the kobject through get_device, but we have already freed the kobject using device_unregister (which calls device_del which frees the kobject). In other failures cases we use mac80211_hwsim_free() and return, so the call to platform_driver_unregister is not there, hence no crash.