The patch titled Subject: lkdtm: avoid calling lkdtm_do_action() with spinlock held has been added to the -mm tree. Its filename is lkdtm-avoid-calling-lkdtm_do_action-with-spin-lock-held.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Cong Wang <xiyou.wangcong@xxxxxxxxx> Subject: lkdtm: avoid calling lkdtm_do_action() with spinlock held lkdtm_do_action() may call sleeping functions like kmalloc(), so do not call it with spin lock held. Signed-off-by: WANG Cong <xiyou.wangcong@xxxxxxxxx> Cc: Prarit Bhargava <prarit@xxxxxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Cc: Greg Kroah-Hartman <greg@xxxxxxxxx> Reviewed-by: Dave Young <dyoung@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/misc/lkdtm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff -puN drivers/misc/lkdtm.c~lkdtm-avoid-calling-lkdtm_do_action-with-spin-lock-held drivers/misc/lkdtm.c --- a/drivers/misc/lkdtm.c~lkdtm-avoid-calling-lkdtm_do_action-with-spin-lock-held +++ a/drivers/misc/lkdtm.c @@ -354,6 +354,7 @@ static void lkdtm_do_action(enum ctype w static void lkdtm_handler(void) { unsigned long flags; + bool do_it = false; spin_lock_irqsave(&count_lock, flags); count--; @@ -361,10 +362,13 @@ static void lkdtm_handler(void) cp_name_to_str(cpoint), cp_type_to_str(cptype), count); if (count == 0) { - lkdtm_do_action(cptype); + do_it = true; count = cpoint_count; } spin_unlock_irqrestore(&count_lock, flags); + + if (do_it) + lkdtm_do_action(cptype); } static int lkdtm_register_cpoint(enum cname which) _ Subject: Subject: lkdtm: avoid calling lkdtm_do_action() with spinlock held Patches currently in -mm which might be from xiyou.wangcong@xxxxxxxxx are origin.patch linux-next.patch lkdtm-avoid-calling-lkdtm_do_action-with-spin-lock-held.patch x86-mm-fix-the-size-calculation-of-mapping-tables.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html