Commit 67f5d06d authored by Linus Torvalds's avatar Linus Torvalds

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
parents 48d4e137 5fcb08be
...@@ -192,10 +192,10 @@ static int pack_sg_list(struct scatterlist *sg, int start, ...@@ -192,10 +192,10 @@ static int pack_sg_list(struct scatterlist *sg, int start,
s = rest_of_page(data); s = rest_of_page(data);
if (s > count) if (s > count)
s = count; s = count;
BUG_ON(index > limit);
sg_set_buf(&sg[index++], data, s); sg_set_buf(&sg[index++], data, s);
count -= s; count -= s;
data += s; data += s;
BUG_ON(index > limit);
} }
return index-start; return index-start;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment