aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorMatthew Auld <[email protected]>2024-02-02 17:14:36 +0000
committerThomas Hellström <[email protected]>2024-02-08 09:51:04 +0100
commit9e3fc1d65d4e8cf302e289847ab165ad9358fdb2 (patch)
treecfd774f26d8911d6480a4f7a079db36341ab6cb7 /lib/test_fortify/write_overflow-strncpy-src.c
parent95c058c8ef1d5d9e39ab2039a5eea4d5b93f4117 (diff)
drm/xe/vm: don't ignore error when in_kthread
If GUP fails and we are in_kthread, we can have pinned = 0 and ret = 0. If that happens we call sg_alloc_append_table_from_pages() with n_pages = 0, which is not well behaved and can trigger: kernel BUG at include/linux/scatterlist.h:115! depending on if the pages array happens to be zeroed or not. Even if we don't hit that it crashes later when trying to dma_map the returned table. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Auld <[email protected]> Cc: Thomas Hellström <[email protected]> Cc: Matthew Brost <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 8087199cd5951c1eba26003b3e4296dbb2110adf) Signed-off-by: Thomas Hellström <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions