OSDN Git Service

mnt: Fix a memory stomp in umount
[android-x86/kernel.git] / fs / namespace.c
index 820af6a..cd1e968 100644 (file)
@@ -1370,6 +1370,8 @@ void umount_tree(struct mount *mnt, int how)
        }
        if (last) {
                last->mnt_hash.next = unmounted.first;
+               if (unmounted.first)
+                       unmounted.first->pprev = &last->mnt_hash.next;
                unmounted.first = tmp_list.first;
                unmounted.first->pprev = &unmounted.first;
        }