[OpenAFS-devel] Kernel panic with openafs 1.4.0

chas williams - CONTRACTOR chas@cmf.nrl.navy.mil
Thu, 24 Aug 2006 19:02:16 -0400


In message <87FD290119261E9B530AAD58@sirius.fac.cs.cmu.edu>,Jeffrey Hutzelman writes:
>Besides calling BUG() inline, which is a good thing, your code has the 
>effect of changing the behavior on 2.4 so that we call BUG() instead of 
>trying to dereference a NULL pointer.  I'm pretty sure there's a reason we 

that can be fixed i think.  i dont think BUG() is available in all
2.4 kernels.  just recent ones.

>Also, your change to AFS_ASSERT_GLOCK() means that the macro now expands to 
>a statement instead of an expression, and a statement that might affect 
>flow control at that.  Consider something like this:
>Instead, I'd leave AFS_ASSERT_GLOCK() alone, and arrange for osi_Panic() to 
>also expand to an expression.  Maybe something like
>
>#define osi_Panic(msg...) (printk(KERN_CRIT "openafs: " msg), bug(), 0)

someone else already pointed that out.  it probably should just be
wrapped in a do { } while(0) but your alternative is probably fine.
however, it seems a little less clear than the do while.