提交 2dceca65 编写于 作者: P Phil Elwell 提交者: Zheng Zengkai

staging: vchiq: Fix bulk transfers on 64-bit builds

stable inclusion
from stable-5.10.20
commit 9b6d62eea4c5e5f6424fbe09f1d88b6c8256d0b9
bugzilla: 50608

--------------------------------

[ Upstream commit 88753cc1 ]

The recent change to the bulk transfer compat function missed the fact
the relevant ioctl command is VCHIQ_IOC_QUEUE_BULK_TRANSMIT32, not
VCHIQ_IOC_QUEUE_BULK_TRANSMIT, as any attempt to send a bulk block
to the VPU would have shown.

Fixes: a4367cd2 ("staging: vchiq: convert compat bulk transfer")
Acked-by: NArnd Bergmann <arnd@arndb.de>
Acked-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NPhil Elwell <phil@raspberrypi.com>
Link: https://lore.kernel.org/r/20210105162030.1415213-3-phil@raspberrypi.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 372429db
...@@ -1714,7 +1714,7 @@ vchiq_compat_ioctl_queue_bulk(struct file *file, ...@@ -1714,7 +1714,7 @@ vchiq_compat_ioctl_queue_bulk(struct file *file,
{ {
struct vchiq_queue_bulk_transfer32 args32; struct vchiq_queue_bulk_transfer32 args32;
struct vchiq_queue_bulk_transfer args; struct vchiq_queue_bulk_transfer args;
enum vchiq_bulk_dir dir = (cmd == VCHIQ_IOC_QUEUE_BULK_TRANSMIT) ? enum vchiq_bulk_dir dir = (cmd == VCHIQ_IOC_QUEUE_BULK_TRANSMIT32) ?
VCHIQ_BULK_TRANSMIT : VCHIQ_BULK_RECEIVE; VCHIQ_BULK_TRANSMIT : VCHIQ_BULK_RECEIVE;
if (copy_from_user(&args32, argp, sizeof(args32))) if (copy_from_user(&args32, argp, sizeof(args32)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册