From patchwork Sat Jun 4 02:54:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linyu Yuan X-Patchwork-Id: 12869527 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97FF1CCA473 for ; Sat, 4 Jun 2022 02:55:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344078AbiFDCzJ (ORCPT ); Fri, 3 Jun 2022 22:55:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232272AbiFDCzJ (ORCPT ); Fri, 3 Jun 2022 22:55:09 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95E331EAC3; Fri, 3 Jun 2022 19:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1654311307; x=1685847307; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=xi1E92UnyzuRK698EaMWh0bgPz9x9TqRAxQCVUD2aJo=; b=dazk+UM2bOOF6+PQUXSRJRhf8A7vbRRRp4oRgo/SAPdHdErWifjw66/D CnPmEYvNZsT3zT6a85CjaG66cwWjdfhdk1EPqM8yICTEMyo2NvjIu+oNF +ilHVp87q+dhSIi0UQhEA4JcxsH6YfZf8z+zzGIx0MIrIXN6anHSCzFi9 M=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-02.qualcomm.com with ESMTP; 03 Jun 2022 19:55:07 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg02-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2022 19:55:06 -0700 Received: from nalasex01b.na.qualcomm.com (10.47.209.197) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 3 Jun 2022 19:55:06 -0700 Received: from linyyuan-gv.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 3 Jun 2022 19:55:04 -0700 From: Linyu Yuan To: Felipe Balbi , Greg Kroah-Hartman CC: , , Jack Pham , Michael Wu , "John Keeping" , Linyu Yuan Subject: [PATCH v4 0/2] usb: f_fs: safe operation in ffs_epfile_io() Date: Sat, 4 Jun 2022 10:54:53 +0800 Message-ID: <1654311295-9700-1-git-send-email-quic_linyyuan@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Fix two possible issue in ffs_epfile_io() when operation at blocking mode. v1: https://lore.kernel.org/linux-usb/1653989775-14267-1-git-send-email-quic_linyyuan@quicinc.com/ v2: correct interrupted variable according comment from John Keeping v3: (v2: https://lore.kernel.org/linux-usb/1654006119-23869-1-git-send-email-quic_linyyuan@quicinc.com/) add Revived-by from John keeping, after offline discussion, add Reported-by from Michael Wu v4: (v3: https://lore.kernel.org/linux-usb/1654056916-2062-1-git-send-email-quic_linyyuan@quicinc.com/) add Cc: # 5.15 (seem other branch can't aplly cleanly), add Tested-by: Michael Wu , remove one empty line to keep original code format. Linyu Yuan (2): usb: gadget: f_fs: change ep->status safe in ffs_epfile_io() usb: gadget: f_fs: change ep->ep safe in ffs_epfile_io() drivers/usb/gadget/function/f_fs.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-)