Return-path: Received: from na3sys009aog131.obsmtp.com ([74.125.149.247]:60080 "EHLO na3sys009aog131.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755001Ab3CSGTr (ORCPT ); Tue, 19 Mar 2013 02:19:47 -0400 From: Bing Zhao To: Daniel Drake CC: "linux-wireless@vger.kernel.org" , John Rhodes , Amitkumar Karwar Date: Mon, 18 Mar 2013 23:19:25 -0700 Subject: RE: mwifiex crash when removing interface while scanning Message-ID: <477F20668A386D41ADCC57781B1F70430D9DAD430D@SC-VEXCH1.marvell.com> (sfid-20130319_071952_840806_362BC5DD) References: <477F20668A386D41ADCC57781B1F70430D9D6CE59E@SC-VEXCH1.marvell.com> <477F20668A386D41ADCC57781B1F70430D9D6CE6CD@SC-VEXCH1.marvell.com> <477F20668A386D41ADCC57781B1F70430D9D6CE95B@SC-VEXCH1.marvell.com> <477F20668A386D41ADCC57781B1F70430D9D6CEC9D@SC-VEXCH1.marvell.com> <477F20668A386D41ADCC57781B1F70430D9D9C1608@SC-VEXCH1.marvell.com> <477F20668A386D41ADCC57781B1F70430D9D9C2199@SC-VEXCH1.marvell.com> <477F20668A386D41ADCC57781B1F70430D9DAD3AE4@SC-VEXCH1.marvell.com> In-Reply-To: <477F20668A386D41ADCC57781B1F70430D9DAD3AE4@SC-VEXCH1.marvell.com> Content-Type: multipart/mixed; boundary="_002_477F20668A386D41ADCC57781B1F70430D9DAD430DSCVEXCH1marve_" MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: --_002_477F20668A386D41ADCC57781B1F70430D9DAD430DSCVEXCH1marve_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Daniel, > > That seems to avoid the issue. I'm worried that it suggests some more > > significant lower-level bug, but I guess for now it would make sense > > to finish off those 2 patches you already posted, and investigate the > > possible cmd_pending leak, before revisiting this. >=20 > Thanks for testing. I will fine tune the 2 patches and resend the updated= version to the list. > The cmd_pending leak will be investigated too. Please try attached patch on top of the 3 patches I sent last Friday. Thanks, Bing --_002_477F20668A386D41ADCC57781B1F70430D9DAD430DSCVEXCH1marve_ Content-Type: application/octet-stream; name="0001-mwifiex-fix-negative-cmd_pending-count.patch" Content-Description: 0001-mwifiex-fix-negative-cmd_pending-count.patch Content-Disposition: attachment; filename="0001-mwifiex-fix-negative-cmd_pending-count.patch"; size=3417; creation-date="Tue, 19 Mar 2013 06:08:53 GMT"; modification-date="Tue, 19 Mar 2013 06:08:53 GMT" Content-Transfer-Encoding: base64 RnJvbSBkNDUxNDQ3MGExODk3YjlhNmZmZGE1M2NlY2Q4ZmMyMjgwY2ViZDFlIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBCaW5nIFpoYW8gPGJ6aGFvQG1hcnZlbGwuY29tPgpEYXRlOiBN b24sIDE4IE1hciAyMDEzIDIwOjMyOjM4IC0wNzAwClN1YmplY3Q6IFtQQVRDSF0gbXdpZmlleDog Zml4IG5lZ2F0aXZlIGNtZF9wZW5kaW5nIGNvdW50CgpjbWRfcGVuZGluZyBpcyBpbmNyZWFzZWQg aW4gbXdpZmlleF93YWl0X3F1ZXVlX2NvbXBsZXRlKCkgYW5kCmRlY3JlYXNlZCBpbiBtd2lmaWV4 X2NvbXBsZXRlX2NtZCgpIGN1cnJlbnRseS4KSWYgdGhlcmUgYXJlIHR3byBvciBtb3JlIGNvbW1h bmRzIGluIHRoZSBjbWRfcGVuZGluZ19xIHRoZSBtYWluCndvcmtlciB0aHJlYWQgd2lsbCBwaWNr IHVwIG5leHQgY29tbWFuZCBmcm9tIGNtZF9wZW5kaW5nX3EKYXV0b21hdGljYWxseSBhZnRlciBm aW5pc2hpbmcgY3VycmVudCBjb21tYW5kLiBBcyBhIHJlc3VsdAptd2lmaWV4X3dhaXRfcXVldWVf Y29tcGxldGUoKSB3aWxsIG5vdCBiZSBjYWxsZWQgYmVjYXVzZQp0aGUgY29tbWFuZCBpcyBhbHJl YXkgY29tcGxldGVkLiBUaG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