Return-path: Received: from mail-ww0-f42.google.com ([74.125.82.42]:59355 "EHLO mail-ww0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752231Ab0KHTIs convert rfc822-to-8bit (ORCPT ); Mon, 8 Nov 2010 14:08:48 -0500 Received: by wwc33 with SMTP id 33so331811wwc.1 for ; Mon, 08 Nov 2010 11:08:47 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <201011042037.00178.IvDoorn@gmail.com> <201011042040.12419.IvDoorn@gmail.com> <201011042040.47235.IvDoorn@gmail.com> <201011042041.06812.IvDoorn@gmail.com> Date: Mon, 8 Nov 2010 11:08:46 -0800 Message-ID: Subject: Re: [PATCH 11/13] rt2x00: Fix crash on USB unplug From: Blaise Gassend To: Ivo Van Doorn Cc: Julian Calaby , linux-wireless@vger.kernel.org, Helmut Schaa Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: >>>> + ? ? ? if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) || >>>> + ? ? ? ? ? !test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) >>>> + ? ? ? ? ? ? ? goto submit_entry; >>>> + >>>> ? ? ? ?if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags)) >>>> ? ? ? ? ? ? ? ?goto submit_entry; > I don't see how this could cause a crash, I know there are still issues > around this function, but how can the usage of 2 if-statement cause a crash? What I meant here is that submit_entry does not kill the queue entry if data IO failed, which could result in an infinite loop if a disconnected device is causing the data IO case to be hit rather than one of the two previous ones. Blaise