Re:Applying the Linus Torvalds “Good Taste” Coding Requirement
by eatbitseveryday on Wednesday October 26, 2016 @04:12PM
(#12800008)
> It is an error though if your code SEGFAULT on NULL head (and this one does).
There is no "SEGFAULT" in kernel code. SIGSEGV is a signal, which is only used at user-level.
NULL dereference in the kernel results in an "oops".
I believe it is also assumed in their code that "entry" is not going to be NULL, meaning "if (head == entry)" will never succeed if head is NULL.
I wouldn't care, but if you claim to be defensive, go full monty.