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