From: Peter Osterlund ioctl_by_bdev may only be used INSIDE the kernel. If the "arg" argument refers to memory that is accessed by put_user/get_user in the ioctl function, the memory needs to be in the kernel address space (that's the set_fs(KERNEL_DS) doing in the ioctl_by_bdev). This works on i386 because even with set_fs(KERNEL_DS) the user space memory is still accessible with put_user/get_user. That is not true for s390. In short the ioctl implementation of the pktcdvd device driver is horribly broken. Signed-off-by: Peter Osterlund Signed-off-by: Andrew Morton --- drivers/block/pktcdvd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/block/pktcdvd.c~packet-driver-ioctl-fix drivers/block/pktcdvd.c --- 25/drivers/block/pktcdvd.c~packet-driver-ioctl-fix 2005-05-15 17:31:11.000000000 -0700 +++ 25-akpm/drivers/block/pktcdvd.c 2005-05-15 17:31:11.000000000 -0700 @@ -2406,7 +2406,7 @@ static int pkt_ioctl(struct inode *inode case CDROM_LAST_WRITTEN: case CDROM_SEND_PACKET: case SCSI_IOCTL_SEND_COMMAND: - return ioctl_by_bdev(pd->bdev, cmd, arg); + return blkdev_ioctl(pd->bdev->bd_inode, file, cmd, arg); case CDROMEJECT: /* @@ -2414,7 +2414,7 @@ static int pkt_ioctl(struct inode *inode * have to unlock it or else the eject command fails. */ pkt_lock_door(pd, 0); - return ioctl_by_bdev(pd->bdev, cmd, arg); + return blkdev_ioctl(pd->bdev->bd_inode, file, cmd, arg); default: printk("pktcdvd: Unknown ioctl for %s (%x)\n", pd->name, cmd); _