From: Jerome Brunet <jbrunet@baylibre.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: check ops pointer on clock register
Date: Mon, 18 Dec 2017 21:06:18 +0100 [thread overview]
Message-ID: <1513627578.29566.6.camel@baylibre.com> (raw)
In-Reply-To: <20171218190303.GV7997@codeaurora.org>
On Mon, 2017-12-18 at 11:03 -0800, Stephen Boyd wrote:
> On 12/18, Jerome Brunet wrote:
> > Nothing really prevents a provider from (trying to) register a clock
> > without providing the clock ops structure.
> >
> > We do check the individual fields before using them, but not the
> > structure pointer itself. This may have the usual nasty consequences when
> > the pointer is dereferenced, mostly likely when checking one the field
> > during the initialization.
>
> Yes, that nasty consequence should be a kernel oops,
Precisely
> and the
> developer should notice that before submitting the driver for
> inclusion.
Agreed. But people may make mistakes, which is why (at least partly) we
do checks, isn't it ?
> I don't think we really care to return an error here
> if this happens.
>
I don't understand why we would let a oops happen when can catch the error
properly ?
next prev parent reply other threads:[~2017-12-18 20:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-18 17:00 [PATCH] clk: check ops pointer on clock register Jerome Brunet
2017-12-18 19:03 ` Stephen Boyd
2017-12-18 20:06 ` Jerome Brunet [this message]
2017-12-18 20:12 ` Michael Turquette
2017-12-18 21:06 ` Stephen Boyd
2017-12-18 21:11 ` Jerome Brunet
2017-12-19 8:50 ` Geert Uytterhoeven
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=1513627578.29566.6.camel@baylibre.com \
--to=jbrunet@baylibre.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.org \
/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