summaryrefslogtreecommitdiff
path: root/include/linux/lockd
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2017-02-06 13:41:39 +1100
committerBen Hutchings <ben@decadent.org.uk>2017-06-05 21:17:08 +0100
commit249bb2131b376ff59eae4ecaa2eb3875c6d0beb9 (patch)
tree3fd23b7f2e7c55d8faeb1ad93217f5944f8bfc29 /include/linux/lockd
parent80e4a627b90d6c7ba6c766ce1d632b5925a8b99c (diff)
md: ensure md devices are freed before module is unloaded.
commit 9356863c9409efc79029c01a85d015efae977e69 upstream. Commit: cbd199837750 ("md: Fix unfortunate interaction with evms") change mddev_put() so that it would not destroy an md device while ->ctime was non-zero. Unfortunately, we didn't make sure to clear ->ctime when unloading the module, so it is possible for an md device to remain after module unload. An attempt to open such a device will trigger an invalid memory reference in: get_gendisk -> kobj_lookup -> exact_lock -> get_disk when tring to access disk->fops, which was in the module that has been removed. So ensure we clear ->ctime in md_exit(), and explain how that is useful, as it isn't immediately obvious when looking at the code. Fixes: cbd199837750 ("md: Fix unfortunate interaction with evms") Tested-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include/linux/lockd')
0 files changed, 0 insertions, 0 deletions