From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754011AbcAEGWK (ORCPT ); Tue, 5 Jan 2016 01:22:10 -0500 Received: from mga11.intel.com ([192.55.52.93]:20685 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751168AbcAEGWI convert rfc822-to-8bit (ORCPT ); Tue, 5 Jan 2016 01:22:08 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,524,1444719600"; d="scan'208";a="874748022" From: "Du, Changbin" To: Peter Chen CC: "balbi@ti.com" , "gregkh@linuxfoundation.org" , "viro@zeniv.linux.org.uk" , "mina86@mina86.com" , "r.baldyga@samsung.com" , "rui.silva@linaro.org" , "k.opasiak@samsung.com" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] usb: f_fs: avoid race condition with ffs_epfile_io_complete Thread-Topic: [PATCH] usb: f_fs: avoid race condition with ffs_epfile_io_complete Thread-Index: AQHRQgSS9Vw1C2L0rkerhuXRijc5XZ7ryTMAgACPA8D//5c4AIAAjgAA Date: Tue, 5 Jan 2016 06:22:02 +0000 Message-ID: <0C18FE92A7765D4EB9EE5D38D86A563A05C94106@SHSMSX103.ccr.corp.intel.com> References: <1451371018-14918-1-git-send-email-changbin.du@intel.com> <20160105033216.GA29244@shlinux2> <0C18FE92A7765D4EB9EE5D38D86A563A05C93F77@SHSMSX103.ccr.corp.intel.com> <20160105054906.GB29244@shlinux2> In-Reply-To: <20160105054906.GB29244@shlinux2> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > You are right, but the problem is the request->status is wrong. If the data > > send out but report caller as -EINTR, it will introduce duplicate-send > > issue. > > > > Why -EINTR, the kernel-doc said it should return -ECONNRESET for active > request, see include/linux/usb/gadget.h. > > -- > > Best Regards, > Peter Chen F_fs return -EINTER in its dequeuer case, not udc driver. What I want to say is driver should return the right status for each usb request.