Re: [PATCH] [IA64] kexec: move the dereference below the NULL test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 9, 2012 at 9:49 PM, Wei Yongjun <weiyj.lk@xxxxxxxxx> wrote:
>         BUG_ON(!image);
> +       code_addr = (unsigned long)page_address(image->control_code_page);

Applied. But this really isn't much of an improvement. In this case
the "NULL test"
is a BUG_ON(). So we are going to crash with or without this patch. Arguably the
messages the user sees in the new case are fractionally better (BUG_ON will
tell the user the file and line number, just hitting the deref NULL in
the original
would require a few extra seconds of debug to decode the IP and stack trace).

I wonder if spatch/coccinelle should be told not to bother reporting
dereferences
like this before a BUG_ON?

-Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux