linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Taesoo Kim <tsgatesv@gmail.com>
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()
Date: Fri, 3 Apr 2015 01:09:43 -0400	[thread overview]
Message-ID: <20150403050943.GB9988@thunk.org> (raw)
In-Reply-To: <1426886514-23522-1-git-send-email-tsgatesv@gmail.com>

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 <tsgatesv@gmail.com>

Did you test this patch?  If there are no mount options (such as when
mounting the root file system, data is NULL, so orig_data is NULL),
and the mount fails.  So a kernel won't boot with this patch applied.

					- Ted

  parent reply	other threads:[~2015-04-03  5:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 21:21 [PATCH 1/1] ext4: better error handling of kstrdup() Taesoo Kim
2015-04-03  4:25 ` Theodore Ts'o
2015-04-03  5:09 ` Theodore Ts'o [this message]
2015-04-03 17:44   ` Taesoo Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150403050943.GB9988@thunk.org \
    --to=tytso@mit.edu \
    --cc=adilger.kernel@dilger.ca \
    --cc=blee@gatech.edu \
    --cc=changwoo@gatech.edu \
    --cc=csong84@gatech.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sanidhya@gatech.edu \
    --cc=taesoo@gatech.edu \
    --cc=tsgatesv@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).