aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/vhost/vhost.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 6c31c0c9bbb9..7cd55e078794 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -646,8 +646,9 @@ static int set_bit_to_user(int nr, void __user *addr)
646 int bit = nr + (log % PAGE_SIZE) * 8; 646 int bit = nr + (log % PAGE_SIZE) * 8;
647 int r; 647 int r;
648 r = get_user_pages_fast(log, 1, 1, &page); 648 r = get_user_pages_fast(log, 1, 1, &page);
649 if (r) 649 if (r < 0)
650 return r; 650 return r;
651 BUG_ON(r != 1);
651 base = kmap_atomic(page, KM_USER0); 652 base = kmap_atomic(page, KM_USER0);
652 set_bit(bit, base); 653 set_bit(bit, base);
653 kunmap_atomic(base, KM_USER0); 654 kunmap_atomic(base, KM_USER0);