Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3872253pxu; Tue, 20 Oct 2020 02:44:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAUhKVAIY2HWRwD4pziZeC3I0R1axk2+4uXQM6WWaR/PvcFR5pk5AencrZZ+4rTXosg8VK X-Received: by 2002:a50:aa91:: with SMTP id q17mr1835120edc.166.1603187065945; Tue, 20 Oct 2020 02:44:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603187065; cv=none; d=google.com; s=arc-20160816; b=rHUpzSYgXHQs7OArcvMAs6QtJQumSB+Ii4fsaAG9IzdlxO4Yj3ajHNFkYlcj31xeHK ILjTmUN7DZFgjFsTM90voFAk/JaUp8LQMUqftZOFEcFLrBcAvA/OoBXEuufGjE/YslLz dv2oLfyNJQriwruavMR51nmAYKf2335xvlrJ41NKYTfey/cVqDbprBYxkOMDfh773jbL mRwuq6n31woRCM7nZj/gDr5FvR/ij6d/8cs5lumbDzTAo4I2KkJvX0icoDNMPaIEVmpj nHTLxtffzoPTYX458PZZlgw5T+qHxK8wZaEwyIjr3EjlJJbmimQHgl71Q4+GLWXIAsDU kURA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=5oMkIsGFoLQ4IdBLm/vtbnr97rCI7oTjafuD1B2qYpM=; b=rYBSRFl3F3EZOs4gaz5BxCKeBAd494PFWmkcf7+7YZLHbmPkLJhJWNHu5O0etI05T9 o5bW6k5qfKLyxcADr2f+b0Ul00Og9jltaO+hm5yTf8vxrajgtAFGhMTLWZpQorOENXMO vR82Lp1hw/lwghclA9qM5OuK+yjF4gtohWCFx0yTg+SDQM12zTGj1c+9u+zLsrgj05Bd C3d7pkjuFjxPnFLWZxyRjAAlHTsgEJoTIyvZ4HgG+qvlBKsLQBvkeVHIdjZTmmxfFjTT gK0rLIAFoHWuDIVnsA/SHnN8LJsXqSIg99Fyov0DTaL8lcaBr4hqwmbGjnilx4lypPHR ngPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=UhARNXEK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lg24si919707ejb.18.2020.10.20.02.44.04; Tue, 20 Oct 2020 02:44:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=UhARNXEK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404447AbgJTGlz (ORCPT + 99 others); Tue, 20 Oct 2020 02:41:55 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:49823 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2404440AbgJTGlz (ORCPT ); Tue, 20 Oct 2020 02:41:55 -0400 X-UUID: 106dd9294fcd431cb2c5a23ffead6e1c-20201020 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=5oMkIsGFoLQ4IdBLm/vtbnr97rCI7oTjafuD1B2qYpM=; b=UhARNXEKXnk9UU42lTNFm6DiylUDMdw51fyJGTpz4PSPDMmzqFPy+9t+iSumF/Ciw0sCFymNrREWWc8OuREu0E5eAxH2kzqSQKMDvUEviBhm88ziTlPlp4ACrLQ2UQ65+yquenhDLCUF5v+b+08Fau5AX8cYdE+F/uK6NcnOJj8=; X-UUID: 106dd9294fcd431cb2c5a23ffead6e1c-20201020 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1294043086; Tue, 20 Oct 2020 14:36:40 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 20 Oct 2020 14:36:38 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 20 Oct 2020 14:36:39 +0800 Message-ID: <1603175799.19799.6.camel@mtkswgap22> Subject: Re: [PATCH v2] usb: gadget: configfs: Fix use-after-free issue with udc_name From: Macpaul Lin To: Felipe Balbi CC: Greg Kroah-Hartman , Matthias Brugger , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-mediatek@lists.infradead.org" , wsd_upstream , Macpaul Lin , Eddie Hung =?UTF-8?Q?=28=E6=B4=AA=E6=AD=A3=E9=91=AB=29?= , "stable@vger.kernel.org" Date: Tue, 20 Oct 2020 14:36:39 +0800 In-Reply-To: <1595040303-23046-1-git-send-email-macpaul.lin@mediatek.com> References: <1594881666-8843-1-git-send-email-macpaul.lin@mediatek.com> <1595040303-23046-1-git-send-email-macpaul.lin@mediatek.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@v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