summaryrefslogtreecommitdiff
path: root/fs/crypto
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2017-03-17 12:48:09 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-20 14:28:41 +0200
commit8dd114ef78c855814558472ed13e99357e098e33 (patch)
treee756e2487da8dc19c0811fda9585e189d78c7a0c /fs/crypto
parent6240377c574b06c5ef900cab3be2625e482ae8bf (diff)
device-dax: fix cdev leak
commit ed01e50acdd3e4a640cf9ebd28a7e810c3ceca97 upstream. If device_add() fails, cleanup the cdev. Otherwise, we leak a kobj_map() with a stale device number. As Jason points out, there is a small possibility that userspace has opened and mapped the device in the time between cdev_add() and the device_add() failure. We need a new kill_dax_dev() helper to invalidate any established mappings. Fixes: ba09c01d2fa8 ("dax: convert to the cdev api") Reported-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/crypto')
0 files changed, 0 insertions, 0 deletions