Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751833AbdITI06 (ORCPT ); Wed, 20 Sep 2017 04:26:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:35026 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751554AbdITI04 (ORCPT ); Wed, 20 Sep 2017 04:26:56 -0400 Message-ID: <1505895810.27967.1.camel@suse.com> Subject: Re: [RFC PATCH 2/3] usbnet: Avoid potential races in usbnet_deferred_kevent() From: Oliver Neukum To: Guenter Roeck Cc: Douglas Anderson , Guenter Roeck , Grant Grundler , linux-kernel , linux-usb@vger.kernel.org, netdev@vger.kernel.org Date: Wed, 20 Sep 2017 10:23:30 +0200 In-Reply-To: References: <20170919161522.995-1-dianders@chromium.org> <20170919161522.995-2-dianders@chromium.org> <1505853476.15836.9.camel@suse.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 699 Lines: 25 Am Dienstag, den 19.09.2017, 13:51 -0700 schrieb Guenter Roeck: > On Tue, Sep 19, 2017 at 1:37 PM, Oliver Neukum wrote: > > > > Am Dienstag, den 19.09.2017, 09:15 -0700 schrieb Douglas Anderson: > > > [..] > > > NOTES: > > > - No known bugs are fixed by this; it's just found by code inspection. > > > > Hi, > > > > unfortunately the patch is wrong. The flags must be cleared only > > in case the handler is successful. That is not guaranteed. > > > > Just out of curiosity, what is the retry mechanism ? Whenever a new, > possibly unrelated, event is scheduled ? Hi, that actually depends on the flag. Look at the case of fail_lowmem. There we reschedule. HTH Oliver