[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150403050943.GB9988@thunk.org>
Date: Fri, 3 Apr 2015 01:09:43 -0400
From: Theodore Ts'o <tytso@....edu>
To: Taesoo Kim <tsgatesv@...il.com>
Cc: adilger.kernel@...ger.ca, linux-ext4@...r.kernel.org,
linux-kernel@...r.kernel.org, taesoo@...ech.edu,
changwoo@...ech.edu, sanidhya@...ech.edu, blee@...ech.edu,
csong84@...ech.edu
Subject: Re: [PATCH 1/1] ext4: better error handling of kstrdup()
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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists