scsi: aacraid: Improve compat_ioctl handlers
authorArnd Bergmann <arnd@arndb.de>
Fri, 30 Oct 2020 16:44:19 +0000 (17:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:02 +0000 (11:53 +0100)
commit6dd60eb9b3de5fc43e48a10f7de3a2d352f3d658
treeef6975f3266d8140ce7f618ad90dfd4933a972ea
parent92b6415e977cc30a8c94adddfd1166d46c568362
scsi: aacraid: Improve compat_ioctl handlers

[ Upstream commit 077054215a7f787e389a807ece8a39247abbbc1e ]

The use of compat_alloc_user_space() can be easily replaced by handling
compat arguments in the regular handler, and this will make it work for
big-endian kernels as well, which at the moment get an invalid indirect
pointer argument.

Calling aac_ioctl() instead of aac_compat_do_ioctl() means the compat and
native code paths behave the same way again, which they stopped when the
adapter health check was added only in the native function.

Link: https://lore.kernel.org/r/20201030164450.1253641-1-arnd@kernel.org
Fixes: 572ee53a9bad ("scsi: aacraid: check adapter health")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/aacraid/commctrl.c
drivers/scsi/aacraid/linit.c