[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250718132414.1572292-1-kniv@yandex-team.ru>
Date: Fri, 18 Jul 2025 16:24:14 +0300
From: Nikolay Kuratov <kniv@...dex-team.ru>
To: linux-kernel@...r.kernel.org
Cc: netdev@...r.kernel.org,
virtualization@...ts.linux.dev,
kvm@...r.kernel.org,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Eugenio Pérez <eperezma@...hat.com>,
Lei Yang <leiyang@...hat.com>,
Hillf Danton <hdanton@...a.com>,
kniv@...dex-team.ru
Subject: Re: [PATCH] vhost/net: Replace wait_queue with completion in ubufs reference
> reinit after wait, so the chance for missing wakeup still exists.
Can you please provide more details on this? Yes, it is reinit after wait,
but wait should not be concurrent. I checked multiple code pathes towards
vhost_net_flush(), they're all protected by device mutex, except
vhost_net_release(). In case of vhost_net_release() - it would be a
problem itself if it was called in parallel with some ioctl on a device?
Also rationale for this is that put_and_wait() is waiting for zero
refcount condition. Zero refcount means that after put_and_wait() calling
thread is the only owner of an ubufs structure. If multiple threads got
ubufs structure with zero refcount - how either thread can be sure that
another one is not free'ing it?
Powered by blists - more mailing lists