Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp370336img; Thu, 21 Mar 2019 23:13:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8JZYMGSX5OEVf/6hpLyBW52E4W4pY2b3IO+1/UIJBgCJkjv23eCbQDQFOk3rvA7rsF1IG X-Received: by 2002:a17:902:8d8b:: with SMTP id v11mr7838131plo.241.1553235183552; Thu, 21 Mar 2019 23:13:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553235183; cv=none; d=google.com; s=arc-20160816; b=Pq3WYVyvVrDgX3v0s54nnpviF0TTn8Uh8XGAMtR2XiMT5f7U8seorzo89iXQJIew3M HL1lobEE5sv7p75u+YYtuAPVPFwx8UEFC2CBiTC2ZfcYUlN6GUvtVS7/mreQzuUS8241 zZynqKLdFvZUQHXAQRLW/KAVb5/+QaVscDFCyqQ+65aYDL0QySrmzjUVRauZQ1gL2Ll2 6cU06mKhB4qq0E36DpaTlmp48wavDm9rd0yf7EAuJW4C6Ktuxn9Cv6qrQYXl3uLLaX3B mGt0Hftbt4XQozgwUetSSb5uZHln3c1vL0+QwzGxQZgIX04Hz7xNpCOvh1MMI2UzMOKA FJqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=KDMh8U8wcTQiQqz8MTr7n/97O3pCqLpMKbRUt1AKuK0=; b=lbdjh4e2s4YvJCCxwhsUAbxiNjApdeK5Q8kufIrzZ7jgHxYjnW7xw5wyfj9Azqa+Dt iuvo1kkPdR7bQbyZVnhyAN0uMQulzf6KqgFbfVDRexFGULyog+CgWkjFghLoT+AUyf/4 DMclf2bAdD/D2LKUjKhGIIEQPmxN3hT/x97/ZxBg5Wy2NjVue9aSMbexf7cEXiolEnos /87Yf8T12F8B8FNWINxf2D89V11iRjq9Di7/v3sjM38NfBXQfF2lJ6MKkaqCWHljOl7L aBWaZeLzjfG2wEvSkfdfsOFKEvopIGK66LNy+/oSfJLuGEPhLW4eyJc4AldC4GraFcSo a8Wg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p6si5888813pga.151.2019.03.21.23.12.48; Thu, 21 Mar 2019 23:13:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727720AbfCVGMN convert rfc822-to-8bit (ORCPT + 99 others); Fri, 22 Mar 2019 02:12:13 -0400 Received: from mga17.intel.com ([192.55.52.151]:45966 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727565AbfCVGMN (ORCPT ); Fri, 22 Mar 2019 02:12:13 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Mar 2019 23:12:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,255,1549958400"; d="scan'208";a="144207660" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by orsmga002.jf.intel.com with ESMTP; 21 Mar 2019 23:12:12 -0700 Received: from orsmsx113.amr.corp.intel.com (10.22.240.9) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 21 Mar 2019 23:12:12 -0700 Received: from orsmsx102.amr.corp.intel.com ([169.254.3.192]) by ORSMSX113.amr.corp.intel.com ([169.254.9.249]) with mapi id 14.03.0415.000; Thu, 21 Mar 2019 23:12:11 -0700 From: "Yang, Fei" To: Greg KH CC: "balbi@kernel.org" , "andrzej.p@collabora.com" , "plr.vincent@gmail.com" , "Shen, JingX" , "john.stultz@linaro.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v3] usb: gadget: f_fs: don't free buffer prematurely Thread-Topic: [PATCH v3] usb: gadget: f_fs: don't free buffer prematurely Thread-Index: AQHU4C1+gBTRGRZXck6FOc9ySCJUE6YXl0MA//+UF+A= Date: Fri, 22 Mar 2019 06:12:11 +0000 Message-ID: <02E7334B1630744CBDC55DA8586225837F7FC660@ORSMSX102.amr.corp.intel.com> References: <1553203874-130203-1-git-send-email-fei.yang@intel.com> <20190322053602.GA31708@kroah.com> In-Reply-To: <20190322053602.GA31708@kroah.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTEwZGE3MDctNWM1ZC00OTJhLTg5MWQtZTdhZWZmM2Y5MjhjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicGlic210U1A5Qnl6b3hEYlNFMHdabXJrdFhITVErejZDTyt5dUxINjFcL3FEd1dWOHhVVWFqMGk0VVhvWXJ2disifQ== dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> The following kernel panic happens due to the io_data buffer gets >> deallocated before the async io is completed. Add a check for the case >> where io_data buffer should be deallocated by ffs_user_copy_worker. >> >> [ 41.663334] BUG: unable to handle kernel NULL pointer dereference at 0000000000000048 >> >> Fixes: 772a7a724f6 ("usb: gadget: f_fs: Allow scatter-gather buffers") >> Signed-off-by: Fei Yang >> Reviewed-by: Manu Gautam >> Tested-by: John Stultz >> --- >> v2: add tag: "Fixes: 772a7a724f6 ......", Reviewed-by and Tested-by. >> v3: check data for NULL instead of "ret == -EIOCBQUEUED", which would be safer >> and keep the original logic intact. > > If it "fixes" a problem in 5.0, we should add a: > Cc: stable > to it as well. Sent [PATCH v4] with Cc: stable > thanks, > > greg k-h