Commit 4c0b481
committed
ext4: improve error recovery code paths in __ext4_remount()
If there are failures while changing the mount options in
__ext4_remount(), we need to restore the old mount options.
This commit fixes two problem. The first is there is a chance that we
will free the old quota file names before a potential failure leading
to a use-after-free. The second problem addressed in this commit is
if there is a failed read/write to read-only transition, if the quota
has already been suspended, we need to renable quota handling.
Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20230506142419.984260-2-tytso@mit.edu
Signed-off-by: Theodore Ts'o <tytso@mit.edu>1 parent 4b3cb1d commit 4c0b481
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6617 | 6617 | | |
6618 | 6618 | | |
6619 | 6619 | | |
6620 | | - | |
6621 | | - | |
6622 | | - | |
6623 | 6620 | | |
6624 | 6621 | | |
6625 | 6622 | | |
| |||
6629 | 6626 | | |
6630 | 6627 | | |
6631 | 6628 | | |
| 6629 | + | |
| 6630 | + | |
| 6631 | + | |
6632 | 6632 | | |
6633 | 6633 | | |
6634 | 6634 | | |
| |||
6642 | 6642 | | |
6643 | 6643 | | |
6644 | 6644 | | |
| 6645 | + | |
| 6646 | + | |
| 6647 | + | |
| 6648 | + | |
| 6649 | + | |
| 6650 | + | |
| 6651 | + | |
6645 | 6652 | | |
6646 | 6653 | | |
6647 | 6654 | | |
| |||
0 commit comments