Revision 737449236240e30a7bbe99f4d5586b8ed1416763 authored by Mel Gorman on 31 July 2012, 23:45:20 UTC, committed by Linus Torvalds on 01 August 2012, 01:42:48 UTC
Commit b3a27d ("swap: Add swap slot free callback to
block_device_operations") dereferences p->bdev->bd_disk but this is a NULL
dereference if using swap-over-NFS.  This patch checks SWP_BLKDEV on the
swap_info_struct before dereferencing.

With reference to this callback, Christoph Hellwig stated "Please just
remove the callback entirely.  It has no user outside the staging tree and
was added clearly against the rules for that staging tree".  This would
also be my preference but there was not an obvious way of keeping zram in
staging/ happy.

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Eric B Munson <emunson@mgebm.net>
Cc: Eric Paris <eparis@redhat.com>
Cc: James Morris <jmorris@namei.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Mike Christie <michaelc@cs.wisc.edu>
Cc: Neil Brown <neilb@suse.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 192e501
Raw File
Kconfig
config AUTOFS4_FS
	tristate "Kernel automounter version 4 support (also supports v3)"
	help
	  The automounter is a tool to automatically mount remote file systems
	  on demand. This implementation is partially kernel-based to reduce
	  overhead in the already-mounted case; this is unlike the BSD
	  automounter (amd), which is a pure user space daemon.

	  To use the automounter you need the user-space tools from
	  <ftp://ftp.kernel.org/pub/linux/daemons/autofs/v4/>; you also
	  want to answer Y to "NFS file system support", below.

	  To compile this support as a module, choose M here: the module will be
	  called autofs4.  You will need to add "alias autofs autofs4" to your
	  modules configuration file.

	  If you are not a part of a fairly large, distributed network or
	  don't have a laptop which needs to dynamically reconfigure to the
	  local network, you probably do not need an automounter, and can say
	  N here.
back to top