search for: 78139c94dc8c

Displaying 19 results from an estimated 19 matches for "78139c94dc8c".

2018 Nov 30
3
[PATCH] vhost: fix IOTLB locking
Commit 78139c94dc8c ("net: vhost: lock the vqs one by one") moved the vq lock to improve scalability, but introduced a possible deadlock in vhost-iotlb. vhost_iotlb_notify_vq() now takes vq->mutex while holding the device's IOTLB spinlock. And on the vhost_iotlb_miss() path, the spinlock is taken whil...
2018 Nov 30
3
[PATCH] vhost: fix IOTLB locking
Commit 78139c94dc8c ("net: vhost: lock the vqs one by one") moved the vq lock to improve scalability, but introduced a possible deadlock in vhost-iotlb. vhost_iotlb_notify_vq() now takes vq->mutex while holding the device's IOTLB spinlock. And on the vhost_iotlb_miss() path, the spinlock is taken whil...
2018 Dec 11
2
[PATCH net 2/4] vhost_net: rework on the lock ordering for busy polling
...18 at 05:44:52PM +0800, Jason Wang wrote: > When we try to do rx busy polling in tx path in commit 441abde4cd84 > ("net: vhost: add rx busy polling in tx path"), we lock rx vq mutex > after tx vq mutex is held. This may lead deadlock so we try to lock vq > one by one in commit 78139c94dc8c ("net: vhost: lock the vqs one by > one"). With this commit, we avoid the deadlock with the assumption > that handle_rx() and handle_tx() run in a same process. But this > commit remove the protection for IOTLB updating which requires the > mutex of each vq to be held. > &...
2018 Dec 11
2
[PATCH net 2/4] vhost_net: rework on the lock ordering for busy polling
...18 at 05:44:52PM +0800, Jason Wang wrote: > When we try to do rx busy polling in tx path in commit 441abde4cd84 > ("net: vhost: add rx busy polling in tx path"), we lock rx vq mutex > after tx vq mutex is held. This may lead deadlock so we try to lock vq > one by one in commit 78139c94dc8c ("net: vhost: lock the vqs one by > one"). With this commit, we avoid the deadlock with the assumption > that handle_rx() and handle_tx() run in a same process. But this > commit remove the protection for IOTLB updating which requires the > mutex of each vq to be held. > &...
2018 Nov 30
1
[PATCH v2] vhost: fix IOTLB locking
Commit 78139c94dc8c ("net: vhost: lock the vqs one by one") moved the vq lock to improve scalability, but introduced a possible deadlock in vhost-iotlb. vhost_iotlb_notify_vq() now takes vq->mutex while holding the device's IOTLB spinlock. And on the vhost_iotlb_miss() path, the spinlock is taken whil...
2018 Dec 11
2
[PATCH net 2/4] vhost_net: rework on the lock ordering for busy polling
...: > > > When we try to do rx busy polling in tx path in commit 441abde4cd84 > > > ("net: vhost: add rx busy polling in tx path"), we lock rx vq mutex > > > after tx vq mutex is held. This may lead deadlock so we try to lock vq > > > one by one in commit 78139c94dc8c ("net: vhost: lock the vqs one by > > > one"). With this commit, we avoid the deadlock with the assumption > > > that handle_rx() and handle_tx() run in a same process. But this > > > commit remove the protection for IOTLB updating which requires the > > &...
2018 Dec 11
2
[PATCH net 2/4] vhost_net: rework on the lock ordering for busy polling
...: > > > When we try to do rx busy polling in tx path in commit 441abde4cd84 > > > ("net: vhost: add rx busy polling in tx path"), we lock rx vq mutex > > > after tx vq mutex is held. This may lead deadlock so we try to lock vq > > > one by one in commit 78139c94dc8c ("net: vhost: lock the vqs one by > > > one"). With this commit, we avoid the deadlock with the assumption > > > that handle_rx() and handle_tx() run in a same process. But this > > > commit remove the protection for IOTLB updating which requires the > > &...
2018 Dec 10
0
[PATCH net 2/4] vhost_net: rework on the lock ordering for busy polling
When we try to do rx busy polling in tx path in commit 441abde4cd84 ("net: vhost: add rx busy polling in tx path"), we lock rx vq mutex after tx vq mutex is held. This may lead deadlock so we try to lock vq one by one in commit 78139c94dc8c ("net: vhost: lock the vqs one by one"). With this commit, we avoid the deadlock with the assumption that handle_rx() and handle_tx() run in a same process. But this commit remove the protection for IOTLB updating which requires the mutex of each vq to be held. To solve this issue, the f...
2018 Dec 11
0
[PATCH net 2/4] vhost_net: rework on the lock ordering for busy polling
...+0800, Jason Wang wrote: >> When we try to do rx busy polling in tx path in commit 441abde4cd84 >> ("net: vhost: add rx busy polling in tx path"), we lock rx vq mutex >> after tx vq mutex is held. This may lead deadlock so we try to lock vq >> one by one in commit 78139c94dc8c ("net: vhost: lock the vqs one by >> one"). With this commit, we avoid the deadlock with the assumption >> that handle_rx() and handle_tx() run in a same process. But this >> commit remove the protection for IOTLB updating which requires the >> mutex of each vq to...
2018 Dec 12
0
[PATCH net 2/4] vhost_net: rework on the lock ordering for busy polling
...t;>> When we try to do rx busy polling in tx path in commit 441abde4cd84 >>>> ("net: vhost: add rx busy polling in tx path"), we lock rx vq mutex >>>> after tx vq mutex is held. This may lead deadlock so we try to lock vq >>>> one by one in commit 78139c94dc8c ("net: vhost: lock the vqs one by >>>> one"). With this commit, we avoid the deadlock with the assumption >>>> that handle_rx() and handle_tx() run in a same process. But this >>>> commit remove the protection for IOTLB updating which requires the >&...
2018 Nov 30
0
[PATCH] vhost: fix IOTLB locking
On Fri, Nov 30, 2018 at 11:37:02AM +0000, Jean-Philippe Brucker wrote: > Commit 78139c94dc8c ("net: vhost: lock the vqs one by one") moved the vq > lock to improve scalability, but introduced a possible deadlock in > vhost-iotlb. vhost_iotlb_notify_vq() now takes vq->mutex while holding > the device's IOTLB spinlock. Indeed spin_lock is just outside this snippet....
2018 Dec 12
1
[PATCH net V2 3/4] Revert "net: vhost: lock the vqs one by one"
On Wed, Dec 12, 2018 at 06:08:18PM +0800, Jason Wang wrote: > This reverts commit 78139c94dc8c96a478e67dab3bee84dc6eccb5fd. We don't > protect device IOTLB with vq mutex, which will lead e.g use after free > for device IOTLB entries. And since we've switched to use > mutex_trylock() in previous patch, it's safe to revert it without > having deadlock. > > Fixes:...
2018 Dec 10
9
[PATCH net 0/4] Fix various issue of vhost
Hi: This series tries to fix various issues of vhost: - Patch 1 adds a missing write barrier between used idx updating and logging. - Patch 2-3 brings back the protection of device IOTLB through vq mutex, this fixes possible use after free in device IOTLB entries. - Patch 4 fixes the diry page logging when device IOTLB is enabled. We should done through GPA instead of GIOVA, this was done
2018 Dec 10
9
[PATCH net 0/4] Fix various issue of vhost
Hi: This series tries to fix various issues of vhost: - Patch 1 adds a missing write barrier between used idx updating and logging. - Patch 2-3 brings back the protection of device IOTLB through vq mutex, this fixes possible use after free in device IOTLB entries. - Patch 4 fixes the diry page logging when device IOTLB is enabled. We should done through GPA instead of GIOVA, this was done
2018 Dec 13
5
[PATCH net V3 0/3] Fix various issue of vhost
Hi: This series tries to fix various issues of vhost: - Patch 1 adds a missing write barrier between used idx updating and logging. - Patch 2-3 brings back the protection of device IOTLB through vq mutex, this fixes possible use after free in device IOTLB entries. Please consider them for -stable. Thanks Changes from V2: - drop dirty page fix and make it for net-next Changes from V1: -
2018 Dec 12
10
[PATCH net V2 0/4] Fix various issue of vhost
Hi: This series tries to fix various issues of vhost: - Patch 1 adds a missing write barrier between used idx updating and logging. - Patch 2-3 brings back the protection of device IOTLB through vq mutex, this fixes possible use after free in device IOTLB entries. - Patch 4-7 fixes the diry page logging when device IOTLB is enabled. We should done through GPA instead of GIOVA, this was
2018 Dec 12
10
[PATCH net V2 0/4] Fix various issue of vhost
Hi: This series tries to fix various issues of vhost: - Patch 1 adds a missing write barrier between used idx updating and logging. - Patch 2-3 brings back the protection of device IOTLB through vq mutex, this fixes possible use after free in device IOTLB entries. - Patch 4-7 fixes the diry page logging when device IOTLB is enabled. We should done through GPA instead of GIOVA, this was
2018 Dec 12
0
[PATCH net V2 2/4] vhost_net: switch to use mutex_trylock() in vhost_net_busy_poll()
...ring back the protection of device IOTLB with vq mutex that requires to hold mutex of all virtqueues at the same time. Fix this simply by switching to use mutex_trylock(), when fail just skip the busy polling. This can happen when device IOTLB is under updating which should be rare. Fixes: commit 78139c94dc8c ("net: vhost: lock the vqs one by one") Cc: Tonghao Zhang <xiangxia.m.yue at gmail.com> Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/vhost/net.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/ne...
2018 Dec 12
0
[PATCH net V2 3/4] Revert "net: vhost: lock the vqs one by one"
This reverts commit 78139c94dc8c96a478e67dab3bee84dc6eccb5fd. We don't protect device IOTLB with vq mutex, which will lead e.g use after free for device IOTLB entries. And since we've switched to use mutex_trylock() in previous patch, it's safe to revert it without having deadlock. Fixes: commit 78139c94dc8c ("ne...