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
This commit is contained in:
commit
67f5d06d73
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user