projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
9p: BUG before corrupting memory
[platform/adaptation/renesas_rcar/renesas_kernel.git]
/
net
/
9p
/
trans_virtio.c
diff --git
a/net/9p/trans_virtio.c
b/net/9p/trans_virtio.c
index
5af18d1
..
2a16765
100644
(file)
--- a/
net/9p/trans_virtio.c
+++ b/
net/9p/trans_virtio.c
@@
-192,10
+192,10
@@
static int pack_sg_list(struct scatterlist *sg, int start,
s = rest_of_page(data);
if (s > count)
s = count;
+ BUG_ON(index > limit);
sg_set_buf(&sg[index++], data, s);
count -= s;
data += s;
- BUG_ON(index > limit);
}
return index-start;