linux/drivers/vhost
Jason Wang 2b8b328b61 vhost_net: handle polling errors when setting backend
Currently, the polling errors were ignored, which can lead following issues:

- vhost remove itself unconditionally from waitqueue when stopping the poll,
  this may crash the kernel since the previous attempt of starting may fail to
  add itself to the waitqueue
- userspace may think the backend were successfully set even when the polling
  failed.

Solve this by:

- check poll->wqh before trying to remove from waitqueue
- report polling errors in vhost_poll_start(), tx_poll_start(), the return value
  will be checked and returned when userspace want to set the backend

After this fix, there still could be a polling failure after backend is set, it
will addressed by the next patch.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-29 15:43:03 -05:00
..
Kconfig tcm_vhost: Initial merge for vhost level target fabric driver 2012-07-29 13:49:10 -07:00
Kconfig.tcm tcm_vhost: Initial merge for vhost level target fabric driver 2012-07-29 13:49:10 -07:00
Makefile tcm_vhost: Initial merge for vhost level target fabric driver 2012-07-29 13:49:10 -07:00
net.c vhost_net: handle polling errors when setting backend 2013-01-29 15:43:03 -05:00
tcm_vhost.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2012-12-15 14:25:10 -08:00
tcm_vhost.h tcm_vhost: Convert I/O path to use target_submit_cmd_map_sgls 2012-10-02 14:16:20 -07:00
test.c vhost: Separate vhost-net features from vhost features 2012-07-22 01:21:53 +03:00
test.h vhost test module 2010-12-09 16:00:21 +02:00
vhost.c vhost_net: handle polling errors when setting backend 2013-01-29 15:43:03 -05:00
vhost.h vhost_net: handle polling errors when setting backend 2013-01-29 15:43:03 -05:00