OSDN Git Service

compat_ioctl: move SG_GET_REQUEST_TABLE handling
authorArnd Bergmann <arnd@arndb.de>
Fri, 24 Aug 2018 12:53:13 +0000 (14:53 +0200)
committerArnd Bergmann <arnd@arndb.de>
Wed, 23 Oct 2019 15:23:47 +0000 (17:23 +0200)
commitfd6c3d5accea8e7ed267b8a47ffecf4d4869ae0c
treef6414838d62aeaf13707312189b6e46c2866d7f8
parent8f5d9f2ce3020be1a7924b4cc4a1f51164f2c0b7
compat_ioctl: move SG_GET_REQUEST_TABLE handling

SG_GET_REQUEST_TABLE is now the last ioctl command that needs a conversion
handler. This is only used in a single file, so the implementation should
be there.

I'm trying to simplify it in the process, to get rid of
the compat_alloc_user_space() and extra copy, by adding a
put_compat_request_table() function instead, which copies the data in
the right format to user space.

Cc: linux-scsi@vger.kernel.org
Cc: Doug Gilbert <dgilbert@interlog.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/scsi/sg.c
fs/compat_ioctl.c