Commit bfa4b9c
committed
Fix prev_hdr use-after-free in l2arc_write_sublist
prev_hdr is dereferenced after the sublist lock is dropped for write I/O
but nothing prevents it from being freed during that window. Refresh
prev_hdr from the local marker's neighbor after reacquiring the lock,
since markers cannot be evicted. Add a NULL guard for the case where the
marker is at the list boundary.
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>1 parent d308869 commit bfa4b9c
1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9829 | 9829 | | |
9830 | 9830 | | |
9831 | 9831 | | |
9832 | | - | |
| 9832 | + | |
9833 | 9833 | | |
9834 | | - | |
| 9834 | + | |
| 9835 | + | |
| 9836 | + | |
9835 | 9837 | | |
| 9838 | + | |
| 9839 | + | |
| 9840 | + | |
9836 | 9841 | | |
9837 | 9842 | | |
9838 | 9843 | | |
| |||
9854 | 9859 | | |
9855 | 9860 | | |
9856 | 9861 | | |
9857 | | - | |
| 9862 | + | |
9858 | 9863 | | |
9859 | 9864 | | |
9860 | 9865 | | |
| |||
0 commit comments