[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150908142143.GA29714@blaptop>
Date: Tue, 8 Sep 2015 23:21:43 +0900
From: Minchan Kim <minchan@...nel.org>
To: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Luis Henriques <luis.henriques@...onical.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] zram: don't copy invalid compression algorithms
On Tue, Sep 08, 2015 at 10:44:01PM +0900, Sergey Senozhatsky wrote:
> dammit, not going to waste my time on this BS anymore.
>
>
>
> > > --- a/drivers/block/zram/zram_drv.c
> > > +++ b/drivers/block/zram/zram_drv.c
> > > @@ -365,6 +365,9 @@ static ssize_t comp_algorithm_store(struct device *dev,
> > > struct zram *zram = dev_to_zram(dev);
> > > size_t sz;
> > >
> > > + if (!zcomp_available_algorithm(buf))
> > > + return -EINVAL;
> >
> > If you ignore tailling space, your change would make a bug.
> > If you fix it, it looks good to me.
>
> that's why find_backend() calls sysfs_streq(), which takes care of
> a trailing new line. unless you're speaking about something else.
You're right. Your patch totally makes sense. Sorry for the niose.
Please resend it on another thread out of this BS thread with Ccing
Andrew.
>
> -ss
--
Kind regards,
Minchan Kim
--
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