lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 16 Feb 2015 17:28:02 +0100
From:	Lukasz Majewski <l.majewski@...sung.com>
To:	cw00.choi@...sung.com
Cc:	cwchoi00@...il.com, Zhang Rui <rui.zhang@...el.com>,
	Eduardo Valentin <edubezval@...il.com>,
	Kukjin Kim <kgene@...nel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Amit Kachhap <amit.daniel@...sung.com>,
	Abhilash Kesavan <a.kesavan@...sung.com>,
	"inki.dae@...sung.com" <inki.dae@...sung.com>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
	linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] thermal: exynos: Fix NULL pointer exception during
 kernel booting

Hi Chanwoo,

> Hi Lukasz,
> 
> On Tue, Feb 17, 2015 at 12:06 AM, Lukasz Majewski
> <l.majewski@...sung.com> wrote:
> > Hi Chanwoo,
> >
> >> This patch fixes the NULL pointer exception during kernel booting.
> >> The thermal_zone _of_sensor_register() registers a sensor to DT
> >> thermal zone and then read the current temperature by '.get_temp'
> >> callback. The callback function of exynos thermal driver is
> >> exynos_get_temp() which must need the 'pdata' instance of
> >> exynos_tmu _platform_data structure.
> >> - exynos_get_temp() -> code_to_temp() -> Must need the 'pdata'
> >> instance
> >>
> >> But, exynos thermal driver is executed before getting the 'pdata'
> >> instance. To avoid the kernel panic, have to get the platform data
> >> by executing the exynos_map_dt_data() before calling
> >> thermal_zone_of_sensor_register() .
> >
> > I've already prepared patch for this (unfortunately it isn't yet
> > applied to mainline):
> >
> > "[PATCH] thermal: exynos: fix: Check if data->tmu_read callback is
> > present before read"
> >
> > http://www.spinics.net/lists/linux-samsung-soc/msg42245.html
> 
> There is different issue between you patch and this patch.
> Your patch check the whether data->tmu_read is NULL or not.
> But, my patch check the pdata is NULL or not.

I've tried to do the same previously. Please compare with:
[PATCH 1/2] thermal: exynos: Reorder exynos_map_dt_data() function

http://www.spinics.net/lists/linux-samsung-soc/msg41308.html

Unfortunately, Abhilash found some issues with this code, so I've
looked into different solution.


However, I didn't need to move pdata = data->pdata; Hence, I wonder why
it need to be reordered. Are you using Exynos3250 based device?


> 
> >
> > Does applying this patch help?
> >
> > BTW: How can I reproduce this error? Could you point me the SHA1 and
> > repository?
> 
> I used your patch-set of linux-soc-thermal.git (branch: next). So I
> applied you patchiest on Linux 3.19 for test.
> -
> https://git.kernel.org/cgit/linux/kernel/git/evalenti/linux-soc-thermal.git/log/?h=next

Is there any special .config?

May I ask about the target platform?
I will look closely on this problem tomorrow.

> 
> Best Regards,
> Chanwoo Choi



-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ