lkml.org 
[lkml]   [2021]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 112/190] Revert "libnvdimm/namespace: Fix a potential NULL pointer dereference"
On Wed, Apr 21, 2021 at 6:08 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> This reverts commit 55c1fc0af29a6c1b92f217b7eb7581a882e0c07c.
>
> Commits from @umn.edu addresses have been found to be submitted in "bad
> faith" to try to test the kernel community's ability to review "known
> malicious" changes. The result of these submissions can be found in a
> paper published at the 42nd IEEE Symposium on Security and Privacy
> entitled, "Open Source Insecurity: Stealthily Introducing
> Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University
> of Minnesota) and Kangjie Lu (University of Minnesota).
>
> Because of this, all submissions from this group must be reverted from
> the kernel tree and will need to be re-reviewed again to determine if
> they actually are a valid fix. Until that work is complete, remove this
> change to ensure that no problems are being introduced into the
> codebase.
>
> Cc: Kangjie Lu <kjlu@umn.edu>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Upon re-review this change still looks correct, no need for a revert.

> ---
> drivers/nvdimm/namespace_devs.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c
> index 2403b71b601e..04f7cb7a23b7 100644
> --- a/drivers/nvdimm/namespace_devs.c
> +++ b/drivers/nvdimm/namespace_devs.c
> @@ -2297,12 +2297,9 @@ static struct device *create_namespace_blk(struct nd_region *nd_region,
> if (!nsblk->uuid)
> goto blk_err;
> memcpy(name, nd_label->name, NSLABEL_NAME_LEN);
> - if (name[0]) {
> + if (name[0])
> nsblk->alt_name = kmemdup(name, NSLABEL_NAME_LEN,
> GFP_KERNEL);
> - if (!nsblk->alt_name)
> - goto blk_err;
> - }
> res = nsblk_add_resource(nd_region, ndd, nsblk,
> __le64_to_cpu(nd_label->dpa));
> if (!res)
> --
> 2.31.1
>

\
 
 \ /
  Last update: 2021-04-23 22:58    [W:1.660 / U:1.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site