mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
When vdpa_sim runs with use_va (the default), its rings live in user memory, and vringh reads the ring's flags and event index with __get_user() through the user address. The net and block simulators call vringh_need_notify_iotlb() with bottom halves disabled, so those reads happen in atomic context. That only works today because __get_user() has no might_fault() check: a fault is not handled in atomic context and simply comes back as -EFAULT. Make that explicit with pagefault_disable() around the call, so vringh can use the normal user accessors without complaint. Only the notification check needs this: the rest of the ring processing runs in the same kthread without bottom halves disabled, and can fault normally. Tested-and-acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|---|---|---|
| .. | ||
| alibaba | ||
| ifcvf | ||
| mlx5 | ||
| octeon_ep | ||
| pds | ||
| solidrun | ||
| vdpa_sim | ||
| vdpa_user | ||
| virtio_pci | ||
| Kconfig | ||
| Makefile | ||
| vdpa.c | ||