Re: [PATCH] clk: check ops pointer on clock register

2017-12-19 Thread Geert Uytterhoeven
On Mon, Dec 18, 2017 at 8:03 PM, 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 it

Re: [PATCH] clk: check ops pointer on clock register

2017-12-18 Thread Jerome Brunet
On Mon, 2017-12-18 at 13:06 -0800, Stephen Boyd wrote: > On 12/18, Michael Turquette wrote: > > Hi Jerome & Stephen, > > > > On Mon, Dec 18, 2017 at 12:06 PM, Jerome Brunet > > wrote: > > > On Mon, 2017-12-18 at 11:03 -0800, Stephen Boyd wrote: > > > > On 12/18, Jerome Brunet wrote: > > > > > No

Re: [PATCH] clk: check ops pointer on clock register

2017-12-18 Thread Stephen Boyd
On 12/18, Michael Turquette wrote: > Hi Jerome & Stephen, > > On Mon, Dec 18, 2017 at 12:06 PM, Jerome Brunet wrote: > > 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 > >> > wi

Re: [PATCH] clk: check ops pointer on clock register

2017-12-18 Thread Michael Turquette
Hi Jerome & Stephen, On Mon, Dec 18, 2017 at 12:06 PM, Jerome Brunet wrote: > 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. >> > >>

Re: [PATCH] clk: check ops pointer on clock register

2017-12-18 Thread Jerome Brunet
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 poi

Re: [PATCH] clk: check ops pointer on clock register

2017-12-18 Thread Stephen Boyd
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

[PATCH] clk: check ops pointer on clock register

2017-12-18 Thread Jerome Brunet
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