Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp969302lqt; Fri, 7 Jun 2024 04:30:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUzT7Chlq5AM+S5YrRwBPCs3ic0DukJgT8LLS4jQXVqJaG5AfQSL+AjTp3z4u5MF6+E513gKA1fF3/GJRwcwlqwK92X80sBGMeHPE7ytQ== X-Google-Smtp-Source: AGHT+IFaA7Yrg87ErpBIeyIRBp9+lN6vs1AmnpmsRh9BkdThV3XZ/W/8w4OLpUiMbE9iUr3oMx1x X-Received: by 2002:a05:6a20:1582:b0:1b2:2ed2:b811 with SMTP id adf61e73a8af0-1b2f9df70a2mr2239358637.52.1717759840300; Fri, 07 Jun 2024 04:30:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717759840; cv=pass; d=google.com; s=arc-20160816; b=DDo84jLJ1HZC+4okf5KqARAu4vWU8UFf2j8dru5V/uo/QzO7rQasoQowLz6vBvklzx LpTlF5so2EOfrVqGlMx21gETBLrif9au6QwaDZ8BMjvIW/Z+INsDxgoEbdDVfJ8RUai+ Kv8PPVkX8j5JC40VqnlJtsG8HiWubV9LxuPgnIlxvfALxW53K5BxcMcw70lY+KtzGQkB 78a0vo+wzpVZMLxKzR9yF9D1K9A8kAtHdrdRuLyTfUPzZTHNvCihd77GZ/eSTOLCWSw1 RLQMZRUEPrmHpyk7t6wZowwA+BmeMbq+A8dRIsFsnUlrrJmQoOldHlN1j5CT8VoLCHBP u/JQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4LrDPy3jinFU4PA9lezpiE+mXjjHX9CRj3Z0eKF+mJU=; fh=e9YNdx1/QIn+v1oYaGnHReM/MI9RwLwyOmypvlfmmSM=; b=VTcS9TxO3+BeZFIe9lISfDK6/ly4OKso08dYOe38jyWeViH2B+ls5vzyl74g7+d8Bp 7zBrvqLZ+PlJbgW+OILY0dT9+QnqbsRvah/3kIhRmQm2Tr+Lk/1kHoCdTD5AFUni8bN6 R6HOcqh0Y2kW/NiV4vNfH9a/BJaIOCBZsedxPpEQ4iHbp4vkNfhdzAui7xrNXQHrsQIz NsJZ6B/akqOQIngdv9hzfdbupS7eLxeSXuKV0cU9Fe4C6U3FhyEw1nbvsVfV9deT9dXH ieIPAlMdyATNFJGw1p4yabmSTPgKSPr1PFfL5QITRz+Rw3QdXMswyhKaudtZOLJloH8V k1qQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AsjD4WBd; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-205915-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205915-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-7041ab6f4d6si328926b3a.131.2024.06.07.04.30.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 04:30:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205915-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AsjD4WBd; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-205915-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205915-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 48926B226B6 for ; Fri, 7 Jun 2024 11:28:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D99B718C324; Fri, 7 Jun 2024 11:28:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="AsjD4WBd" Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7045A15B127 for ; Fri, 7 Jun 2024 11:28:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717759706; cv=none; b=O7+nv+QRSQ+/+/lSiVqxh1xCcKgfyHK4ib//OxLGJvWzqqJtRyQEjjyDOyZBOsaxAZPEiw7vYXUXcw5X8p/wGEOPnTOdoPp958yqFyDu4M/q4XzeBPNhbL9pNPR3O3MjSjwncnZBhwnYkD8LLyKy/FQ0TsgGfFeYxLW2teW0H1Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717759706; c=relaxed/simple; bh=dZ6b6A2luUvZV67iXhQecHg7bz8xrdgE5UK/eMldfuk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IeRuQc/Al6PR4tMnzrYFb3bvTuHGurF/iipTfCaNuYK5qZVi/cGd7TxjljTyesBGR8M5VyGIMPZvQu+F+OUzkTJhfH9Sr+mKaf5WX7f/odbSP8tny627FCqTInP+tEw5Sy2TE20s29AqSG9Z8Y1SzEfeIx5tQTx+pkYmJ7ol1bs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=AsjD4WBd; arc=none smtp.client-ip=209.85.208.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2eacd7e7b38so21695211fa.2 for ; Fri, 07 Jun 2024 04:28:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717759703; x=1718364503; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=4LrDPy3jinFU4PA9lezpiE+mXjjHX9CRj3Z0eKF+mJU=; b=AsjD4WBdSW/x/MjeNQjggpiY1haToAQPa6Q4xD2Em6dX2aylvm+g8vzTUczs+eRlJz /AHX90owP1jBa/zqZq/8oMmU7gpkfK6ZDmainUOidrWSQuAfIoGSyT96DBo0gyibyVCE KIMm576iLlSc740FUQi0jf/g1YfMZcvmS96QqqdtjbbWDHYUO11QeIAlvHDSkFBb/oJE ynBn3UOsJigIuhdYj+BPCzjV84lyK0Lxh6zJebuk12vk+8/AtaqNbEpPZQhJ3BJjNHRd xa2jyAOjeVdk0N4mVo7TPa9DNIZ2GMgeAHrmAf3ygZElx629xmRJ5ayPlHginTJIf6ba wtXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717759703; x=1718364503; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4LrDPy3jinFU4PA9lezpiE+mXjjHX9CRj3Z0eKF+mJU=; b=R7ejX6dIfB7F4XR7tTv93vJIA+Wo3ag5hEqnrGK1sN3VHU3sjgCgGJ0VIrnSaUIGn0 m/qQLhJX28AuTOLNWRBHbJsEKwEbkhbRqW9THCE+vL3XYn80EKhVFKHrCWBm97CgXM0U I1AQrJt1B8Tk1yCCWUCGinPpZtRCRg+vxXKBGw9ahzWwfhlaOwY9kdEaeFOpKH6Z25WG QDuxyx9ThA3gvQ9gccjOiiUrB97aXqhmzGR0pCdD1RFidroNdJ1LtM1Vu6uMvepaDM8q 75aEiP4UVJVG/etvnsv3ENlJuIiKu7uHOm+E6TwkY8SphD8KJgepWOw+M35kUCMzvuUK Sb2w== X-Forwarded-Encrypted: i=1; AJvYcCW7ych6ww3WJjExTKuDLeNNhSkjvbFtxXA/0DKBAzqZBbDDwEhwW7JUz/0S0RkY1S45pfzD1iu4zp8ossfG+dINNQo4ZZ3BRidhbwf/ X-Gm-Message-State: AOJu0YzAn15TwtgNv/evLS3njQYt1NvMHOw6fQqjAfFI98C7WU1S+xCn S2u8OrSOyAthDdSlN0g+pMTU/V5Nt0c92hzDQCNaAP8jKK0DROjciVRPFyUZuWHlyKOVSP7MWhh N X-Received: by 2002:a05:651c:2220:b0:2ea:89f6:258f with SMTP id 38308e7fff4ca-2eadcb8dd58mr25219721fa.0.1717759702584; Fri, 07 Jun 2024 04:28:22 -0700 (PDT) Received: from eriador.lumag.spb.ru (dzdbxzyyyyyyyyyyyykxt-3.rev.dnainternet.fi. [2001:14ba:a0c3:3a00::227]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2ead41b059bsm5083421fa.96.2024.06.07.04.28.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 04:28:21 -0700 (PDT) Date: Fri, 7 Jun 2024 14:28:19 +0300 From: Dmitry Baryshkov To: Ekansh Gupta Cc: srinivas.kandagatla@linaro.org, linux-arm-msm@vger.kernel.org, gregkh@linuxfoundation.org, quic_bkumar@quicinc.com, linux-kernel@vger.kernel.org, quic_chennak@quicinc.com, stable Subject: Re: [PATCH v4 06/11] misc: fastrpc: Fix memory leak in audio daemon attach operation Message-ID: References: <20240606165939.12950-1-quic_ekangupt@quicinc.com> <20240606165939.12950-7-quic_ekangupt@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240606165939.12950-7-quic_ekangupt@quicinc.com> On Thu, Jun 06, 2024 at 10:29:26PM +0530, Ekansh Gupta wrote: > Audio PD daemon send the name as part of the init IOCTL call. This > mane needs to be copied to kernel for which memory is allocated. > This memory is never freed which might result in memory leak. Add > changes to free the memory when it is not needed. > > Fixes: 0871561055e6 ("misc: fastrpc: Add support for audiopd") > Cc: stable > Signed-off-by: Ekansh Gupta Fixes go before the non-fixes patches. Reviewed-by: Dmitry Baryshkov > --- > drivers/misc/fastrpc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c > index 13e368279765..7ee8bb3a9a6f 100644 > --- a/drivers/misc/fastrpc.c > +++ b/drivers/misc/fastrpc.c > @@ -1380,6 +1380,7 @@ static int fastrpc_init_create_static_process(struct fastrpc_user *fl, > goto err_invoke; > A comment that the remote_heap persists would be helpful. > kfree(args); > + kfree(name); > > return 0; > err_invoke: > -- > 2.43.0 > -- With best wishes Dmitry