linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Dan Streetman <ddstreet@ieee.org>
Cc: Linux-MM <linux-mm@kvack.org>,
	Seth Jennings <sjenning@redhat.com>,
	Michal Hocko <mhocko@kernel.org>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Minchan Kim <minchan@kernel.org>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Dan Streetman <dan.streetman@canonical.com>
Subject: Re: [PATCH 1/3] zswap: disable changing params if init fails
Date: Tue, 24 Jan 2017 13:24:41 -0800	[thread overview]
Message-ID: <20170124132441.5027560693ed6d8c283c1953@linux-foundation.org> (raw)
In-Reply-To: <20170124200259.16191-2-ddstreet@ieee.org>

On Tue, 24 Jan 2017 15:02:57 -0500 Dan Streetman <ddstreet@ieee.org> wrote:

> Add zswap_init_failed bool that prevents changing any of the module
> params, if init_zswap() fails, and set zswap_enabled to false.  Change
> 'enabled' param to a callback, and check zswap_init_failed before
> allowing any change to 'enabled', 'zpool', or 'compressor' params.
> 
> Any driver that is built-in to the kernel will not be unloaded if its
> init function returns error, and its module params remain accessible for
> users to change via sysfs.  Since zswap uses param callbacks, which
> assume that zswap has been initialized, changing the zswap params after
> a failed initialization will result in WARNING due to the param callbacks
> expecting a pool to already exist.  This prevents that by immediately
> exiting any of the param callbacks if initialization failed.
> 
> This was reported here:
> https://marc.info/?l=linux-mm&m=147004228125528&w=4

I added Marcin's reportde-by to the changelog.

> And fixes this WARNING:
> [  429.723476] WARNING: CPU: 0 PID: 5140 at mm/zswap.c:503
> __zswap_pool_current+0x56/0x60
> 
> Fixes: 90b0fc26d5db ("zswap: change zpool/compressor at runtime")
> Cc: stable@vger.kernel.org

Is this really serious enough to justify a -stable backport?  It's just
a bit of extra noise associated with an initialization problem which
the user will be fixing anyway.



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-01-24 21:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24 20:02 [PATCH 0/3] Fix zswap init failure behavior Dan Streetman
2017-01-24 20:02 ` [PATCH 1/3] zswap: disable changing params if init fails Dan Streetman
2017-01-24 21:24   ` Andrew Morton [this message]
2017-01-24 22:12     ` Dan Streetman
2017-01-24 20:02 ` [PATCH 2/3] zswap: allow initialization at boot without pool Dan Streetman
2017-01-25  0:24   ` Sergey Senozhatsky
2017-01-25 16:36     ` Dan Streetman
2017-01-24 20:02 ` [PATCH 3/3] zswap: clear compressor or zpool param if invalid at init Dan Streetman

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=20170124132441.5027560693ed6d8c283c1953@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dan.streetman@canonical.com \
    --cc=ddstreet@ieee.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=minchan@kernel.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sjenning@redhat.com \
    --cc=stable@vger.kernel.org \
    /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