diff options
author | Dan Williams <[email protected]> | 2017-03-17 12:48:09 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2017-03-21 06:44:32 +0100 |
commit | ed01e50acdd3e4a640cf9ebd28a7e810c3ceca97 (patch) | |
tree | 831c42c463fbf11a2e6da50ab68b5e8854de68c2 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0 (diff) |
device-dax: fix cdev leak
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")
Cc: <[email protected]>
Reported-by: Jason Gunthorpe <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
Signed-off-by: Logan Gunthorpe <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions