Commit 01a1817a authored by J. R. Okajima's avatar J. R. Okajima
Browse files

aufs: possible bugfix, ignore the being freed sbinfo object



The scenario is very similar to previous commit
"aufs: bugfix, ignore the being freed dynop object".
One exception is that this commit is for sbinfo object which is managed
by kobject (instead of kref).

In order to enter the plink-maintenance mode, users write an ID to
"/proc/fs/aufs/plink_maint" (this path is defined as macros in
include/uapi/linux/aufs_type.h).  If someone else is unmounting the
aufs mount corresponding that ID, then the searcher task may find a
being freed sbinfo object.
The problem and the fix is very similar to previous commit
"aufs: bugfix, ignore the being freed dynop object".
Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
(cherry picked from commit 949b498ae30797b19b9e7ac9b230815f31ffe378)
parent e870e818
......@@ -48,8 +48,8 @@ static int au_procfs_plm_write_si(struct file *file, unsigned long id)
hlist_bl_lock(&au_sbilist);
hlist_bl_for_each_entry(sbinfo, pos, &au_sbilist, si_list)
if (id == sysaufs_si_id(sbinfo)) {
kobject_get(&sbinfo->si_kobj);
sb = sbinfo->si_sb;
if (kobject_get_unless_zero(&sbinfo->si_kobj))
sb = sbinfo->si_sb;
break;
}
hlist_bl_unlock(&au_sbilist);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment