linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Andi Kleen <ak@linux.intel.com>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Kees Cook <keescook@chromium.org>, Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Hellstrom <thellstrom@vmware.com>,
	Daniel Micay <danielmicay@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kref: Avoid null pointer dereference after WARN
Date: Wed, 28 Jun 2017 13:26:04 +0200	[thread overview]
Message-ID: <20170628112604.GA5234@dhcp22.suse.cz> (raw)
In-Reply-To: <20170627192939.GJ23705@tassilo.jf.intel.com>

On Tue 27-06-17 12:29:39, Andi Kleen wrote:
> On Tue, Jun 27, 2017 at 09:11:28PM +0200, Jason A. Donenfeld wrote:
[...]
> > The bigger question, though, is the value of these checks in the first
> > place. Has anybody written a coccinelle check to look into this
> > statically? Has it historically been a useful thing for driver
> > developers to have? Is it good defense in depth or is it overkill? At
> > the very least, the original authors of kref thought a WARN_ON was
> > warranted, which means probably a BUG_ON is a sensible fix, until
> > somebody does the work of investigating these more careful questions.
> 
> Right that's the question that should have been answered before
> this patch.
> 
> I don't think it was ever intended to be a defense, just as a hint
> for driver developers.
> 
> My suspicion is that they're mostly useless.

Completely agreed here!
-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2017-06-28 11:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27  3:52 [PATCH] kref: Avoid null pointer dereference after WARN Kees Cook
2017-06-27  7:06 ` Greg Kroah-Hartman
2017-06-27 11:00   ` Jason A. Donenfeld
2017-06-27 14:49     ` Andi Kleen
2017-06-27 19:11       ` Jason A. Donenfeld
2017-06-27 19:29         ` Andi Kleen
2017-06-28 11:26           ` Michal Hocko [this message]
2017-06-27 18:34   ` Kees Cook
2017-07-05 15:37   ` Peter Zijlstra
2017-06-28 11:57 ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170628112604.GA5234@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=ak@linux.intel.com \
    --cc=danielmicay@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=thellstrom@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).