From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760801AbZFPV5J (ORCPT ); Tue, 16 Jun 2009 17:57:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751895AbZFPV44 (ORCPT ); Tue, 16 Jun 2009 17:56:56 -0400 Received: from mx2.redhat.com ([66.187.237.31]:56675 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752047AbZFPV44 (ORCPT ); Tue, 16 Jun 2009 17:56:56 -0400 Message-ID: <4A381506.20102@redhat.com> Date: Tue, 16 Jun 2009 17:56:22 -0400 From: Rik van Riel Organization: Red Hat, Inc User-Agent: Thunderbird 2.0.0.17 (X11/20080915) MIME-Version: 1.0 To: Johannes Weiner CC: Andrew Morton , Hugh Dickins , Andrea Arcangeli , Izik Eidus , Nick Piggin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [patch 2/2] mm: remove task assumptions from swap token References: <1245189037-22961-2-git-send-email-hannes@cmpxchg.org> In-Reply-To: <1245189037-22961-2-git-send-email-hannes@cmpxchg.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Johannes Weiner wrote: > From: Hugh Dickins > > grab_swap_token() should not make any assumptions about the running > process as the swap token is an attribute of the address space and the > faulting mm is not necessarily current->mm. > > This fixes get_user_pages() from kernel threads which would blow up > when encountering a swapped out page and grab_swap_token() > dereferencing the unset for kernel threads current->mm. > > Signed-off-by: Hugh Dickins > Signed-off-by: Johannes Weiner Reviewed-by: Rik van Riel -- All rights reversed. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243]) by kanga.kvack.org (Postfix) with SMTP id 1167E6B0082 for ; Tue, 16 Jun 2009 17:54:44 -0400 (EDT) Message-ID: <4A381506.20102@redhat.com> Date: Tue, 16 Jun 2009 17:56:22 -0400 From: Rik van Riel MIME-Version: 1.0 Subject: Re: [patch 2/2] mm: remove task assumptions from swap token References: <1245189037-22961-2-git-send-email-hannes@cmpxchg.org> In-Reply-To: <1245189037-22961-2-git-send-email-hannes@cmpxchg.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: Johannes Weiner Cc: Andrew Morton , Hugh Dickins , Andrea Arcangeli , Izik Eidus , Nick Piggin , linux-mm@kvack.org, linux-kernel@vger.kernel.org List-ID: Johannes Weiner wrote: > From: Hugh Dickins > > grab_swap_token() should not make any assumptions about the running > process as the swap token is an attribute of the address space and the > faulting mm is not necessarily current->mm. > > This fixes get_user_pages() from kernel threads which would blow up > when encountering a swapped out page and grab_swap_token() > dereferencing the unset for kernel threads current->mm. > > Signed-off-by: Hugh Dickins > Signed-off-by: Johannes Weiner Reviewed-by: Rik van Riel -- All rights reversed. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org