Commit bb282aa
ext4: improve error recovery code paths in __ext4_remount()
commit 4c0b4818b1f636bc96359f7817a2d8bab6370162 upstream.
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: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent d2c5488 commit bb282aa
1 file changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6029 | 6029 | | |
6030 | 6030 | | |
6031 | 6031 | | |
6032 | | - | |
6033 | | - | |
6034 | | - | |
6035 | 6032 | | |
6036 | 6033 | | |
6037 | 6034 | | |
| |||
6041 | 6038 | | |
6042 | 6039 | | |
6043 | 6040 | | |
| 6041 | + | |
| 6042 | + | |
| 6043 | + | |
6044 | 6044 | | |
6045 | 6045 | | |
6046 | 6046 | | |
| |||
6060 | 6060 | | |
6061 | 6061 | | |
6062 | 6062 | | |
| 6063 | + | |
| 6064 | + | |
| 6065 | + | |
| 6066 | + | |
| 6067 | + | |
| 6068 | + | |
| 6069 | + | |
6063 | 6070 | | |
6064 | 6071 | | |
6065 | 6072 | | |
| |||
0 commit comments