* [patch 0/9] 2.6.27.36-stable review
2009-10-01 23:19 [patch 0/9] 2.6.27.36-stable review Greg KH
@ 2009-10-01 23:16 ` Greg KH
2009-10-01 23:16 ` [patch 1/9] fs: make sure data stored into inode is properly seen before unlocking new inode Greg KH
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2009-10-01 23:16 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan
This is the start of the stable review cycle for the 2.6.27.36 release.
There are 9 patches in this series, all will be posted as a response to
this one. If anyone has any issues with these being applied, please let
us know. If anyone is a maintainer of the proper subsystem, and wants
to add a Signed-off-by: line to the patch, please respond with it.
These patches are sent out with a number of different people on the Cc:
line. If you wish to be a reviewer, please email stable@kernel.org to
add your name to the list. If you want to be off the reviewer list,
also email us.
Responses should be made by Saturday, October 3, 2009 23:00:00 UTC.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.27.36-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
--------------
Makefile | 2 +-
drivers/isdn/gigaset/bas-gigaset.c | 16 +++++++++-------
drivers/net/enc28j60.c | 4 +++-
drivers/net/pcmcia/pcnet_cs.c | 2 +-
drivers/net/wireless/p54/p54usb.c | 1 +
fs/inode.c | 14 ++++++++------
mm/hugetlb.c | 2 +-
net/ax25/af_ax25.c | 2 +-
net/bridge/br_netfilter.c | 2 +-
net/packet/af_packet.c | 4 ++--
10 files changed, 28 insertions(+), 21 deletions(-)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [patch 1/9] fs: make sure data stored into inode is properly seen before unlocking new inode
2009-10-01 23:19 [patch 0/9] 2.6.27.36-stable review Greg KH
2009-10-01 23:16 ` Greg KH
@ 2009-10-01 23:16 ` Greg KH
2009-10-01 23:16 ` [patch 2/9] p54usb: add Zcomax XG-705A usbid Greg KH
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2009-10-01 23:16 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jan Kara, Christoph Hellwig
[-- Attachment #1: fs-make-sure-data-stored-into-inode-is-properly-seen-before-unlocking-new-inode.patch --]
[-- Type: text/plain, Size: 1864 bytes --]
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jan Kara <jack@suse.cz>
commit 580be0837a7a59b207c3d5c661d044d8dd0a6a30 upstream.
In theory it could happen that on one CPU we initialize a new inode but
clearing of I_NEW | I_LOCK gets reordered before some of the
initialization. Thus on another CPU we return not fully uptodate inode
from iget_locked().
This seems to fix a corruption issue on ext3 mounted over NFS.
[akpm@linux-foundation.org: add some commentary]
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/inode.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -590,13 +590,15 @@ void unlock_new_inode(struct inode *inod
}
#endif
/*
- * This is special! We do not need the spinlock
- * when clearing I_LOCK, because we're guaranteed
- * that nobody else tries to do anything about the
- * state of the inode when it is locked, as we
- * just created it (so there can be no old holders
- * that haven't tested I_LOCK).
+ * This is special! We do not need the spinlock when clearing I_LOCK,
+ * because we're guaranteed that nobody else tries to do anything about
+ * the state of the inode when it is locked, as we just created it (so
+ * there can be no old holders that haven't tested I_LOCK).
+ * However we must emit the memory barrier so that other CPUs reliably
+ * see the clearing of I_LOCK after the other inode initialisation has
+ * completed.
*/
+ smp_mb();
WARN_ON((inode->i_state & (I_LOCK|I_NEW)) != (I_LOCK|I_NEW));
inode->i_state &= ~(I_LOCK|I_NEW);
wake_up_inode(inode);
^ permalink raw reply [flat|nested] 14+ messages in thread
* [patch 2/9] p54usb: add Zcomax XG-705A usbid
2009-10-01 23:19 [patch 0/9] 2.6.27.36-stable review Greg KH
2009-10-01 23:16 ` Greg KH
2009-10-01 23:16 ` [patch 1/9] fs: make sure data stored into inode is properly seen before unlocking new inode Greg KH
@ 2009-10-01 23:16 ` Greg KH
2009-10-01 23:16 ` [patch 3/9] enc28j60: fix RX buffer overflow Greg KH
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2009-10-01 23:16 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Christian Lamparter,
John W. Linville
[-- Attachment #1: p54usb-add-zcomax-xg-705a-usbid.patch --]
[-- Type: text/plain, Size: 1135 bytes --]
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Christian Lamparter <chunkeey@googlemail.com>
commit f7f71173ea69d4dabf166533beffa9294090b7ef upstream.
This patch adds a new usbid for Zcomax XG-705A to the device table.
Reported-by: Jari Jaakola <jari.jaakola@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/p54/p54usb.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -63,6 +63,7 @@ static struct usb_device_id p54u_table[]
{USB_DEVICE(0x0bf8, 0x1009)}, /* FUJITSU E-5400 USB D1700*/
{USB_DEVICE(0x0cde, 0x0006)}, /* Medion MD40900 */
{USB_DEVICE(0x0cde, 0x0008)}, /* Sagem XG703A */
+ {USB_DEVICE(0x0cde, 0x0015)}, /* Zcomax XG-705A */
{USB_DEVICE(0x0d8e, 0x3762)}, /* DLink DWL-G120 Cohiba */
{USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */
{USB_DEVICE(0x124a, 0x4025)}, /* IOGear GWU513 (GW3887IK chip) */
^ permalink raw reply [flat|nested] 14+ messages in thread
* [patch 3/9] enc28j60: fix RX buffer overflow
2009-10-01 23:19 [patch 0/9] 2.6.27.36-stable review Greg KH
` (2 preceding siblings ...)
2009-10-01 23:16 ` [patch 2/9] p54usb: add Zcomax XG-705A usbid Greg KH
@ 2009-10-01 23:16 ` Greg KH
2009-10-01 23:16 ` [patch 4/9] pcnet_cs: Fix misuse of the equality operator Greg KH
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2009-10-01 23:16 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Baruch Siach,
David S. Miller
[-- Attachment #1: enc28j60-fix-rx-buffer-overflow.patch --]
[-- Type: text/plain, Size: 1425 bytes --]
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Baruch Siach <baruch@tkos.co.il>
commit 22692018b93f0782cda5a843cecfffda1854eb8d upstream.
The enc28j60 driver doesn't check whether the length of the packet as reported
by the hardware fits into the preallocated buffer. When stressed, the hardware
may report insanely large packets even tough the "Receive OK" bit is set. Fix
this.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/enc28j60.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/net/enc28j60.c
+++ b/drivers/net/enc28j60.c
@@ -919,7 +919,7 @@ static void enc28j60_hw_rx(struct net_de
if (netif_msg_rx_status(priv))
enc28j60_dump_rsv(priv, __FUNCTION__, next_packet, len, rxstat);
- if (!RSV_GETBIT(rxstat, RSV_RXOK)) {
+ if (!RSV_GETBIT(rxstat, RSV_RXOK) || len > MAX_FRAMELEN) {
if (netif_msg_rx_err(priv))
dev_err(&ndev->dev, "Rx Error (%04x)\n", rxstat);
ndev->stats.rx_errors++;
@@ -927,6 +927,8 @@ static void enc28j60_hw_rx(struct net_de
ndev->stats.rx_crc_errors++;
if (RSV_GETBIT(rxstat, RSV_LENCHECKERR))
ndev->stats.rx_frame_errors++;
+ if (len > MAX_FRAMELEN)
+ ndev->stats.rx_over_errors++;
} else {
skb = dev_alloc_skb(len + NET_IP_ALIGN);
if (!skb) {
^ permalink raw reply [flat|nested] 14+ messages in thread
* [patch 4/9] pcnet_cs: Fix misuse of the equality operator.
2009-10-01 23:19 [patch 0/9] 2.6.27.36-stable review Greg KH
` (3 preceding siblings ...)
2009-10-01 23:16 ` [patch 3/9] enc28j60: fix RX buffer overflow Greg KH
@ 2009-10-01 23:16 ` Greg KH
2009-10-01 23:16 ` [patch 5/9] Fix incorrect stable backport to bas_gigaset Greg KH
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2009-10-01 23:16 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Cord Walter, Komuro,
David S. Miller, Christoph Biedl
[-- Attachment #1: pcnet_cs-fix-misuse-of-the-equality-operator.patch --]
[-- Type: text/plain, Size: 990 bytes --]
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Cord Walter <qord@cwalter.net>
commit a9d3a146923d374b945aa388dc884df69564a818 upstream.
Signed-off-by: Cord Walter <qord@cwalter.net>
Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/pcmcia/pcnet_cs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -591,7 +591,7 @@ static int pcnet_config(struct pcmcia_de
}
if ((link->conf.ConfigBase == 0x03c0)
- && (link->manf_id == 0x149) && (link->card_id = 0xc1ab)) {
+ && (link->manf_id == 0x149) && (link->card_id == 0xc1ab)) {
printk(KERN_INFO "pcnet_cs: this is an AX88190 card!\n");
printk(KERN_INFO "pcnet_cs: use axnet_cs instead.\n");
goto failed;
^ permalink raw reply [flat|nested] 14+ messages in thread
* [patch 5/9] Fix incorrect stable backport to bas_gigaset
2009-10-01 23:19 [patch 0/9] 2.6.27.36-stable review Greg KH
` (4 preceding siblings ...)
2009-10-01 23:16 ` [patch 4/9] pcnet_cs: Fix misuse of the equality operator Greg KH
@ 2009-10-01 23:16 ` Greg KH
2009-10-01 23:16 ` [patch 6/9] net ax25: Fix signed comparison in the sockopt handler Greg KH
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2009-10-01 23:16 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Stefan Bader, Tim Gardner,
Steve Conklin
[-- Attachment #1: fix-incorrect-stable-backport-to-bas_gigaset.patch --]
[-- Type: text/plain, Size: 1583 bytes --]
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tilman Schmidt <tilman@imap.cc>
bas_gigaset: correctly allocate USB interrupt transfer buffer
[ Upstream commit 170ebf85160dd128e1c4206cc197cce7d1424705 ]
This incorrect backport to 2.6.28.10 placed some code into the probe function
which used a pointer before it was initialized. Moving this to the correct
place (as it is in upstream).
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Steve Conklin <steve.conklin@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/isdn/gigaset/bas-gigaset.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
--- a/drivers/isdn/gigaset/bas-gigaset.c
+++ b/drivers/isdn/gigaset/bas-gigaset.c
@@ -2140,8 +2140,16 @@ static int gigaset_initcshw(struct cards
struct bas_cardstate *ucs;
cs->hw.bas = ucs = kmalloc(sizeof *ucs, GFP_KERNEL);
- if (!ucs)
+ if (!ucs) {
+ pr_err("out of memory\n");
+ return 0;
+ }
+ ucs->int_in_buf = kmalloc(IP_MSGSIZE, GFP_KERNEL);
+ if (!ucs->int_in_buf) {
+ kfree(ucs);
+ pr_err("out of memory\n");
return 0;
+ }
ucs->urb_cmd_in = NULL;
ucs->urb_cmd_out = NULL;
@@ -2236,12 +2244,6 @@ static int gigaset_probe(struct usb_inte
}
hostif = interface->cur_altsetting;
}
- ucs->int_in_buf = kmalloc(IP_MSGSIZE, GFP_KERNEL);
- if (!ucs->int_in_buf) {
- kfree(ucs);
- pr_err("out of memory\n");
- return 0;
- }
/* Reject application specific interfaces
*/
^ permalink raw reply [flat|nested] 14+ messages in thread
* [patch 6/9] net ax25: Fix signed comparison in the sockopt handler
2009-10-01 23:19 [patch 0/9] 2.6.27.36-stable review Greg KH
` (5 preceding siblings ...)
2009-10-01 23:16 ` [patch 5/9] Fix incorrect stable backport to bas_gigaset Greg KH
@ 2009-10-01 23:16 ` Greg KH
2009-10-01 23:16 ` [patch 7/9] net: Make the copy length in af_packet sockopt handler unsigned Greg KH
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2009-10-01 23:16 UTC (permalink / raw)
To: linux-kernel, stable, davem
Cc: stable-review, torvalds, akpm, alan, jakub, security, mingo,
Arjan van de Ven
[-- Attachment #1: net-ax25-fix-signed-comparison-in-the-sockopt-handler.patch --]
[-- Type: text/plain, Size: 1361 bytes --]
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Arjan van de Ven <arjan@linux.intel.com>
fixed upstream in commit b7058842c940ad2c08dd829b21e5c92ebe3b8758 in a different way
The ax25 code tried to use
if (optlen < sizeof(int))
return -EINVAL;
as a security check against optlen being negative (or zero) in the
set socket option.
Unfortunately, "sizeof(int)" is an unsigned property, with the
result that the whole comparison is done in unsigned, letting
negative values slip through.
This patch changes this to
if (optlen < (int)sizeof(int))
return -EINVAL;
so that the comparison is done as signed, and negative values
get properly caught.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/ax25/af_ax25.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -539,7 +539,7 @@ static int ax25_setsockopt(struct socket
if (level != SOL_AX25)
return -ENOPROTOOPT;
- if (optlen < sizeof(int))
+ if (optlen < (int)sizeof(int))
return -EINVAL;
if (get_user(opt, (int __user *)optval))
^ permalink raw reply [flat|nested] 14+ messages in thread
* [patch 7/9] net: Make the copy length in af_packet sockopt handler unsigned
2009-10-01 23:19 [patch 0/9] 2.6.27.36-stable review Greg KH
` (6 preceding siblings ...)
2009-10-01 23:16 ` [patch 6/9] net ax25: Fix signed comparison in the sockopt handler Greg KH
@ 2009-10-01 23:16 ` Greg KH
2009-10-01 23:16 ` [patch 8/9] netfilter: bridge: refcount fix Greg KH
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2009-10-01 23:16 UTC (permalink / raw)
To: linux-kernel, stable, Arjan van de Ven
Cc: stable-review, torvalds, akpm, alan, jakub, security, mingo,
davem, Arjan van de Ven
[-- Attachment #1: net-make-the-copy-length-in-af_packet-sockopt-handler-unsigned.patch --]
[-- Type: text/plain, Size: 1361 bytes --]
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Arjan van de Ven <arjan@linux.intel.com>
fixed upstream in commit b7058842c940ad2c08dd829b21e5c92ebe3b8758 in a different way
The length of the to-copy data structure is currently stored in
a signed integer. However many comparisons are done with sizeof(..)
which is unsigned. It's more suitable for this variable to be unsigned
to make these comparisons more naturally right.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/packet/af_packet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1500,7 +1500,7 @@ packet_setsockopt(struct socket *sock, i
static int packet_getsockopt(struct socket *sock, int level, int optname,
char __user *optval, int __user *optlen)
{
- int len;
+ unsigned int len;
int val;
struct sock *sk = sock->sk;
struct packet_sock *po = pkt_sk(sk);
@@ -1513,7 +1513,7 @@ static int packet_getsockopt(struct sock
if (get_user(len, optlen))
return -EFAULT;
- if (len < 0)
+ if ((int)len < 0)
return -EINVAL;
switch(optname) {
^ permalink raw reply [flat|nested] 14+ messages in thread
* [patch 8/9] netfilter: bridge: refcount fix
2009-10-01 23:19 [patch 0/9] 2.6.27.36-stable review Greg KH
` (7 preceding siblings ...)
2009-10-01 23:16 ` [patch 7/9] net: Make the copy length in af_packet sockopt handler unsigned Greg KH
@ 2009-10-01 23:16 ` Greg KH
2009-10-01 23:16 ` [patch 9/9] hugetlb: restore interleaving of bootmem huge pages (2.6.31) Greg KH
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2009-10-01 23:16 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, netdev, netfilter-devel,
Patrick McHardy, davem, Eric Dumazet
[-- Attachment #1: netfilter-bridge-refcount-fix.patch --]
[-- Type: text/plain, Size: 1100 bytes --]
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Patrick McHardy <kaber@trash.net>
netfilter: bridge: refcount fix
Upstream commit f3abc9b9:
commit f216f082b2b37c4943f1e7c393e2786648d48f6f
([NETFILTER]: bridge netfilter: deal with martians correctly)
added a refcount leak on in_dev.
Instead of using in_dev_get(), we can use __in_dev_get_rcu(),
as netfilter hooks are running under rcu_read_lock(), as pointed
by Patrick.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/bridge/br_netfilter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -358,7 +358,7 @@ static int br_nf_pre_routing_finish(stru
},
.proto = 0,
};
- struct in_device *in_dev = in_dev_get(dev);
+ struct in_device *in_dev = __in_dev_get_rcu(dev);
/* If err equals -EHOSTUNREACH the error is due to a
* martian destination or due to the fact that
^ permalink raw reply [flat|nested] 14+ messages in thread
* [patch 9/9] hugetlb: restore interleaving of bootmem huge pages (2.6.31)
2009-10-01 23:19 [patch 0/9] 2.6.27.36-stable review Greg KH
` (8 preceding siblings ...)
2009-10-01 23:16 ` [patch 8/9] netfilter: bridge: refcount fix Greg KH
@ 2009-10-01 23:16 ` Greg KH
2009-10-02 17:49 ` [patch 10/09] mm: fix anonymous dirtying Greg KH
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2009-10-01 23:16 UTC (permalink / raw)
To: linux-kernel, stable, torvalds
Cc: stable-review, akpm, alan, Lee.Schermerhorn, lee.schermerhorn, ak,
eric.whitney, mel, rientjes, agl, apw
[-- Attachment #1: hugetlb-restore-interleaving-of-bootmem-huge-pages.patch --]
[-- Type: text/plain, Size: 2425 bytes --]
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Not upstream as it is fixed differently in .32
I noticed that alloc_bootmem_huge_page() will only advance to the next
node on failure to allocate a huge page. I asked about this on linux-mm
and linux-numa, cc'ing the usual huge page suspects. Mel Gorman
responded:
I strongly suspect that the same node being used until allocation
failure instead of round-robin is an oversight and not deliberate
at all. It appears to be a side-effect of a fix made way back in
commit 63b4613c3f0d4b724ba259dc6c201bb68b884e1a ["hugetlb: fix
hugepage allocation with memoryless nodes"]. Prior to that patch
it looked like allocations would always round-robin even when
allocation was successful.
Andy Whitcroft countered that the existing behavior looked like Andi
Kleen's original implementation and suggested that we ask him. We did and
Andy replied that his intention was to interleave the allocations. So,
...
This patch moves the advance of the hstate next node from which to
allocate up before the test for success of the attempted allocation. This
will unconditionally advance the next node from which to alloc,
interleaving successful allocations over the nodes with sufficient
contiguous memory, and skipping over nodes that fail the huge page
allocation attempt.
Note that alloc_bootmem_huge_page() will only be called for huge pages of
order > MAX_ORDER.
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: David Rientjes <rientjes@google.com>
Cc: Adam Litke <agl@us.ibm.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Eric Whitney <eric.whitney@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
mm/hugetlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -983,6 +983,7 @@ __attribute__((weak)) int alloc_bootmem_
NODE_DATA(h->hugetlb_next_nid),
huge_page_size(h), huge_page_size(h), 0);
+ hstate_next_node(h);
if (addr) {
/*
* Use the beginning of the huge page to store the
@@ -993,7 +994,6 @@ __attribute__((weak)) int alloc_bootmem_
if (m)
goto found;
}
- hstate_next_node(h);
nr_nodes--;
}
return 0;
^ permalink raw reply [flat|nested] 14+ messages in thread
* [patch 0/9] 2.6.27.36-stable review
@ 2009-10-01 23:19 Greg KH
2009-10-01 23:16 ` Greg KH
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: Greg KH @ 2009-10-01 23:19 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan
This is the start of the stable review cycle for the 2.6.27.36 release.
There are 9 patches in this series, all will be posted as a response to
this one. If anyone has any issues with these being applied, please let
us know. If anyone is a maintainer of the proper subsystem, and wants
to add a Signed-off-by: line to the patch, please respond with it.
These patches are sent out with a number of different people on the Cc:
line. If you wish to be a reviewer, please email stable@kernel.org to
add your name to the list. If you want to be off the reviewer list,
also email us.
Responses should be made by Saturday, October 3, 2009 23:00:00 UTC.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.27.36-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
--------------
Makefile | 2 +-
drivers/isdn/gigaset/bas-gigaset.c | 16 +++++++++-------
drivers/net/enc28j60.c | 4 +++-
drivers/net/pcmcia/pcnet_cs.c | 2 +-
drivers/net/wireless/p54/p54usb.c | 1 +
fs/inode.c | 14 ++++++++------
mm/hugetlb.c | 2 +-
net/ax25/af_ax25.c | 2 +-
net/bridge/br_netfilter.c | 2 +-
net/packet/af_packet.c | 4 ++--
10 files changed, 28 insertions(+), 21 deletions(-)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [patch 10/09] mm: fix anonymous dirtying
2009-10-01 23:19 [patch 0/9] 2.6.27.36-stable review Greg KH
` (9 preceding siblings ...)
2009-10-01 23:16 ` [patch 9/9] hugetlb: restore interleaving of bootmem huge pages (2.6.31) Greg KH
@ 2009-10-02 17:49 ` Greg KH
2009-10-02 17:50 ` [patch 11/09] mmap: avoid unnecessary anon_vma lock acquisition in vma_adjust() Greg KH
2009-10-02 17:50 ` [patch 0/9] 2.6.27.36-stable review Greg KH
12 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2009-10-02 17:49 UTC (permalink / raw)
To: linux-kernel, stable, stable-review, torvalds, akpm, alan
Cc: Hugh Dickins, Rik van Riel, KAMEZAWA Hiroyuki, KOSAKI Motohiro,
Nick Piggin, Mel Gorman, Minchan Kim
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Hugh Dickins <hugh.dickins@tiscali.co.uk>
commit 1ac0cb5d0e22d5e483f56b2bc12172dec1cf7536 upstream.
do_anonymous_page() has been wrong to dirty the pte regardless.
If it's not going to mark the pte writable, then it won't help
to mark it dirty here, and clogs up memory with pages which will
need swap instead of being thrown away. Especially wrong if no
overcommit is chosen, and this vma is not yet VM_ACCOUNTed -
we could exceed the limit and OOM despite no overcommit.
Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
mm/memory.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2422,7 +2422,8 @@ static int do_anonymous_page(struct mm_s
goto oom_free_page;
entry = mk_pte(page, vma->vm_page_prot);
- entry = maybe_mkwrite(pte_mkdirty(entry), vma);
+ if (vma->vm_flags & VM_WRITE)
+ entry = pte_mkwrite(pte_mkdirty(entry));
page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
if (!pte_none(*page_table))
^ permalink raw reply [flat|nested] 14+ messages in thread
* [patch 11/09] mmap: avoid unnecessary anon_vma lock acquisition in vma_adjust()
2009-10-01 23:19 [patch 0/9] 2.6.27.36-stable review Greg KH
` (10 preceding siblings ...)
2009-10-02 17:49 ` [patch 10/09] mm: fix anonymous dirtying Greg KH
@ 2009-10-02 17:50 ` Greg KH
2009-10-02 17:50 ` [patch 0/9] 2.6.27.36-stable review Greg KH
12 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2009-10-02 17:50 UTC (permalink / raw)
To: linux-kernel, stable, stable-review, torvalds, akpm, alan
Cc: Lee Schermerhorn, Hugh Dickins, Nick Piggin, Eric Whitney,
Zhang, Yanmin
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
commit 252c5f94d944487e9f50ece7942b0fbf659c5c31 upstream.
We noticed very erratic behavior [throughput] with the AIM7 shared
workload running on recent distro [SLES11] and mainline kernels on an
8-socket, 32-core, 256GB x86_64 platform. On the SLES11 kernel
[2.6.27.19+] with Barcelona processors, as we increased the load [10s of
thousands of tasks], the throughput would vary between two "plateaus"--one
at ~65K jobs per minute and one at ~130K jpm. The simple patch below
causes the results to smooth out at the ~130k plateau.
But wait, there's more:
We do not see this behavior on smaller platforms--e.g., 4 socket/8 core.
This could be the result of the larger number of cpus on the larger
platform--a scalability issue--or it could be the result of the larger
number of interconnect "hops" between some nodes in this platform and how
the tasks for a given load end up distributed over the nodes' cpus and
memories--a stochastic NUMA effect.
The variability in the results are less pronounced [on the same platform]
with Shanghai processors and with mainline kernels. With 31-rc6 on
Shanghai processors and 288 file systems on 288 fibre attached storage
volumes, the curves [jpm vs load] are both quite flat with the patched
kernel consistently producing ~3.9% better throughput [~80K jpm vs ~77K
jpm] than the unpatched kernel.
Profiling indicated that the "slow" runs were incurring high[er]
contention on an anon_vma lock in vma_adjust(), apparently called from the
sbrk() system call.
The patch:
A comment in mm/mmap.c:vma_adjust() suggests that we don't really need the
anon_vma lock when we're only adjusting the end of a vma, as is the case
for brk(). The comment questions whether it's worth while to optimize for
this case. Apparently, on the newer, larger x86_64 platforms, with
interesting NUMA topologies, it is worth while--especially considering
that the patch [if correct!] is quite simple.
We can detect this condition--no overlap with next vma--by noting a NULL
"importer". The anon_vma pointer will also be NULL in this case, so
simply avoid loading vma->anon_vma to avoid the lock.
However, we DO need to take the anon_vma lock when we're inserting a vma
['insert' non-NULL] even when we have no overlap [NULL "importer"], so we
need to check for 'insert', as well. And Hugh points out that we should
also take it when adjusting vm_start (so that rmap.c can rely upon
vma_address() while it holds the anon_vma lock).
akpm: Zhang Yanmin reprts a 150% throughput improvement with aim7, so it
might be -stable material even though thiss isn't a regression: "this
issue is not clear on dual socket Nehalem machine (2*4*2 cpu), but is
severe on large machine (4*8*2 cpu)"
[hugh.dickins@tiscali.co.uk: test vma start too]
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Eric Whitney <eric.whitney@hp.com>
Tested-by: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
mm/mmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -575,9 +575,9 @@ again: remove_next = 1 + (end > next->
/*
* When changing only vma->vm_end, we don't really need
- * anon_vma lock: but is that case worth optimizing out?
+ * anon_vma lock.
*/
- if (vma->anon_vma)
+ if (vma->anon_vma && (insert || importer || start != vma->vm_start))
anon_vma = vma->anon_vma;
if (anon_vma) {
spin_lock(&anon_vma->lock);
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [patch 0/9] 2.6.27.36-stable review
2009-10-01 23:19 [patch 0/9] 2.6.27.36-stable review Greg KH
` (11 preceding siblings ...)
2009-10-02 17:50 ` [patch 11/09] mmap: avoid unnecessary anon_vma lock acquisition in vma_adjust() Greg KH
@ 2009-10-02 17:50 ` Greg KH
12 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2009-10-02 17:50 UTC (permalink / raw)
To: linux-kernel, stable, stable-review, torvalds, akpm, alan
On Thu, Oct 01, 2009 at 04:19:38PM -0700, Greg KH wrote:
> The whole patch series can be found in one patch at:
> kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.27.36-rc1.gz
> and the diffstat can be found below.
With the 2 new mm patches, I've now released 2.6.27.36-rc2. It can be
found at:
kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.27.36-rc2.gz
thanks,
greg k-h
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2009-10-02 17:53 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-01 23:19 [patch 0/9] 2.6.27.36-stable review Greg KH
2009-10-01 23:16 ` Greg KH
2009-10-01 23:16 ` [patch 1/9] fs: make sure data stored into inode is properly seen before unlocking new inode Greg KH
2009-10-01 23:16 ` [patch 2/9] p54usb: add Zcomax XG-705A usbid Greg KH
2009-10-01 23:16 ` [patch 3/9] enc28j60: fix RX buffer overflow Greg KH
2009-10-01 23:16 ` [patch 4/9] pcnet_cs: Fix misuse of the equality operator Greg KH
2009-10-01 23:16 ` [patch 5/9] Fix incorrect stable backport to bas_gigaset Greg KH
2009-10-01 23:16 ` [patch 6/9] net ax25: Fix signed comparison in the sockopt handler Greg KH
2009-10-01 23:16 ` [patch 7/9] net: Make the copy length in af_packet sockopt handler unsigned Greg KH
2009-10-01 23:16 ` [patch 8/9] netfilter: bridge: refcount fix Greg KH
2009-10-01 23:16 ` [patch 9/9] hugetlb: restore interleaving of bootmem huge pages (2.6.31) Greg KH
2009-10-02 17:49 ` [patch 10/09] mm: fix anonymous dirtying Greg KH
2009-10-02 17:50 ` [patch 11/09] mmap: avoid unnecessary anon_vma lock acquisition in vma_adjust() Greg KH
2009-10-02 17:50 ` [patch 0/9] 2.6.27.36-stable review Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox