All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org,
	alan@lxorguk.ukuu.org.uk, Mel Gorman <mgorman@suse.de>,
	Hugh Dickins <hughd@google.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Rik van Riel <riel@redhat.com>, Ken Chen <kenchen@google.com>
Subject: [ 15/42] mm: fix s390 BUG by __set_page_dirty_no_writeback on swap
Date: Tue, 24 Apr 2012 15:33:08 -0700	[thread overview]
Message-ID: <20120424223254.775060804@linuxfoundation.org> (raw)
In-Reply-To: <20120424223311.GA8456@kroah.com>

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Hugh Dickins <hughd@google.com>

commit aca50bd3b4c4bb5528a1878158ba7abce41de534 upstream.

Mel reports a BUG_ON(slot == NULL) in radix_tree_tag_set() on s390
3.0.13: called from __set_page_dirty_nobuffers() when page_remove_rmap()
tries to transfer dirty flag from s390 storage key to struct page and
radix_tree.

That would be because of reclaim's shrink_page_list() calling
add_to_swap() on this page at the same time: first PageSwapCache is set
(causing page_mapping(page) to appear as &swapper_space), then
page->private set, then tree_lock taken, then page inserted into
radix_tree - so there's an interval before taking the lock when the
radix_tree slot is empty.

We could fix this by moving __add_to_swap_cache()'s spin_lock_irq up
before the SetPageSwapCache.  But a better fix is simply to do what's
five years overdue: Ken Chen introduced __set_page_dirty_no_writeback()
(if !PageDirty TestSetPageDirty) for tmpfs to skip all the radix_tree
overhead, and swap is just the same - it ignores the radix_tree tag, and
does not participate in dirty page accounting, so should be using
__set_page_dirty_no_writeback() too.

s390 testing now confirms that this does indeed fix the problem.

Reported-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Ken Chen <kenchen@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/swap_state.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -28,7 +28,7 @@
  */
 static const struct address_space_operations swap_aops = {
 	.writepage	= swap_writepage,
-	.set_page_dirty	= __set_page_dirty_nobuffers,
+	.set_page_dirty	= __set_page_dirty_no_writeback,
 	.migratepage	= migrate_page,
 };
 



  parent reply	other threads:[~2012-04-24 22:43 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
2012-04-24 22:32 ` [ 01/42] Perf: fix build breakage Greg KH
2012-04-24 22:32 ` [ 02/42] crypto: sha512 - Fix byte counter overflow in SHA-512 Greg KH
2012-04-24 22:32   ` Greg KH
2012-04-24 22:32 ` [ 03/42] hwmon: fam15h_power: fix bogus values with current BIOSes Greg KH
2012-04-25 19:46   ` Ben Hutchings
2012-04-26 21:16     ` Greg KH
2012-04-24 22:32 ` [ 04/42] ALSA: hda/conexant - Dont set HP pin-control bit unconditionally Greg KH
2012-04-24 22:32 ` [ 05/42] ARM: clps711x: serial driver hungs are a result of call disable_irq within ISR Greg KH
2012-04-24 22:32 ` [ 06/42] xen/gntdev: do not set VM_PFNMAP Greg KH
2012-04-24 22:33 ` [ 07/42] xen/xenbus: Add quirk to deal with misconfigured backends Greg KH
2012-04-24 22:33 ` [ 08/42] USB: yurex: Remove allocation of coherent buffer for setup-packet buffer Greg KH
2012-04-24 22:33 ` [ 09/42] USB: yurex: Fix missing URB_NO_TRANSFER_DMA_MAP flag in urb Greg KH
2012-04-24 22:33 ` [ 10/42] uwb: fix use of del_timer_sync() in interrupt Greg KH
2012-04-24 22:33 ` [ 11/42] uwb: fix error handling Greg KH
2012-04-24 22:33 ` [ 12/42] davinci_mdio: Fix MDIO timeout check Greg KH
2012-04-24 22:33 ` [ 13/42] media: rc-core: set mode for winbond-cir Greg KH
2012-04-24 22:33 ` [ 14/42] cfg80211: fix interface combinations check Greg KH
2012-04-24 22:33 ` Greg KH [this message]
2012-04-24 22:33 ` [ 16/42] jbd2: use GFP_NOFS for blkdev_issue_flush Greg KH
2012-04-24 22:33 ` [ 17/42] USB: serial: cp210x: Fixed usb_control_msg timeout values Greg KH
2012-04-24 22:33 ` [ 18/42] pch_uart: Fix dma channel unallocated issue Greg KH
2012-04-24 22:33 ` [ 19/42] drivers/tty/amiserial.c: add missing tty_unlock Greg KH
2012-04-24 22:33 ` [ 20/42] USB: sierra: avoid QMI/wwan interface on MC77xx Greg KH
2012-04-24 22:33 ` [ 21/42] EHCI: always clear the STS_FLR status bit Greg KH
2012-04-24 22:33 ` [ 22/42] USB: fix deadlock in bConfigurationValue attribute method Greg KH
2012-04-24 22:33 ` [ 23/42] usb: gadget: eliminate NULL pointer dereference (bugfix) Greg KH
2012-04-24 22:33 ` [ 24/42] usb: musb: omap: fix crash when musb glue (omap) gets initialized Greg KH
2012-04-24 22:33 ` [ 25/42] usb: musb: omap: fix the error check for pm_runtime_get_sync Greg KH
2012-04-24 22:33 ` [ 26/42] PCI: Add quirk for still enabled interrupts on Intel Sandy Bridge GPUs Greg KH
2012-04-24 22:33 ` [ 27/42] ext4: fix endianness breakage in ext4_split_extent_at() Greg KH
2012-04-24 22:33 ` [ 28/42] Bluetooth: Add support for Atheros [04ca:3005] Greg KH
2012-04-24 22:33 ` [ 29/42] Dont limit non-nested epoll paths Greg KH
2012-04-24 22:33 ` [ 30/42] spi: Fix device unregistration when unregistering the bus master Greg KH
2012-04-24 22:33 ` [ 31/42] rt2x00: Properly identify rt2800usb devices Greg KH
2012-04-24 22:33 ` [ 32/42] rt2800usb: Add new device ID for Belkin Greg KH
2012-04-24 22:33 ` [ 33/42] rt2x00: Add USB device ID of Buffalo WLI-UC-GNHP Greg KH
2012-04-24 22:33 ` [ 34/42] rt2800: Add support for the Fujitsu Stylistic Q550 Greg KH
2012-04-24 22:33 ` [ 35/42] rt2x00: Identify rt2800usb chipsets Greg KH
2012-04-24 22:33 ` [ 36/42] nfsd: fix compose_entry_fh() failure exits Greg KH
2012-04-24 22:33 ` [ 37/42] btrfs: btrfs_root_readonly() broken on big-endian Greg KH
2012-04-24 22:33 ` [ 38/42] ocfs2: ->l_next_free_req breakage " Greg KH
2012-04-24 22:33 ` [ 39/42] ocfs: ->rl_used " Greg KH
2012-04-24 22:33 ` [ 40/42] ocfs2: ->rl_count endianness breakage Greg KH
2012-04-24 22:33 ` [ 41/42] ocfs2: ->e_leaf_clusters " Greg KH
2012-04-24 22:33 ` [ 42/42] lockd: fix the endianness bug Greg KH

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=20120424223254.775060804@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hughd@google.com \
    --cc=kenchen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=riel@redhat.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.