lkml.org 
[lkml]   [2015]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] zram: don't copy invalid compression algorithms
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.

-ss


\
 
 \ /
  Last update: 2015-09-08 16:01    [W:0.102 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site