summaryrefslogtreecommitdiff
path: root/drivers/input/mouse/synaptics.c
diff options
context:
space:
mode:
authorHeinz Mauelshagen <heinzm@redhat.com>2014-10-17 13:38:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-21 09:23:03 -0800
commit18804873848025d6a1bf3a8fb8f36414890f5af7 (patch)
tree12c4ffe1d78ffebae6e64a61a63cf2bcb08aae38 /drivers/input/mouse/synaptics.c
parent084a4fc24d535504a81822778adca1581bd7d9f0 (diff)
dm raid: ensure superblock's size matches device's logical block size
commit 40d43c4b4cac4c2647bf07110d7b07d35f399a84 upstream. The dm-raid superblock (struct dm_raid_superblock) is padded to 512 bytes and that size is being used to read it in from the metadata device into one preallocated page. Reading or writing this on a 512-byte sector device works fine but on a 4096-byte sector device this fails. Set the dm-raid superblock's size to the logical block size of the metadata device, because IO at that size is guaranteed too work. Also add a size check to avoid silent partial metadata loss in case the superblock should ever grow past the logical block size or PAGE_SIZE. [includes pointer math fix from Dan Carpenter] Reported-by: "Liuhua Wang" <lwang@suse.com> Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input/mouse/synaptics.c')
0 files changed, 0 insertions, 0 deletions