Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966688Ab3DQPIJ (ORCPT ); Wed, 17 Apr 2013 11:08:09 -0400 Received: from zene.cmpxchg.org ([85.214.230.12]:43261 "EHLO zene.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966461Ab3DQPII (ORCPT ); Wed, 17 Apr 2013 11:08:08 -0400 Date: Wed, 17 Apr 2013 08:07:57 -0700 From: Johannes Weiner To: Jerome Marchand Cc: "linux-mm@kvack.org" , linux-kernel , Mel Gorman Subject: Re: [PATCH] swap: redirty page if page write fails on swap file Message-ID: <20130417150757.GA21444@cmpxchg.org> References: <516E918B.3050309@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <516E918B.3050309@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 852 Lines: 18 On Wed, Apr 17, 2013 at 02:11:55PM +0200, Jerome Marchand wrote: > > Since commit 62c230b, swap_writepage() calls direct_IO on swap files. > However, in that case page isn't redirtied if I/O fails, and is therefore > handled afterwards as if it has been successfully written to the swap > file, leading to memory corruption when the page is eventually swapped > back in. > This patch sets the page dirty when direct_IO() fails. It fixes a memory > corruption that happened while using swap-over-NFS. > > Signed-off-by: Jerome Marchand Acked-by: Johannes Weiner -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/