aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/dma-buf
diff options
context:
space:
mode:
authorDaniel Vetter <[email protected]>2020-04-07 15:30:02 +0200
committerSumit Semwal <[email protected]>2020-04-27 16:29:41 +0530
commita5bff92eaac45bdf6221badf9505c26792fdf99e (patch)
treea12728f7c2d44acebd9711ee52ea8c89c3e72cf0 /drivers/dma-buf
parentdrm/edid: Fix off-by-one in DispID DTD pixel clock (diff)
downloadwireguard-linux-a5bff92eaac45bdf6221badf9505c26792fdf99e.tar.xz
wireguard-linux-a5bff92eaac45bdf6221badf9505c26792fdf99e.zip
dma-buf: Fix SET_NAME ioctl uapi
The uapi is the same on 32 and 64 bit, but the number isn't. Everyone who botched this please re-read: https://www.kernel.org/doc/html/v5.4-preprc-cpu/ioctl/botching-up-ioctls.html Also, the type argument for the ioctl macros is for the type the void __user *arg pointer points at, which in this case would be the variable-sized char[] of a 0 terminated string. So this was botched in more than just the usual ways. Cc: Sumit Semwal <[email protected]> Cc: Chenbo Feng <[email protected]> Cc: Greg Hackmann <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Martin Liu <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Tested-by: Martin Liu <[email protected]> Reviewed-by: Martin Liu <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> [sumits: updated some checkpatch fixes, corrected author email] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/dma-buf')
-rw-r--r--drivers/dma-buf/dma-buf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index ccc9eda1bc28..de155d41d274 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -388,7 +388,8 @@ static long dma_buf_ioctl(struct file *file,
return ret;
- case DMA_BUF_SET_NAME:
+ case DMA_BUF_SET_NAME_A:
+ case DMA_BUF_SET_NAME_B:
return dma_buf_set_name(dmabuf, (const char __user *)arg);
default:
OSZAR »