Re: [PATCH] thermal: mtk: Allocate enough space for mtk_thermal.

2019-02-07 Thread Matthias Brugger
On 09/01/2019 06:57, Pi-Hsun Shih wrote: > The mtk_thermal struct contains a 'struct mtk_thermal_bank banks[];', > but the allocation only allocates sizeof(struct mtk_thermal) bytes, > which cause out of bound access with the ->banks[] member. Change it to > a fixed size array instead. > >

Re: [PATCH] thermal: mtk: Allocate enough space for mtk_thermal.

2019-01-30 Thread Zhang Rui
On δΈ‰, 2019-01-30 at 11:04 +0100, Daniel Lezcano wrote: > On 30/01/2019 10:25, Pi-Hsun Shih wrote: > > > > On Wed, Jan 30, 2019 at 3:44 PM Daniel Lezcano > > wrote: > > > > > > > > > On 30/01/2019 07:04, Peter Shih wrote: > > > > > > > > Adding Michael Kao to cc list. > > > > > > > > On Wed,

Re: [PATCH] thermal: mtk: Allocate enough space for mtk_thermal.

2019-01-30 Thread Daniel Lezcano
On 30/01/2019 10:25, Pi-Hsun Shih wrote: > On Wed, Jan 30, 2019 at 3:44 PM Daniel Lezcano > wrote: >> >> On 30/01/2019 07:04, Peter Shih wrote: >>> Adding Michael Kao to cc list. >>> >>> On Wed, Jan 9, 2019 at 1:57 PM Pi-Hsun Shih wrote: The mtk_thermal struct contains a 'struct

Re: [PATCH] thermal: mtk: Allocate enough space for mtk_thermal.

2019-01-30 Thread Pi-Hsun Shih
On Wed, Jan 30, 2019 at 3:44 PM Daniel Lezcano wrote: > > On 30/01/2019 07:04, Peter Shih wrote: > > Adding Michael Kao to cc list. > > > > On Wed, Jan 9, 2019 at 1:57 PM Pi-Hsun Shih wrote: > >> > >> The mtk_thermal struct contains a 'struct mtk_thermal_bank banks[];', > >> but the allocation

Re: [PATCH] thermal: mtk: Allocate enough space for mtk_thermal.

2019-01-29 Thread Daniel Lezcano
On 30/01/2019 07:04, Peter Shih wrote: > Adding Michael Kao to cc list. > > On Wed, Jan 9, 2019 at 1:57 PM Pi-Hsun Shih wrote: >> >> The mtk_thermal struct contains a 'struct mtk_thermal_bank banks[];', >> but the allocation only allocates sizeof(struct mtk_thermal) bytes, >> which cause out of

Re: [PATCH] thermal: mtk: Allocate enough space for mtk_thermal.

2019-01-29 Thread Peter Shih
Adding Michael Kao to cc list. On Wed, Jan 9, 2019 at 1:57 PM Pi-Hsun Shih wrote: > > The mtk_thermal struct contains a 'struct mtk_thermal_bank banks[];', > but the allocation only allocates sizeof(struct mtk_thermal) bytes, > which cause out of bound access with the ->banks[] member. Change it

[PATCH] thermal: mtk: Allocate enough space for mtk_thermal.

2019-01-08 Thread Pi-Hsun Shih
The mtk_thermal struct contains a 'struct mtk_thermal_bank banks[];', but the allocation only allocates sizeof(struct mtk_thermal) bytes, which cause out of bound access with the ->banks[] member. Change it to a fixed size array instead. Signed-off-by: Pi-Hsun Shih ---