Commit aab771f
Al Viro
take freeing of emptied mnt_namespace to namespace_unlock()
Freeing of a namespace must be delayed until after we'd dealt with mount
notifications (in namespace_unlock()). The reasons are not immediately
obvious (they are buried in ->prev_ns handling in mnt_notify()), and
having that free_mnt_ns() explicitly called after namespace_unlock()
is asking for trouble - it does feel like they should be OK to free
as soon as they've been emptied.
Make the things more explicit by setting 'emptied_ns' under namespace_sem
and having namespace_unlock() free the sucker as soon as it's safe to free.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>1 parent 6632068 commit aab771f
1 file changed
Lines changed: 12 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
1730 | 1731 | | |
1731 | 1732 | | |
1732 | 1733 | | |
| 1734 | + | |
1733 | 1735 | | |
1734 | 1736 | | |
1735 | 1737 | | |
1736 | 1738 | | |
1737 | 1739 | | |
| 1740 | + | |
1738 | 1741 | | |
1739 | 1742 | | |
1740 | 1743 | | |
1741 | 1744 | | |
| 1745 | + | |
1742 | 1746 | | |
1743 | 1747 | | |
1744 | 1748 | | |
| |||
1752 | 1756 | | |
1753 | 1757 | | |
1754 | 1758 | | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
1755 | 1764 | | |
1756 | 1765 | | |
1757 | 1766 | | |
| |||
2335 | 2344 | | |
2336 | 2345 | | |
2337 | 2346 | | |
2338 | | - | |
2339 | 2347 | | |
2340 | 2348 | | |
2341 | 2349 | | |
2342 | 2350 | | |
2343 | | - | |
2344 | 2351 | | |
2345 | 2352 | | |
2346 | 2353 | | |
| |||
2362 | 2369 | | |
2363 | 2370 | | |
2364 | 2371 | | |
2365 | | - | |
| 2372 | + | |
2366 | 2373 | | |
2367 | 2374 | | |
2368 | 2375 | | |
2369 | 2376 | | |
2370 | | - | |
2371 | | - | |
2372 | | - | |
2373 | | - | |
2374 | 2377 | | |
2375 | 2378 | | |
2376 | 2379 | | |
| |||
2678 | 2681 | | |
2679 | 2682 | | |
2680 | 2683 | | |
| 2684 | + | |
2681 | 2685 | | |
2682 | 2686 | | |
2683 | 2687 | | |
| |||
3656 | 3660 | | |
3657 | 3661 | | |
3658 | 3662 | | |
3659 | | - | |
3660 | | - | |
3661 | | - | |
3662 | | - | |
3663 | | - | |
3664 | | - | |
3665 | | - | |
3666 | 3663 | | |
3667 | 3664 | | |
3668 | 3665 | | |
| |||
6153 | 6150 | | |
6154 | 6151 | | |
6155 | 6152 | | |
| 6153 | + | |
6156 | 6154 | | |
6157 | 6155 | | |
6158 | 6156 | | |
6159 | 6157 | | |
6160 | | - | |
6161 | 6158 | | |
6162 | 6159 | | |
6163 | 6160 | | |
| |||
0 commit comments