Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp85309ybh; Fri, 17 Jul 2020 19:46:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxmmHG/vagyVtGKNgC3EXGbbFSfc4MNdN4zFdCP/QwTiOgXbJGTFdG+T/7OiYyPRgXAK1z X-Received: by 2002:a50:e047:: with SMTP id g7mr11681330edl.290.1595040368943; Fri, 17 Jul 2020 19:46:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595040368; cv=none; d=google.com; s=arc-20160816; b=ojxc4p1SdDMr5nXIyKe6zYZTCJO652bCqZAkMd6CSvnYxY1y1ro4PaeZt0HBBQux03 kOI4EObtW2zmhzBgplf3207jZJdZoVVlTWC5R+vZ/AKSoezG0jXbPFvHAZ5Gk0Gujkr3 9GIGY7E11tjiEGeX/IdHUhhZIw9E+HzxJSU2SMhFW2TQDag638KeLd2ekavxbHpdL+6O Ukfm9kMbpcJFdKqbCbewygN8Ep5QMgL6BrczqxSU17I9Rz5ilCDs8KjLsPQFLBWm8Qnb QcfELe/zJAm1SaXC2RAvkhF9pRipWfCiPc2ip2RVrPPwvNeFuaYTmy6Zs1i7YkS6UvF+ 0JsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JJ5o+WFe3CVKnlVdykIeEjsdjGfkUl9MSJCZgz3eF2c=; b=nPmx1QHheRSBq4pnSZikrWXweqB1xwGDr0lhr1SyvjlP3LcgOgqr+9smYB8p6ffafu plSEBzBHfuB/T2j/74HWty5fvR48yTksW0K9ktpd1pRu1Wp6F2L8o1h4IRkpnQb7rROc FZVASPy6JkKc3LFVQboyP/k6oMzGyAq/zxtL7RebNi76gVp4CwvTDFDXpkiURZLyO5OP OLmjZnX65YtBLIXESq1K3caAGWyDKIraL+6vDzsq42dHCfX5mpkrFZm+pF2sJdEwmJ8g GIBRoaVA/ululf4AGiE7C4JOLkuUlwNZ88iANUsQL98OcJH+cnmn7zbEy70TQjsjWqaX vsYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=h6JqILvm; 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 l12si6347917ejq.20.2020.07.17.19.45.32; Fri, 17 Jul 2020 19:46:08 -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=h6JqILvm; 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 S1728207AbgGRCpR (ORCPT + 99 others); Fri, 17 Jul 2020 22:45:17 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:56016 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726742AbgGRCpR (ORCPT ); Fri, 17 Jul 2020 22:45:17 -0400 X-UUID: f2b1f400fbb7493d8e2f8c85de7bd2f1-20200718 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=JJ5o+WFe3CVKnlVdykIeEjsdjGfkUl9MSJCZgz3eF2c=; b=h6JqILvmrVsxfhR1S5A3n9e/L1cwpXlmhF1eG/kO4ynP2Bsx/fIlOHDXdBLAQkOw2EwU0vFwTMHCjmRSr7EwZo3tuVoF+zFb+S9B95qrIj+wFoko8Kk6EBa+XonE2kfVGf852Uz/da6Cp377oyfkC6c+VdPZR4b4UaU0bJoA4OU=; X-UUID: f2b1f400fbb7493d8e2f8c85de7bd2f1-20200718 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1127202755; Sat, 18 Jul 2020 10:45:12 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 18 Jul 2020 10:45:09 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 18 Jul 2020 10:45:10 +0800 From: Macpaul Lin To: Felipe Balbi , Greg Kroah-Hartman , Matthias Brugger , , , , CC: Mediatek WSD Upstream , Macpaul Lin , Macpaul Lin , Eddie Hung , Subject: [PATCH v2] usb: gadget: configfs: Fix use-after-free issue with udc_name Date: Sat, 18 Jul 2020 10:45:03 +0800 Message-ID: <1595040303-23046-1-git-send-email-macpaul.lin@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1594881666-8843-1-git-send-email-macpaul.lin@mediatek.com> References: <1594881666-8843-1-git-send-email-macpaul.lin@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 7A91C36DAFF4860455E96955268D0533348A3C2AFE1C668A6C271346DB2534C92000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogRWRkaWUgSHVuZyA8ZWRkaWUuaHVuZ0BtZWRpYXRlay5jb20+DQoNClRoZX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