lkml.org 
[lkml]   [2013]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/6] sysfs: add support for binary attributes in groups
On Wed, Jul 10, 2013 at 04:59:28PM -0700, Greg Kroah-Hartman wrote:
> On Wed, Jul 10, 2013 at 04:00:57PM -0700, Guenter Roeck wrote:
> > > + for (bin_attr = grp->bin_attrs; *bin_attr; bin_attr++) {
> >
> > What happens here if grp->bin_attrs is NULL ? Doesn't that cause a NULL
> > reference when accessing *bin_attr ?
> >
> > [ The problem didn't exist before since attr was supposed to be non-NULL.
> > It may now be a problem if only bin_attr is provided, ie if there are
> > only binary attribute files.
> > Or maybe I am just tired and there is no problem... ]
>
> I thought I tested this patch out, but I think you are right, let me go
> do a rebuild and test it again...

You were right, good catch, as-is, the kernel dies at boot, I've fixed
this and will resend the series, thanks so much for the review.

greg k-h


\
 
 \ /
  Last update: 2013-07-11 03:03    [W:0.043 / U:1.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site