Re: [PATCH] OMAP: DSS2: OMAPFB: fix potential GPF

2021-06-28 Thread Aaro Koskinen
Hi, On Sat, Jun 26, 2021 at 01:33:23AM +0300, Pavel Skripkin wrote: > In case of allocation failures, all code paths was jumping > to this code: > > err: > kfree(fbi); > kfree(var); > kfree(fbops); > > return r; > > Since all 3 pointers placed on stack and don't initiali

[PATCH] OMAP: DSS2: OMAPFB: fix potential GPF

2021-06-28 Thread Pavel Skripkin
In case of allocation failures, all code paths was jumping to this code: err: kfree(fbi); kfree(var); kfree(fbops); return r; Since all 3 pointers placed on stack and don't initialized, they will be filled with some random values, which leads to deferencing random

Re: [PATCH] OMAP: DSS2: OMAPFB: fix potential GPF

2021-06-28 Thread Pavel Skripkin
On Sun, 27 Jun 2021 02:14:23 +0300 Aaro Koskinen wrote: > Hi, > > On Sat, Jun 26, 2021 at 01:33:23AM +0300, Pavel Skripkin wrote: > > In case of allocation failures, all code paths was jumping > > to this code: > > > > err: > > kfree(fbi); > > kfree(var); > > kfree(fbops); > > > >