Message ID | 20230109223931.1706429-1-quic_bjorande@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2419769wrt; Mon, 9 Jan 2023 14:43:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXsJ3XO1hmJjelMzsvDxiUO/x4SRmePMhO+2a6hEl/JLt1MOcwuO+gCk2e1TefXBrV4RUyFP X-Received: by 2002:a17:906:484:b0:7c1:ac8:399 with SMTP id f4-20020a170906048400b007c10ac80399mr55868614eja.55.1673304189012; Mon, 09 Jan 2023 14:43:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673304188; cv=none; d=google.com; s=arc-20160816; b=k5Y1R0laSprDmM59GFvfyVc86OsUBTYb+i0DRaktfTJe0Hk6nSr/szpAq7uPCQQcGq AAjQMGCO0OkCW2MCb/UXJ5gB7KA1nlOUiO8qWtplxtIo/m5sWY/UE9KwivoxsAR9VkOf Ho6Ts7hydgHc1ijZehPpT86Fki9bvSpZuYdbmR7t08c1QU9iD1TbASkTSyzZc0XdWo58 cMm2G4EOImKX04Z3+PAuMouvrrrY3NegoDEc6BYhQBj38Fg7JDbKp1MxxV7S0bx2QfjD g1jwT+KOsQI89fEjkU2GF0GoCJFOhBaIT0+ml6QvUKiorrFjGQAWzQeSgQYjB5N3R8pL a7Hw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=QqYCp4kZRhVUB9hzub2NaY+Ry0/3BfKrtg/hVp1tVOg=; b=B3mnOxGRPEDSaHgbFrX+h0P7Hk9o6fIu7wJUlqHgZZ/0yaOjCc75LQl3nhIpdZFFps 7Uh8wfa+pVPgrI+kY1aLcb1Myr7H/lHEn2bFkH2m629tdSQ8D4C7WRHw5PUVqvPX+7o+ Zagz3kNfdHMpDapj3a9M5IacxcgyywX1lF54paPJuU+WcVL7SpRNMnS3tbsz2K90rgh4 i12xlZlwDhpgm0rokp8Qru8vLXH/LEPQXyR9+uhDCnu6V/H/AJR89tWRQ/vvWGb6PZE5 pCbPJ179KOiuH5wY2mWIqgPRB6TeuGPq3EvgCVL+pzE22UXk8Dl1XGxk7rUt0OQYZdqU b/vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="Wyb/Qgyz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id va17-20020a17090711d100b0081160837b7csi7945023ejb.286.2023.01.09.14.42.45; Mon, 09 Jan 2023 14:43:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="Wyb/Qgyz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237341AbjAIWj4 (ORCPT <rfc822;syz17693488234@gmail.com> + 99 others); Mon, 9 Jan 2023 17:39:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237963AbjAIWjl (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 9 Jan 2023 17:39:41 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A02FD13DD2; Mon, 9 Jan 2023 14:39:40 -0800 (PST) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 309LsSfJ004406; Mon, 9 Jan 2023 22:39:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=QqYCp4kZRhVUB9hzub2NaY+Ry0/3BfKrtg/hVp1tVOg=; b=Wyb/QgyzJeyeKQNdp08mFdjiSnuccuYhwrao1NEKcUaNn3WPaf/IEiTtvbMFF6JQsfke aCQsbp1redwaD2tqusB5Mxlfi2y3x1vZGtelSh3cOjw5iYUiog/5PkGEF+SmWMLbdgGd UgYR8R3/rRJVk3d/D2dRS5IGiE5BObmvKgQzyRZ7gkhYDRgkFnqfDqeRIMA33+MAtNTU ei3csb+AC/9BdVnljGaQ/FIS47k7+sC6jAXfy1drPlT8RIONjst8XXoe7xl0aIMDYfZ+ ELn9FUQsRXTB1ms0O89XLFvjuuZcpW8sRH7g9YduSdVR9UeAyEcCeCgWbL7y8Q/fTfUH Ug== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3n0q28gk83-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 09 Jan 2023 22:39:37 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 309Mdb2Z002929 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 9 Jan 2023 22:39:37 GMT Received: from hu-bjorande-lv.qualcomm.com (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 9 Jan 2023 14:39:37 -0800 From: Bjorn Andersson <quic_bjorande@quicinc.com> To: Bjorn Andersson <andersson@kernel.org>, Mathieu Poirier <mathieu.poirier@linaro.org> CC: <linux-arm-msm@vger.kernel.org>, <linux-remoteproc@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Chris Lew <quic_clew@quicinc.com> Subject: [RESEND PATCH] rpmsg: glink: Release driver_override Date: Mon, 9 Jan 2023 14:39:31 -0800 Message-ID: <20230109223931.1706429-1-quic_bjorande@quicinc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 62n27MYVoQv4YZ9DxEdMEErC_kGlsCcS X-Proofpoint-GUID: 62n27MYVoQv4YZ9DxEdMEErC_kGlsCcS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-09_14,2023-01-09_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 adultscore=0 spamscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301090157 X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754586613614425306?= X-GMAIL-MSGID: =?utf-8?q?1754586613614425306?= |
Series |
[RESEND] rpmsg: glink: Release driver_override
|
|
Commit Message
Bjorn Andersson
Jan. 9, 2023, 10:39 p.m. UTC
Upon termination of the rpmsg_device, driver_override needs to be freed
to avoid leaking the potentially assigned string.
Fixes: 42cd402b8fd4 ("rpmsg: Fix kfree() of static memory on setting driver_override")
Fixes: 39e47767ec9b ("rpmsg: Add driver_override device attribute for rpmsg_device")
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
---
Resending this without the get_maintainer notes in the recipients list.
drivers/rpmsg/qcom_glink_native.c | 2 ++
1 file changed, 2 insertions(+)
Comments
On Mon, 9 Jan 2023 14:39:31 -0800, Bjorn Andersson wrote: > Upon termination of the rpmsg_device, driver_override needs to be freed > to avoid leaking the potentially assigned string. > > Applied, thanks! [1/1] rpmsg: glink: Release driver_override commit: fb80ef67e8ff6a00d3faad4cb348dafdb8eccfd8 Best regards,
diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 8620eea1dc8a..046271e439c5 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -1454,6 +1454,7 @@ static void qcom_glink_rpdev_release(struct device *dev) { struct rpmsg_device *rpdev = to_rpmsg_device(dev); + kfree(rpdev->driver_override); kfree(rpdev); } @@ -1697,6 +1698,7 @@ static void qcom_glink_device_release(struct device *dev) /* Release qcom_glink_alloc_channel() reference */ kref_put(&channel->refcount, qcom_glink_channel_release); + kfree(rpdev->driver_override); kfree(rpdev); }