Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760075Ab3DCEZy (ORCPT ); Wed, 3 Apr 2013 00:25:54 -0400 Received: from mail-da0-f46.google.com ([209.85.210.46]:60175 "EHLO mail-da0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755825Ab3DCEZx (ORCPT ); Wed, 3 Apr 2013 00:25:53 -0400 MIME-Version: 1.0 In-Reply-To: <1364958193.4353.4.camel@kjgkr> References: <1364958193.4353.4.camel@kjgkr> Date: Wed, 3 Apr 2013 13:25:52 +0900 Message-ID: Subject: Re: [PATCH] To add NULL pointer check From: Namjae Jeon To: jaegeuk.kim@samsung.com Cc: P J P , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Petr Matousek Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1500 Lines: 44 2013/4/3, Jaegeuk Kim : > Hi, > Thank you for your contribution. > > As I consider the null pointer check, generic_writepages() originally > does so. > Therefore, I think f2fs_write_data_pages() is better to handle this. > Please review the modified patch. > Thanks, > > --- > From d3c811a51c7062fb1b66bec910ed346447c02032 Mon Sep 17 00:00:00 2001 > From: P J P > Date: Wed, 3 Apr 2013 11:38:00 +0900 > Subject: [PATCH] f2fs: add NULL pointer check > Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, > linux-f2fs-devel@lists.sourceforge.net > > Commit - fa9150a84c - replaces a call to generic_writepages() in > f2fs_write_data_pages() with write_cache_pages(), with a function > pointer > argument pointing to routine: __f2fs_writepage. > > -> > https://git.kernel.org/linus/fa9150a84ca333f68127097c4fa1eda4b3913a22 > > This patch adds a NULL pointer check in f2fs_write_data_pages() to > avoid > a possible NULL pointer dereference, in case if - > mapping->a_ops->writepage - > is NULL. Yes, I agree. Looks better! Reviewed-by: Namjae Jeon Thanks. > > Signed-off-by: P J P > Signed-off-by: Jaegeuk Kim > --- -- 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/