[SCSI] compat_ioct: fix bsg SG_IO
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tue, 5 Jan 2010 10:41:44 +0000 (19:41 +0900)
committerJames Bottomley <James.Bottomley@suse.de>
Mon, 8 Feb 2010 19:43:18 +0000 (13:43 -0600)
bsg's SG_IO doesn't work on 32-bit userspace and 64-bit kernelspace.

The problem is that both sg and bsg drivers use SG_IO
ioctl. sg_ioctl_trans() does 32/64-bit conversion even against bsg
header. It messes up bsg header. bsg driver gets garbage.

This patch fixes sg_ioctl_trans to handle only sg header (struct
sg_io_hdr).

Reported-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
fs/compat_ioctl.c

Simple merge