]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
udmabuf: also check for F_SEAL_FUTURE_WRITE
authorJann Horn <jannh@google.com>
Wed, 4 Dec 2024 16:26:20 +0000 (17:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Dec 2024 13:02:18 +0000 (14:02 +0100)
commit185edda7d773bc6844af5b49bafd68bea1844e04
treefa22aaadf4b345616617e7dc24d267908ef3baae
parent93f08e5c393fa648a2e3e7ad2d37dd6a16cd726d
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: ab3948f58ff8 ("mm/memfd: add an F_SEAL_FUTURE_WRITE seal to memfd")
Cc: stable@vger.kernel.org
Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Jann Horn <jannh@google.com>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241204-udmabuf-fixes-v2-2-23887289de1c@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma-buf/udmabuf.c