From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ross Zwisler Subject: Re: [PATCH 05/18] ext2: Avoid DAX zeroing to corrupt data Date: Fri, 29 Apr 2016 10:30:48 -0600 Message-ID: <20160429163048.GA5888@linux.intel.com> References: <1461015341-20153-1-git-send-email-jack@suse.cz> <1461015341-20153-6-git-send-email-jack@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-mm@kvack.org, Ross Zwisler , Dan Williams , linux-nvdimm@lists.01.org, Matthew Wilcox To: Jan Kara Return-path: Content-Disposition: inline In-Reply-To: <1461015341-20153-6-git-send-email-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-ext4.vger.kernel.org On Mon, Apr 18, 2016 at 11:35:28PM +0200, Jan Kara wrote: > Currently ext2 zeroes any data blocks allocated for DAX inode however it > still returns them as BH_New. Thus DAX code zeroes them again in > dax_insert_mapping() which can possibly overwrite the data that has been > already stored to those blocks by a racing dax_io(). Avoid marking > pre-zeroed buffers as new. > > Signed-off-by: Jan Kara Reviewed-by: Ross Zwisler From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by ml01.01.org (Postfix) with ESMTP id 7DB651A1F7A for ; Fri, 29 Apr 2016 09:30:49 -0700 (PDT) Date: Fri, 29 Apr 2016 10:30:48 -0600 From: Ross Zwisler Subject: Re: [PATCH 05/18] ext2: Avoid DAX zeroing to corrupt data Message-ID: <20160429163048.GA5888@linux.intel.com> References: <1461015341-20153-1-git-send-email-jack@suse.cz> <1461015341-20153-6-git-send-email-jack@suse.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1461015341-20153-6-git-send-email-jack@suse.cz> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Jan Kara Cc: linux-nvdimm@lists.01.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org List-ID: On Mon, Apr 18, 2016 at 11:35:28PM +0200, Jan Kara wrote: > Currently ext2 zeroes any data blocks allocated for DAX inode however it > still returns them as BH_New. Thus DAX code zeroes them again in > dax_insert_mapping() which can possibly overwrite the data that has been > already stored to those blocks by a racing dax_io(). Avoid marking > pre-zeroed buffers as new. > > Signed-off-by: Jan Kara Reviewed-by: Ross Zwisler _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 29 Apr 2016 10:30:48 -0600 From: Ross Zwisler To: Jan Kara Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-mm@kvack.org, Ross Zwisler , Dan Williams , linux-nvdimm@lists.01.org, Matthew Wilcox Subject: Re: [PATCH 05/18] ext2: Avoid DAX zeroing to corrupt data Message-ID: <20160429163048.GA5888@linux.intel.com> References: <1461015341-20153-1-git-send-email-jack@suse.cz> <1461015341-20153-6-git-send-email-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461015341-20153-6-git-send-email-jack@suse.cz> Sender: owner-linux-mm@kvack.org List-ID: On Mon, Apr 18, 2016 at 11:35:28PM +0200, Jan Kara wrote: > Currently ext2 zeroes any data blocks allocated for DAX inode however it > still returns them as BH_New. Thus DAX code zeroes them again in > dax_insert_mapping() which can possibly overwrite the data that has been > already stored to those blocks by a racing dax_io(). Avoid marking > pre-zeroed buffers as new. > > Signed-off-by: Jan Kara Reviewed-by: Ross Zwisler -- 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