2.6.27.34-stable review
Subsystems (5)
cover 2.6.27.34-stable review
This is the start of the stable review cycle for the 2.6.27.34 release. There are 4 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 [email protected] to add your name to the list. If you want to be off the reviewer list, also email us.
Responses should be made by Sunday, September 12, 2009 00: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.34-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Makefile | 2 +- drivers/net/e100.c | 2 +- fs/jffs2/wbuf.c | 10 ++++++++++ mm/slub.c | 4 ++-- net/core/net_namespace.c | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-)
PATCH 1/4 E100: fix interaction with swiotlb on X86.
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Krzysztof Hałasa <[email protected]>
[ Upstream commit 6ff9c2e7fa8ca63a575792534b63c5092099c286 ]
E100 places it's RX packet descriptors inside skb->data and uses them with bidirectional streaming DMA mapping. Data in descriptors is accessed simultaneously by the chip (writing status and size when a packet is received) and CPU (reading to check if the packet was received). This isn't a valid usage of PCI DMA API, which requires use of the coherent (consistent) memory for such purpose. Unfortunately e100 chips working in "simplified" RX mode have to store received data directly after the descriptor. Fixing the driver to conform to the API would require using unsupported "flexible" RX mode or receiving data into a coherent memory and using CPU to copy it to network buffers.
This patch, while not yet making the driver conform to the PCI DMA API, allows it to work correctly on X86 with swiotlb (while not breaking other architectures).
--- drivers/net/e100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/e100.c +1 -1
@@ -1842,7 +1842,7 @@ static int e100_rx_indicate(struct nic * nic->ru_running =RU_SUSPENDED ;pci_dma_sync_single_for_device (nic->pdev, rx->dma_addr,sizeof (struct rfd ), -PCI_DMA_BIDIRECTIONAL ); +PCI_DMA_FROMDEVICE );return -ENODATA ; }
PATCH 2/4 net: net_assign_generic() fix
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 144586301f6af5ae5943a002f030d8c626fa4fdd ]
memcpy() should take into account size of pointers, not only number of pointers to copy.
--- net/core/net_namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/net_namespace.c +1 -1
@@ -446,7 +446,7 @@ int net_assign_generic(struct net *net, ng->len = id;INIT_RCU_HEAD (&ng->rcu); -memcpy (&ng->ptr, &old_ng->ptr, old_ng->len); +memcpy (&ng->ptr, &old_ng->ptr, old_ng->len *sizeof (void *));rcu_assign_pointer (net->gen, ng);call_rcu (&old_ng->rcu, net_generic_release);
PATCH 3/4 JFFS2: add missing verify buffer allocation/deallocation
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Massimo Cirillo <[email protected]>
commit bc8cec0dff072f1a45ce7f6b2c5234bb3411ac51 upstream.
The function jffs2_nor_wbuf_flash_setup() doesn't allocate the verify buffer if CONFIG_JFFS2_FS_WBUF_VERIFY is defined, so causing a kernel panic when that macro is enabled and the verify function is called. Similarly the jffs2_nor_wbuf_flash_cleanup() must free the buffer if CONFIG_JFFS2_FS_WBUF_VERIFY is enabled.
The following patch fixes the problem.
The following patch applies to 2.6.30 kernel.
--- fs/jffs2/wbuf.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
fs/jffs2/wbuf.c +10 -0
@@ -1271,10 +1271,20 @@ int jffs2_nor_wbuf_flash_setup(struct jfif (!c->wbuf)return -ENOMEM ; +#ifdef CONFIG_JFFS2_FS_WBUF_VERIFY + c->wbuf_verify =kmalloc (c->wbuf_pagesize,GFP_KERNEL ); +if (!c->wbuf_verify) { +kfree (c->wbuf); +return -ENOMEM ; + } +#endif return 0 ; }void jffs2_nor_wbuf_flash_cleanup (struct jffs2_sb_info *c) { +#ifdef CONFIG_JFFS2_FS_WBUF_VERIFY +kfree (c->wbuf_verify); +#endif kfree (c->wbuf); }
PATCH 4/4 slub: Fix kmem_cache_destroy() with SLAB_DESTROY_BY_RCU
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Eric Dumazet <[email protected]>
commit d76b1590e06a63a3d8697168cd0aabf1c4b3cb3a upstream.
kmem_cache_destroy() should call rcu_barrier() *after* kmem_cache_close() and *before* sysfs_slab_remove() or risk rcu_free_slab() being called after kmem_cache is deleted (kfreed).
rmmod nf_conntrack can crash the machine because it has to kmem_cache_destroy() a SLAB_DESTROY_BY_RCU enabled cache.
--- mm/slub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
mm/slub.c +2 -2
@@ -2447,8 +2447,6 @@ static inline int kmem_cache_close(struc*/ void kmem_cache_destroy (struct kmem_cache *s) { -if (s->flags &SLAB_DESTROY_BY_RCU ) -rcu_barrier ();down_write (&slub_lock); s->refcount--;if (!s->refcount) {
@@ -2459,6 +2457,8 @@ void kmem_cache_destroy(struct kmem_cach "still has objects.\n", s->name, __func__);dump_stack (); } +if (s->flags &SLAB_DESTROY_BY_RCU ) +rcu_barrier ();sysfs_slab_remove (s); }else up_write (&slub_lock);