diff options
author | Keith Busch <[email protected]> | 2014-10-03 11:15:47 -0600 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2014-11-04 13:18:32 -0700 |
commit | 9e60352cf83faaba57f99f6960b545687b8bbb20 (patch) | |
tree | da92850b088a1d975b2f489a67f5583f5f1d273e /tools/perf/scripts/python/stackcollapse.py | |
parent | 5940c8578fe720afbf4ef041bad0d72a101f1d88 (diff) |
NVMe: Do not open disks that are being deleted
It is possible the block layer will request to open a block device after
the driver deleted it. Subsequent releases will cause a double free,
or the disk's private_data is pointing to freed memory. This patch
protects the driver's freed disks from being opened and accessed: the
nvme namespaces are freed only when the device's refcount is 0, so at
that moment there were no active openers and no more should be allowed,
and it is safe to clear the disk's private_data that is about to be freed.
Signed-off-by: Keith Busch <[email protected]>
Reported-by: Henry Chow <[email protected]>
Signed-off-by: Matthew Wilcox <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions