From: Xi Wang Date: Thu, 9 Feb 2012 01:13:37 +0000 (-0800) Subject: nilfs2: avoid overflowing segment numbers in nilfs_ioctl_clean_segments() X-Git-Tag: v3.3-rc3~5^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ecd3c7ea76488c63b4b0a2561fd7eaf96cc8028;p=pandora-kernel.git nilfs2: avoid overflowing segment numbers in nilfs_ioctl_clean_segments() nsegs is read from userspace. Limit its value and avoid overflowing nsegs * sizeof(__u64) in the subsequent call to memdup_user(). This patch complements 481fe17e973fb9 ("nilfs2: potential integer overflow in nilfs_ioctl_clean_segments()"). Signed-off-by: Xi Wang Cc: Haogang Chen Acked-by: Ryusuke Konishi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed