From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753303AbcEZGZP (ORCPT ); Thu, 26 May 2016 02:25:15 -0400 Received: from mga14.intel.com ([192.55.52.115]:57150 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753058AbcEZGZN (ORCPT ); Thu, 26 May 2016 02:25:13 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,366,1459839600"; d="asc'?scan'208";a="984969838" From: Felipe Balbi To: Baolin Wang , gregkh@linuxfoundation.org Cc: broonie@kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, baolin.wang@linaro.org Subject: Re: [PATCH] dwc3: gadget: Introduce dwc3_endpoint_xfer_xxx() to check endpoint type In-Reply-To: <7eb2c730f54f117438b6111bb63799a5d8c7249c.1464238593.git.baolin.wang@linaro.org> References: <7eb2c730f54f117438b6111bb63799a5d8c7249c.1464238593.git.baolin.wang@linaro.org> User-Agent: Notmuch/0.22+11~g124a67e (http://notmuchmail.org) Emacs/25.0.93.2 (x86_64-pc-linux-gnu) Date: Thu, 26 May 2016 09:22:54 +0300 Message-ID: <87eg8pqqwx.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Baolin Wang writes: > When handling the endpoint interrupt handler, it maybe disable the endpoi= nt > from another core user to set the USB endpoint descriptor pointor to be N= ULL > while issuing usb_gadget_giveback_request() function to release lock. So = it > will be one bug to check the endpoint type by usb_endpoint_xfer_xxx() API= s with > one NULL USB endpoint descriptor. too complex, Baolin :-) Can you see if this helps: https://git.kernel.org/cgit/linux/kernel/git/balbi/usb.git/commit/?id=3D88b= f752cfb55e57a78e27c931c9fef63240c739a The only situation when that can happen is while we drop our lock on dwc3_gadget_giveback(). =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXRpY+AAoJEIaOsuA1yqRE+ZkQAIvdmsaAVb6vW8Js0emivrV6 cOOEgaC2OpqAex5qkCYrhBo82f8SxxN/qGQJR7ryB1hlXWUAYLkQEmKgZ1g87pHs S/iYSP75ClcxsVhLOgoo0P96aiNav2/Osc2mYPwwVv1lQV6nHSyAVXXt3+uDEs0/ wYTPQXnrNGueSh5L6BC1fgXjeBhyWEpBBPYtnAkdbMY7g9DPFRprRUu4DnqAO9pr /sCbqBpsWGb1ARy20w3fdO0aIZL6Ep0Kxj0dNa7JWwqZDc745WAmWkJ5Q2MbO6Gc DAcic8oAwNuaqZxvlRG2/5+CdqGlj5PqSXr05VMpazos1qJGWcfT7I8yr9kVVN4g wZO+WzMs+mHIbr0NbZQ8CKjBmHzIN0XbMyRZZE9tyfP26FI8tVgPi8FwAV0wLWa8 dVpnT9/pnTOHAu0IggelpCKqCtq7QaErmdshyV/d3yZ+5zKVnc/2VnPoNi0fJmiR uK/agWnzKHbPZ/VFVmKWM2KLbiOYCvFeQLMwhT+ki2vOiqsvdbL+isqIKC1rTJRU bG1bER4qZ2g6thTZcOwsFSKP8npbjzPK4q5iEvZNAZhVcBNS02lM1jSwR/boP+p1 dBI0/6dPYamg3KBV+sBJ8pyF92uH+FLh1z9sPCmNm1qzelX1L1bsktnsmHQEl/gl k7Q7bz1R2kdUHUOCZsIB =PmRt -----END PGP SIGNATURE----- --=-=-=--