Skip to content

Commit 4fa2c63

Browse files
thejhgregkh
authored andcommitted
udmabuf: also check for F_SEAL_FUTURE_WRITE
commit 0a16e24e34f28210f68195259456c73462518597 upstream. When F_SEAL_FUTURE_WRITE was introduced, it was overlooked that udmabuf must reject memfds with this flag, just like ones with F_SEAL_WRITE. Fix it by adding F_SEAL_FUTURE_WRITE to SEALS_DENIED. Fixes: ab3948f ("mm/memfd: add an F_SEAL_FUTURE_WRITE seal to memfd") Cc: [email protected] Acked-by: Vivek Kasireddy <[email protected]> Signed-off-by: Jann Horn <[email protected]> Reviewed-by: Joel Fernandes (Google) <[email protected]> Signed-off-by: Vivek Kasireddy <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ef942d2 commit 4fa2c63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma-buf/udmabuf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ static const struct dma_buf_ops udmabuf_ops = {
164164
};
165165

166166
#define SEALS_WANTED (F_SEAL_SHRINK)
167-
#define SEALS_DENIED (F_SEAL_WRITE)
167+
#define SEALS_DENIED (F_SEAL_WRITE|F_SEAL_FUTURE_WRITE)
168168

169169
static long udmabuf_create(struct miscdevice *device,
170170
struct udmabuf_create_list *head,

0 commit comments

Comments
 (0)