Re: [patch 07/35] mm/gup: fix null pointer dereference detected by coverity

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

 



On Fri, Apr 10, 2020 at 4:54 PM Peter Xu <peterx@xxxxxxxxxx> wrote:
>
> Though I'm not sure how to teach Coverity about the fact.  Maybe a
> "BUG_ON(unlocked == NULL)" (which contains an unreachable() inside)
> before referencing unlocked?

Please don't add BUG_ON's.

In the "that would be a horrible bug" case, I'd rather see a NULL
pointer cause a fault, than see a BUG_ON.

                 Linus




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux