lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251029165457.557f8f7d@kernel.org>
Date: Wed, 29 Oct 2025 16:54:57 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: David Wei <dw@...idwei.uk>
Cc: io-uring@...r.kernel.org, netdev@...r.kernel.org, Jens Axboe
 <axboe@...nel.dk>, Pavel Begunkov <asml.silence@...il.com>, "David S.
 Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo
 Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>
Subject: Re: [PATCH v2 2/2] net: io_uring/zcrx: call
 netdev_queue_get_dma_dev() under instance lock

On Wed, 29 Oct 2025 16:16:54 -0700 David Wei wrote:
> +	ifq->netdev = netdev_get_by_index_lock(current->nsproxy->net_ns, reg.if_idx);
>  	if (!ifq->netdev) {
>  		ret = -ENODEV;
> -		goto err;
> +		goto netdev_unlock;
>  	}
>  
>  	ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, reg.if_rxq);
>  	if (!ifq->dev) {
>  		ret = -EOPNOTSUPP;
> -		goto err;
> +		goto netdev_unlock;
>  	}
> +	netdev_hold(ifq->netdev, &ifq->netdev_tracker, GFP_KERNEL);
>  	get_device(ifq->dev);
>  
>  	ret = io_zcrx_create_area(ifq, &area);
>  	if (ret)
> -		goto err;
> +		goto netdev_unlock;

Without looking at larger context this looks sus.
You're jumping to the same label before and after you took the ref on
the netdev..

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ