]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
libnvdimm/namespace: Fix a potential NULL pointer dereference
authorKangjie Lu <kjlu@umn.edu>
Tue, 12 Mar 2019 08:20:34 +0000 (03:20 -0500)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit01d8ed3f66fa91c2d02d2a9851f5f2e78766a059
treec56b74231642b3e3bf89cffd216b55974ce29ff4
parentb77eeb8429f5f0e6a1bf05bc7788bd841112fc17
libnvdimm/namespace: Fix a potential NULL pointer dereference

BugLink: https://bugs.launchpad.net/bugs/1838576
[ Upstream commit 55c1fc0af29a6c1b92f217b7eb7581a882e0c07c ]

In case kmemdup fails, the fix goes to blk_err to avoid NULL
pointer dereference.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/nvdimm/namespace_devs.c