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, 7 May 2012 14:10:00 +0300
From:	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
To:	"R, Durgadoss" <durgadoss.r@...el.com>
Cc:	"Yu, Fenghua" <fenghua.yu@...el.com>,
	Guenter Roeck <guenter.roeck@...csson.com>,
	Andi Kleen <ak@...ux.intel.com>,
	Jean Delvare <khali@...ux-fr.org>,
	"lm-sensors@...sensors.org" <lm-sensors@...sensors.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH, v3] hwmon: coretemp: use list instead of fixed size
 array for temp data

On Mon, May 07, 2012 at 10:59:48AM +0000, R, Durgadoss wrote:
> Hi,
> 
> 
> > -----Original Message-----
> > From: Kirill A. Shutemov [mailto:kirill.shutemov@...ux.intel.com]
> > Sent: Monday, May 07, 2012 4:04 PM
> > To: Yu, Fenghua; Guenter Roeck; R, Durgadoss
> > Cc: Andi Kleen; Jean Delvare; lm-sensors@...sensors.org; linux-
> > kernel@...r.kernel.org; Kirill A. Shutemov
> > Subject: [PATCH, v3] hwmon: coretemp: use list instead of fixed size array for
> > temp data
> > 
> > From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
> > 
> > Let's rework code to allow arbitrary number of cores on a CPU, not
> > limited by hardcoded array size.
> > 
> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> > ---
> >  v3:
> >    - drop redundant refcounting and checks;
> >  v2:
> >    - fix NULL pointer dereference. Thanks to R, Durgadoss;
> >    - use mutex instead of spinlock for list locking.
> > ---
> >  drivers/hwmon/coretemp.c |  120 ++++++++++++++++++++++++++++-----------
> > ------
> >  1 files changed, 75 insertions(+), 45 deletions(-)
> > 
> > diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
> > index b9d5123..fa082d5 100644
> > --- a/drivers/hwmon/coretemp.c
> > +++ b/drivers/hwmon/coretemp.c
> > @@ -36,6 +36,8 @@
> >  #include <linux/cpu.h>
> >  #include <linux/pci.h>
> >  #include <linux/smp.h>
> > +#include <linux/list.h>
> > +#include <linux/kref.h>
> 
> I think we don't need to include kref.h now :-)

Right. :(
Guenter, should I resend the patch or you can fix this on apply?

> 
> BTW, at some places, looks like we are using 'tdata' obtained from get_temp_data,
> without checking for NULL values. Other than that, looks Ok for me.

Do you mean sysfs show methods? It should never be NULL there. If it's
NULL, we have bug (race?) somewhere.

> Acked-by: Durgadoss R <durgadoss.r@...el.com>

Thanks.

-- 
 Kirill A. Shutemov

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ