]> git.baikalelectronics.ru Git - kernel.git/commit
udmabuf: add back sanity check
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 20 Jun 2022 07:15:47 +0000 (09:15 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Jun 2022 13:38:29 +0000 (08:38 -0500)
commit7595078c8686ef7d0ce160848144f3884f0e3b54
tree3440116ce35993ffedcfa6067503574208e77062
parent4764e99deee460568d59e6c88fcf402440c6a616
udmabuf: add back sanity check

Check vm_fault->pgoff before using it.  When we removed the warning, we
also removed the check.

Fixes: b4f2e096eaa6 ("udmabuf: drop WARN_ON() check.")
Reported-by: zdi-disclosures@trendmicro.com
Suggested-by: Linus Torvalds <torvalds@linuxfoundation.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/dma-buf/udmabuf.c