summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-06-18 12:21:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-06-18 12:21:25 -0700
commit67f5d06d732f591449a48242d40928f59d39287d (patch)
tree9ca561cedb0ca6985cecaf494481740ab8f434b4 /net
parent48d4e137ea3174dc77efe1cc20570e95af2ffc9e (diff)
parent5fcb08befaf57faa1b00e514915c1660252b8c26 (diff)
downloadlinux-next-67f5d06d732f591449a48242d40928f59d39287d.tar.gz
Merge branch 'v9fs-devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
Pull a 9p bugfix from Eric Van Hensbergen. * 'v9fs-devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: 9p: BUG before corrupting memory
Diffstat (limited to 'net')
-rw-r--r--net/9p/trans_virtio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index 5af18d11b518..2a167658bb95 100644
--- 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;