From: Zev Weiss Date: Mon, 1 Sep 2008 12:02:12 +0000 (-0700) Subject: [MTD] mtdchar.c: Fix regression in MEMGETREGIONINFO ioctl() X-Git-Tag: v2.6.27-rc6~82^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b67c5f87c13f398ec3f4d6b455cb0bbeda8d7ac0;p=pandora-kernel.git [MTD] mtdchar.c: Fix regression in MEMGETREGIONINFO ioctl() The MEMGETREGIONINFO ioctl() in mtdchar.c was clobbering user memory by overwriting more than intended, due the size of struct mtd_erase_region_info changing in commit 0ecbc81adfcb9f15f86b05ff576b342ce81bbef8 ('Support for auto locking flash on power up'). Fix avoids this by copying struct members one by one with put_user(), as there is no longer a convenient struct to use the size of as the length argument to copy_to_user(). Signed-off-by: Zev Weiss Signed-off-by: David Woodhouse --- Reading git-diff-tree failed