+ mm-bugfix-set-current-reclaim_state-to-null-while-returning-from-kswapd.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm: bugfix: set current->reclaim_state to NULL while returning from kswapd()
has been added to the -mm tree.  Its filename is
     mm-bugfix-set-current-reclaim_state-to-null-while-returning-from-kswapd.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: Takamori Yamaguchi <takamori.yamaguchi@xxxxxxxxxxx>
Subject: mm: bugfix: set current->reclaim_state to NULL while returning from kswapd()

In kswapd(), set current->reclaim_state to NULL before returning, as
current->reclaim_state holds reference to variable on kswapd()'s stack.

In rare cases, while returning from kswapd() during memory off lining,
__free_slab() can access dangling pointer of current->reclaim_state.

Signed-off-by: Takamori Yamaguchi <takamori.yamaguchi@xxxxxxxxxxx>
Signed-off-by: Aaditya Kumar <aaditya.kumar@xxxxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/vmscan.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN mm/vmscan.c~mm-bugfix-set-current-reclaim_state-to-null-while-returning-from-kswapd mm/vmscan.c
--- a/mm/vmscan.c~mm-bugfix-set-current-reclaim_state-to-null-while-returning-from-kswapd
+++ a/mm/vmscan.c
@@ -3034,6 +3034,8 @@ static int kswapd(void *p)
 						&balanced_classzone_idx);
 		}
 	}
+
+	current->reclaim_state = NULL;
 	return 0;
 }
 
_

Patches currently in -mm which might be from takamori.yamaguchi@xxxxxxxxxxx are

mm-bugfix-set-current-reclaim_state-to-null-while-returning-from-kswapd.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


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux