diff options
author | Suren Baghdasaryan <surenb@google.com> | 2025-08-05 02:33:49 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2025-09-14 02:54:43 +0300 |
commit | 0b16f8bed19c6af82233cb57d01cfc944cce8fb7 (patch) | |
tree | 914aa388ba838a9f41f8db6b6630c13e5e59986f /rust/helpers/vmalloc.c | |
parent | cc483b328881bbccb55265a86731384d5176fe85 (diff) | |
download | linux-0b16f8bed19c6af82233cb57d01cfc944cce8fb7.tar.xz |
mm: change vma_start_read() to drop RCU lock on failure
vma_start_read() can drop and reacquire RCU lock in certain failure cases.
It's not apparent that the RCU session started by the caller of this
function might be interrupted when vma_start_read() fails to lock the vma.
This might become a source of subtle bugs and to prevent that we change
the locking rules for vma_start_read() to drop RCU read lock upon failure.
This way it's more obvious that RCU-protected objects are unsafe after
vma locking fails.
Link: https://lkml.kernel.org/r/20250804233349.1278678-2-surenb@google.com
Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Tested-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Jann Horn <jannh@google.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'rust/helpers/vmalloc.c')
0 files changed, 0 insertions, 0 deletions