[syzbot] [keyrings?] [lsm?] [ext4?] possible deadlock in keyring_clear (2)

Edward Adam Davis eadavis at qq.com
Sun Sep 22 11:28:13 UTC 2024


Use GFP_NOFS

#syz test

diff --git a/lib/assoc_array.c b/lib/assoc_array.c
index 388e656ac974..b6fd9e909b79 100644
--- a/lib/assoc_array.c
+++ b/lib/assoc_array.c
@@ -977,7 +977,7 @@ struct assoc_array_edit *assoc_array_insert(struct assoc_array *array,
 	 */
 	BUG_ON(assoc_array_ptr_is_meta(object));
 
-	edit = kzalloc(sizeof(struct assoc_array_edit), GFP_KERNEL);
+	edit = kzalloc(sizeof(struct assoc_array_edit), GFP_NOFS);
 	if (!edit)
 		return ERR_PTR(-ENOMEM);
 	edit->array = array;




More information about the Linux-security-module-archive mailing list