Messages in this thread | | | Date | Thu, 2 Jun 2011 14:23:48 -0700 | From | Chris Wright <> | Subject | Re: [PATCH] ksm: fix race between ksmd and exiting task |
| |
* Andrea Righi (andrea@betterlinux.com) wrote: > On Thu, Jun 02, 2011 at 10:35:49AM -0700, Chris Wright wrote: > > Andrea Righi reported a case where an exiting task can race against > > ksmd. > > > > ksm_scan.mm_slot == the only registered mm > > CPU 1 (bug program) CPU 2 (ksmd) > > list_empty() is false > > lock > > ksm_scan.mm_slot > > list_del > > unlock > > slot == &ksm_mm_head (but list is now empty_) > > > > Close this race by revalidating that the new slot is not simply the list > > head again. > > I confirm this fixes the problem on my side. > > Tested-by: Andrea Righi <andrea@betterlinux.com>
Great, thanks for verifying.
thanks, -chris
| |