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, 22 Mar 2010 15:54:01 +0200
From:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:	Wolfram Sang <w.sang@...gutronix.de>
Cc:	Greg KH <gregkh@...e.de>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
	Lin Ming <ming.m.lin@...el.com>, Len Brown <lenb@...nel.org>
Subject: Re: [PATCH] Fix key f70f4b50 not in .data in thermal_sys

Hello,
Wolfram you are 100% right. My first patch didn't solve the problem.
Please see v2.

	Sergey


On (03/22/10 14:31), Wolfram Sang wrote:
> On Mon, Mar 22, 2010 at 03:15:08PM +0200, Sergey Senozhatsky wrote:
> > Initialize sysfs attributes before device_create_file call.
> > 
> > Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
> > ---
> > 
> > diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
> > index 5066de5..a76a6ff 100644
> > --- a/drivers/thermal/thermal_sys.c
> > +++ b/drivers/thermal/thermal_sys.c
> > @@ -492,6 +492,7 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
> >  		goto free_mem;
> >  	}
> >  	dev_set_drvdata(hwmon->device, hwmon);
> > +	sysfs_attr_init(&dev_attr_name.attr);
> >  	result = device_create_file(hwmon->device, &dev_attr_name);
> 
> This one should not be needed? Is declared static in line 426.
> 
> >  	if (result)
> >  		goto unregister_hwmon_device;
> > @@ -505,6 +506,7 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
> >  	tz->temp_input.attr.attr.name = tz->temp_input.name;
> >  	tz->temp_input.attr.attr.mode = 0444;
> >  	tz->temp_input.attr.show = temp_input_show;
> > +	sysfs_attr_init(&tz->temp_input.attr.attr);
> >  	result = device_create_file(hwmon->device, &tz->temp_input.attr);
> >  	if (result)
> >  		goto unregister_hwmon_device;
> > @@ -517,6 +519,7 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
> >  			tz->temp_crit.attr.attr.name = tz->temp_crit.name;
> >  			tz->temp_crit.attr.attr.mode = 0444;
> >  			tz->temp_crit.attr.show = temp_crit_show;
> > +			sysfs_attr_init(&tz->temp_crit.attr.attr);
> 
> Those encapsuled attributes are trickier to find, sigh...
> 
> Regards,
> 
>    Wolfram
> 

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ