lkml.org 
[lkml]   [2004]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Driver Core patches for 2.6.10-rc1
    On Mon, Nov 01, 2004 at 01:57:56PM -0800, Greg KH wrote:
    > diff -Nru a/fs/sysfs/bin.c b/fs/sysfs/bin.c
    > --- a/fs/sysfs/bin.c 2004-11-01 13:37:18 -08:00
    > +++ b/fs/sysfs/bin.c 2004-11-01 13:37:18 -08:00
    > @@ -160,24 +160,26 @@
    > {
    > struct dentry * dentry;
    > struct dentry * parent;
    > + umode_t mode = (attr->attr.mode & S_IALLUGO) | S_IFREG;
    ^^^^^^^^^^^^^^^
    > int error = 0;
    >
    > - if (!kobj || !attr)
    > - return -EINVAL;
    > + BUG_ON(!kobj || !kobj->dentry || !attr);
    ^^^^^

    attr is already dereferenced, maybe this check should be moved before
    it.



    --
    pozsy
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:07    [W:0.033 / U:59.936 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site