Thread (18 messages) 18 messages, 6 authors, 2024-07-09

Re: [PATCH 3/4] crypto: caam: Unembed net_dev structure from qi

From: Breno Leitao <leitao@debian.org>
Date: 2024-07-02 13:33:35
Also in: linux-arm-kernel, netdev

Hello Simon,

On Fri, Jun 28, 2024 at 05:32:26PM +0100, Simon Horman wrote:
On Mon, Jun 24, 2024 at 09:21:21AM -0700, Breno Leitao wrote:
quoted
@@ -530,6 +530,7 @@ static void caam_qi_shutdown(void *data)
 
 		if (kill_fq(qidev, per_cpu(pcpu_qipriv.rsp_fq, i)))
 			dev_err(qidev, "Rsp FQ kill failed, cpu: %d\n", i);
+		free_netdev(pcpu_qipriv.net_dev);
Hi Breno,

I don't think you can access pcpu_qipriv.net_dev like this,
as pcpu_qipriv is a per-cpu variable. Perhaps this?

	free_netdev(per_cpu(pcpu_qipriv.net_dev, i));
You are absolutely correct. Let me fix it.
Flagged by Sparse.
Thanks. I've just added sparse to my development workflow, and I can see
it also:

	drivers/crypto/caam/qi.c:533:29: warning: dereference of noderef expression

Thanks for the review. I will send an updated version.

--breno
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help