linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Luis Henriques <luis.henriques@canonical.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] zram: don't copy invalid compression algorithms
Date: Tue, 8 Sep 2015 23:21:43 +0900	[thread overview]
Message-ID: <20150908142143.GA29714@blaptop> (raw)
In-Reply-To: <20150908134401.GA590@swordfish>

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

  reply	other threads:[~2015-09-08 14:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07 20:48 [PATCH] zram: don't copy invalid compression algorithms Luis Henriques
2015-09-07 23:56 ` Sergey Senozhatsky
2015-09-08  1:14   ` Minchan Kim
2015-09-08  1:33     ` Sergey Senozhatsky
2015-09-08  1:58       ` Sergey Senozhatsky
2015-09-08  4:50         ` Minchan Kim
2015-09-08  5:04           ` Sergey Senozhatsky
2015-09-08  8:16             ` Minchan Kim
2015-09-08  9:54               ` Sergey Senozhatsky
2015-09-08 13:33                 ` Minchan Kim
2015-09-08 13:44                   ` Sergey Senozhatsky
2015-09-08 14:21                     ` Minchan Kim [this message]
2015-09-08 15:35                       ` Sergey Senozhatsky
2015-09-08 10:08               ` Luis Henriques
2015-09-08 12:20                 ` Sergey Senozhatsky
2015-09-08  5:15           ` Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150908142143.GA29714@blaptop \
    --to=minchan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luis.henriques@canonical.com \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).