From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (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 058EB19EED7 for ; Mon, 30 Dec 2024 07:26:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735543615; cv=none; b=Hc8LIRD1/d/aRxTfZIyzr560vZ2GkUvvwF+Mrnuq5aBJbVYndErKpfhXTFkJGPQvvb3y1L3WCf0ptkCysTCM9NB+6qf8KAFDdkP/CJWkMcXiEDPgMrdy04a95KWREK+Vqv6NvhNOjoKxpFJ6FIKC8ylGaMA6N4yG58+UockpjNw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735543615; c=relaxed/simple; bh=MWxDXOlW7j53jIn6RPlpS06cck+wPdGtjnIckqK7d9M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=K+33JP5xl/8+OQ8Da21As5eAGKFTD3C8HWzo77xCpuR2xdL+iOd7ctM6c9PH8Nr/2JxXzA5hMN9R8CcaawIV286msXvt6GTNeH6GPY1BKZlbVLcYprSPUhvwclpm62Y9cMLJHSPYwpAb8NvViBNBntV4sC8788t/athrNMmDwko= 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=s/qbQLnr; arc=none smtp.client-ip=209.85.216.54 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="s/qbQLnr" Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-2efded08c79so9067808a91.0 for ; Sun, 29 Dec 2024 23:26:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735543613; x=1736148413; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=+8OryNJDFLOIaLKOtNOzgr4ZnUh1tIsAApTSyQ1wgHI=; b=s/qbQLnrJXmQU6oZRiHo8qnA3oVEcZmWpOCtLSC4czIcTAgr6igSxcMTLQBjC6Cj88 ZEV8AaKsFIS00tHL46kKihXdHhoFkMDlP0cQZzqAx0TWI5IzqVam+KvSexzA9ruEBwPq Y9Wg691/0AxwGCJsaqSFC/lZTv2e6YsFtMLhzwlfxHsD9GQ/m/L/0qxDQ3o5wL81/Vb5 sBrfs4E1ccQuFRgIImwZ7gwaz7lqYvwtM5CqiaaogDRlhgicBbrFT0+jbCWSfvP9dNFI jhnHKnNUUoZc0yn4yOC1d000LZm8OkxkHzs37EpA2jAw05nuC9dt+VBpFlBGWgCTumom +XYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735543613; x=1736148413; h=in-reply-to:content-transfer-encoding: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=+8OryNJDFLOIaLKOtNOzgr4ZnUh1tIsAApTSyQ1wgHI=; b=cPq0ujOTtv9a2XtnfVm6kBuieCFqfijqwM9ZPhlDof+EEDP+IS3RwenvL4Xp4sJyYj TL7Q5vfBPxiixU2+4EWHX42kkgzvgMRjhwRq9GKzbb5kNLv3LS4XSwMz3SRB63qy+tum Y6jSwy1dBfhNIYlVmwZ6hVyc/3Mj9UFV71tOZYUT+BkUUhpqLMhp2nX1L58dHzoAqYbE F5ywbd9mk3UXNWxrkQIUzyj+RyhGBwoEc1ZHfjfgc/VsnGzCmhd8EuXpOWWnANSh20p3 cOQuj1Os1+Ke+YvlghQdyuAhoJdzpP0tBL1W3CFwzZ61oNH2f1xHpX2LMUxFebeWE8B4 ZUVw== X-Forwarded-Encrypted: i=1; AJvYcCV1Ru+qK1c2ApS2/mNfNhfJ5nZGCgoe/gqEbW6vkdwY0bdCpFSXITiOOTdQ89COPnNxzGFmO8jgrkkqM1k=@vger.kernel.org X-Gm-Message-State: AOJu0YzaUFr2C9bHHH8QV/zfMJqojewuJRKOc05BJEaISnOAPLt+fQTo UEiUbWoTlPzIFMW8TTxm5pV5TH/egd9sfoCo8iv0Nk3FE9KHMMDweN4t3hK70A== X-Gm-Gg: ASbGncsejVTFzI8lmw12J4kPlpJWZ+NUorR/zuIvKSCGmn/cq8tYFdAD0cNSWyky2jE LuDmn5TZ57nPNVHqf7RKJUNIaM2FafWfpAtFw6EXZwwk759REthCL8cWALHXiRVsecV1bcLEaqs yPjw3HJRcp2/2q9KNlRZxRqaAzWTnjEmwM4X19+tcjbgvmv35UuSCzXOUNmWBc3Tg1v6/Agg5lR yL2GG+oiuRd6CjG6c93/hd0B8OIbLWAmPCvdzGcap6iaEnBxQ12Z5Qd4M0yxCcIDJXC X-Google-Smtp-Source: AGHT+IHDI+emEyeYMjERnHzVZ9Z57rQZmYe1MWE2uLjANDmiMpD/jKYagU/EQarks6y0gK+c0am63g== X-Received: by 2002:a17:90b:53c8:b0:2ee:c2df:5d30 with SMTP id 98e67ed59e1d1-2f452eb11e2mr25494784a91.26.1735543613274; Sun, 29 Dec 2024 23:26:53 -0800 (PST) Received: from thinkpad ([120.60.139.149]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc962961sm173019025ad.13.2024.12.29.23.26.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 23:26:52 -0800 (PST) Date: Mon, 30 Dec 2024 12:56:45 +0530 From: Manivannan Sadhasivam To: Mohamed Khalfella Cc: Frank.Li@nxp.com, bhelgaas@google.com, cassel@kernel.org, dlemoal@kernel.org, jiangwang@kylinos.cn, kishon@kernel.org, kw@linux.com, kwilczynski@kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH v3] PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to dma_chan_rx Message-ID: <20241230072645.6x4awglfwbjis27e@thinkpad> References: <20241227135948.ztxxx2u37og3ixxn@thinkpad> <20241227160841.92382-1-khalfella@gmail.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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20241227160841.92382-1-khalfella@gmail.com> On Fri, Dec 27, 2024 at 08:08:41AM -0800, Mohamed Khalfella wrote: > If dma_chan_tx allocation fails, set dma_chan_rx to NULL after it is > freed. > > Fixes: 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities") > Signed-off-by: Mohamed Khalfella Reviewed-by: Manivannan Sadhasivam Btw, you are sending next version as a reply to the previous one. But you should send it separately. - Mani > Reviewed-by: Niklas Cassel > --- > drivers/pci/endpoint/functions/pci-epf-test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c > index ef6677f34116..d90c8be7371e 100644 > --- a/drivers/pci/endpoint/functions/pci-epf-test.c > +++ b/drivers/pci/endpoint/functions/pci-epf-test.c > @@ -251,7 +251,7 @@ static int pci_epf_test_init_dma_chan(struct pci_epf_test *epf_test) > > fail_back_rx: > dma_release_channel(epf_test->dma_chan_rx); > - epf_test->dma_chan_tx = NULL; > + epf_test->dma_chan_rx = NULL; > > fail_back_tx: > dma_cap_zero(mask); > -- > 2.45.2 > -- மணிவண்ணன் சதாசிவம்