Re:[PATCH v7] cpufreq/pasemi: fix an use-after-freeinpas_cpufreq_cpu_init()

2019-07-18 Thread wen.yang99
>>> Hello Wen, >>> >>> Thanks for your patch! >>> >>> Did you test your patch with a P.A. Semi board? >>> >> Hello Christian, thank you. >> We don't have a P.A. Semi board yet, so we didn't test it. >> If you have such a board, could you please kindly help to test it? >> >> -- >> Thanks and regards

Re: [PATCH v6] cpufreq/pasemi: fix an use-after-free inpas_cpufreq_cpu_init()

2019-07-16 Thread wen.yang99
> > The cpu variable is still being used in the of_get_property() call > > after the of_node_put() call, which may result in use-after-free. > > > > Fixes: a9acc26b75f6 ("cpufreq/pasemi: fix possible object reference leak") > > Signed-off-by: Wen Yang > > Cc: "Rafael J. Wysocki" > > Cc: Viresh Ku

Re: [PATCH v6] cpufreq/pasemi: fix an use-after-free inpas_cpufreq_cpu_init()

2019-07-11 Thread wen.yang99
> > The cpu variable is still being used in the of_get_property() call > > after the of_node_put() call, which may result in use-after-free. > > > > Fixes: a9acc26b75f6 ("cpufreq/pasemi: fix possible object reference leak") > > Signed-off-by: Wen Yang > > Cc: "Rafael J. Wysocki" > > Cc: Viresh Ku

Re: Coccinelle: Checking of_node_put() calls with SmPL

2019-07-10 Thread wen.yang99
> > we developed a coccinelle script to detect such problems. > > Would you find the implementation of the function “dt_init_idle_driver” > suspicious according to discussed source code search patterns? > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/cpuidle/dt_id

Re: [1/2] powerpc/83xx: fix use-after-free in mpc831x_usb_cfg()

2019-07-10 Thread wen.yang99
> > The immr_node variable is still being used after the of_node_put() call, > > which may result in use-after-free. > > Was any known source code analysis tool involved to point such > a questionable implementation detail out for further software > development considerations? Hi Markus, we deve

Re: powerpc/83xx: fix use-after-free on mpc831x_usb_cfg()

2019-07-08 Thread wen.yang99
> > The np variable is still being used after the of_node_put() call, > > > which may result in use-after-free. > > > We fix this issue by calling of_node_put() after the last usage. > > > I imagine that this commit description can be improved a bit more > (by mentioning the influence of “immr_

Re:[PATCH v3] cpufreq/pasemi: fix an use-after-free inpas_cpufreq_cpu_init()

2019-07-08 Thread wen.yang99
> Hello Wen, > > Thanks for your patch! > > Did you test your patch with a P.A. Semi board? > Hello Christian, thank you. We don't have a P.A. Semi board yet, so we didn't test it. If you have such a board, could you please kindly help to test it? -- Thanks and regards, Wen

Re: [PATCH v2] cpufreq/pasemi: fix an use-after-free inpas_cpufreq_cpu_init()

2019-07-08 Thread wen.yang99
> > The cpu variable is still being used in the of_get_property() call > > after the of_node_put() call, which may result in use-after-free. > > > > Fixes: a9acc26b75f ("cpufreq/pasemi: fix possible object reference leak") > > Signed-off-by: Wen Yang > > Cc: "Rafael J. Wysocki" > > Cc: Viresh Kum

Re: [PATCH] cpufreq/pasemi: fix an use-after-free inpas_cpufreq_cpu_init()

2019-07-08 Thread wen.yang99
> > The cpu variable is still being used in the of_get_property() call > > after the of_node_put() call, which may result in use-after-free. > > > > Fixes: a9acc26b75f ("cpufreq/pasemi: fix possible object reference leak") > > Signed-off-by: Wen Yang > > Cc: "Rafael J. Wysocki" > > Cc: Viresh Kum

答复: Re: [PATCH v2] powerpc/8xx: fix possible object reference leak

2019-03-25 Thread wen.yang99
>> The call to of_find_compatible_node returns a node pointer with refcount >> incremented thus it must be explicitly decremented after the last >> usage. >> irq_domain_add_linear also calls of_node_get to increase refcount, >> so irq_domain will not be affected when it is released. >> >> Detected

Re: Re: [PATCH 5/5] powerpc/8xx: fix possible object reference leak

2019-03-22 Thread wen.yang99
Hi, Christophe, >> The call to of_find_compatible_node returns a node pointer with refcount >> incremented thus it must be explicitly decremented after the last >> usage. >> irq_domain_add_linear also calls of_node_get to increase refcount, >> so irq_domain will not be affected when it is released

Re: [PATCH v3] soc/fsl/qe: fix err handling of ucc_of_parse_tdm

2018-12-28 Thread wen.yang99
Hi David, Thank you, we'll fix it soon. Best wishes, Wen --Original Mail-- Sender: DavidMiller To: peng hao10096742; CC: qiang.z...@nxp.com leoyang...@nxp.com linux-ker...@vger.kernel.org wen yang10156314;julia.law...@lip6.fr net...@vger.kernel.org linuxppc-d

Re:RE: [PATCH] soc/fsl/qe: fix err handling of ucc_of_parse_tdm

2018-12-24 Thread wen.yang99
Hi Qiang, Thank you, we'll send a new version to fix this. Best regards, Wen --Original Mail-- Sender: QiangZhao To: wang yi10129963; CC: zhong weidong10001088;lkml julia.law...@lip6.fr linuxppc-dev wen yang10156314;moderatedlist:ARM/FREESCALE IMX / MXC ARM

答复: Re: [PATCH 2/4] soc/fsl/qe: fix potential NULL pointer dereference inucc_of_parse_tdm

2018-11-21 Thread wen.yang99
Hi Christophe, thank you for your review. There are two problems in the ucc_of_parse_tdm function. 1, NULL pointer reference 2, pdev gets modified, iomap was done with a different pdev. We will submit a patch to repair it later. Thanks. 132 pdev = of_find_device_by_node(np2); .. 141