Ocfs2/move_extents: Validate moving goal after the adjustment.
PATCH 2/2 Ocfs2/move_extents: Validate moving goal after the adjustment.
Hi,
I think this one (ea5e1675 upstream) is wrong. Validation was moved
before 'bg' was assinged any sane value. Also 'bg' is defined with NULL now so it hides real problem that 'bg' is used uninitialized. So currently as 'bg' is NULL from the begining it will blow up with null pointer dereference somewhere around test in line 489:
489: if (range->me_goal == le64_to_cpu(bg->bg_blkno))
490: range->me_goal += c_to_b;
Sorry for reply with no context but I'm not subscribed to ocfs2-devel.
Signature · 1 line
Mariusz Kozlowski
PATCH 2/2 Ocfs2/move_extents: Validate moving goal after the adjustment.
Quoted 7 lines · Mariusz Kozlowski
Hi,
I think this one (
ea5e1675upstream) is wrong. Validation was moved
before 'bg' was assinged any sane value. Also 'bg' is defined with NULL now so it hides real problem that 'bg' is used uninitialized. So currently as 'bg' is NULL from the begining it will blow up with null pointer dereference somewhere around test in line 489:
You're definitely correct, I'm blaming myself for not making things in order after moving the validation logic backwards a bit, thanks so much for pointing this out.
Tristan.
Quoted 5 lines
489: if (
range->me_goal==le64_to_cpu(bg->bg_blkno))
490:range->me_goal+=c_to_b;Sorry for reply with no context but I'm not subscribed to ocfs2-devel.