Muli,
Is the BUG_ON() necessary? the next line just goes and deref's it,
which should lead to a shiny NULL pointer deref.
No, it's not really necessary, more a style thing. The BUG_ON only adds
an extra 3 instructions (subfic, addi and tdnei), which should be tiny
compared to the indirect branch.
Also, it makes it a little easier for a user to understand: "there's a
bug in the kernel" vs. "invalid memory access".
Jeremy