git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
nfsd4: shutdown callbacks on expiry
[safe/jmp/linux-2.6]
/
drivers
/
vhost
/
vhost.c
diff --git
a/drivers/vhost/vhost.c
b/drivers/vhost/vhost.c
index
6c31c0c
..
7cd55e0
100644
(file)
--- 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)
int bit = nr + (log % PAGE_SIZE) * 8;
int r;
r = get_user_pages_fast(log, 1, 1, &page);
- if (r)
+ if (r
< 0
)
return r;
+ BUG_ON(r != 1);
base = kmap_atomic(page, KM_USER0);
set_bit(bit, base);
kunmap_atomic(base, KM_USER0);