From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751327AbbDCEZV (ORCPT ); Fri, 3 Apr 2015 00:25:21 -0400 Received: from imap.thunk.org ([74.207.234.97]:48586 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750762AbbDCEZT (ORCPT ); Fri, 3 Apr 2015 00:25:19 -0400 Date: Fri, 3 Apr 2015 00:25:16 -0400 From: "Theodore Ts'o" To: Taesoo Kim Cc: adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, taesoo@gatech.edu, changwoo@gatech.edu, sanidhya@gatech.edu, blee@gatech.edu, csong84@gatech.edu Subject: Re: [PATCH 1/1] ext4: better error handling of kstrdup() Message-ID: <20150403042516.GA9988@thunk.org> Mail-Followup-To: Theodore Ts'o , Taesoo Kim , adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, taesoo@gatech.edu, changwoo@gatech.edu, sanidhya@gatech.edu, blee@gatech.edu, csong84@gatech.edu References: <1426886514-23522-1-git-send-email-tsgatesv@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1426886514-23522-1-git-send-email-tsgatesv@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 20, 2015 at 05:21:54PM -0400, Taesoo Kim wrote: > Upon memory pressure, kstrdup() might fail and correctly > handle memory error, although current implementation do not > refer orig_data. > > NOTE. fortunately the correct impl works, other than a > corner case where kstrdup() fails and kzalloc() succeeds; > it might record 'NULL' in the log. > > Signed-off-by: Taesoo Kim Applied, thanks. - Ted