Tristan Ye
2011-Apr-27 22:06 UTC
[Ocfs2-devel] [PATCH 2/2] Ocfs2/move_extents: Validate moving goal after the adjustment.
On 06/12/2011 03:57 AM, Mariusz Kozlowski wrote:> 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: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.> > 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.
Mariusz Kozlowski
2011-Jun-11 19:57 UTC
[Ocfs2-devel] [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. -- Mariusz Kozlowski