summaryrefslogtreecommitdiff
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-08-17 23:51:42 (GMT)
committerNeilBrown <neilb@suse.de>2012-08-17 23:51:42 (GMT)
commite0ee778528bbaad28a5c69d2e219269a3a096607 (patch)
tree85e2824b053d7ade3ee64a98c0c5a535a9af013f /fs/dcache.c
parent667a5313ecd7308d79629c0738b0db588b0b0a4e (diff)
downloadlinux-fsl-qoriq-e0ee778528bbaad28a5c69d2e219269a3a096607.tar.xz
md/raid10: fix problem with on-stack allocation of r10bio structure.
A 'struct r10bio' has an array of per-copy information at the end. This array is declared with size [0] and r10bio_pool_alloc allocates enough extra space to store the per-copy information depending on the number of copies needed. So declaring a 'struct r10bio on the stack isn't going to work. It won't allocate enough space, and memory corruption will ensue. So in the two places where this is done, declare a sufficiently large structure and use that instead. The two call-sites of this bug were introduced in 3.4 and 3.5 so this is suitable for both those kernels. The patch will have to be modified for 3.4 as it only has one bug. Cc: stable@vger.kernel.org Reported-by: Ivan Vasilyev <ivan.vasilyev@gmail.com> Tested-by: Ivan Vasilyev <ivan.vasilyev@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'fs/dcache.c')
0 files changed, 0 insertions, 0 deletions