Linux 3.13.9
Greg KH
maintainerI'm announcing the release of the 3.13.9 kernel.
All users of the 3.13 kernel series must upgrade.
The updated 3.13.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.13.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/x86/include/asm/pgtable.h | 14 -- arch/x86/include/asm/topology.h | 3 arch/x86/xen/mmu.c | 4 drivers/block/aoe/aoecmd.c | 4 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 drivers/i2c/busses/i2c-cpm.c | 2 drivers/input/mouse/cypress_ps2.c | 1 drivers/input/mouse/synaptics.c | 55 +++++++++ drivers/input/mousedev.c | 73 +++++++------ drivers/net/ethernet/marvell/mvneta.c | 43 +------ drivers/vfio/vfio_iommu_type1.c | 4 drivers/xen/balloon.c | 24 +++- fs/dcache.c | 4 fs/ext4/inode.c | 15 +- fs/mount.h | 4 fs/namei.c | 29 ++--- fs/namespace.c | 177 ++++++++++++++++++++------------ fs/pnode.c | 26 ++-- fs/pnode.h | 4 fs/proc/page.c | 2 include/linux/bitops.h | 15 ++ include/linux/cgroup.h | 2 include/linux/huge_mm.h | 18 --- include/linux/mm.h | 14 ++ kernel/cgroup.c | 26 ++-- lib/random32.c | 13 ++ mm/ksm.c | 2 mm/memory-failure.c | 2 mm/page_alloc.c | 4 mm/swap.c | 4 net/netfilter/nf_conntrack_proto_dccp.c | 6 - 32 files changed, 361 insertions(+), 237 deletions(-)
Al Viro (6):
rcuwalk: recheck mount_lock after mountpoint crossing attempts make prepend_name() work correctly when called with negative *buflen resizable namespace.c hashes
keep shadowed vfsmounts together
don't bother with propagate_mnt() unless the target is shared switch mnt_hash to hlist
Artem Fetishev (1):
x86: fix boot on uniprocessor systems
Benjamin Tissoires (1):
Input: synaptics - add manual min/max quirk
Daniel Borkmann (1):
netfilter: nf_conntrack_dccp: fix skb_header_pointer API usages
Daniel Vetter (1):
drm/i915: Undo gtt scratch pte unmapping again
David Rientjes (1):
mm: close PageTail race
David Vrabel (1):
Revert "xen: properly account for _PAGE_NUMA during xen pte translations"
Dmitry Torokhov (1):
Input: mousedev - fix race when creating mixed device
Greg Kroah-Hartman (1):
Linux 3.13.9
Hans de Goede (2):
Input: synaptics - add manual min/max quirk for ThinkPad X240
Input: cypress_ps2 - don't report as a button pads
Li Zefan (1):
cgroup: protect modifications to cgroup_idr with cgroup_mutex
Sasha Levin (1):
random32: avoid attempt to late reseed if in the middle of seeding
Scott Wood (1):
i2c: cpm: Fix build by adding of_address.h and of_irq.h
Theodore Ts'o (1):
ext4: atomically set inode->i_flags in ext4_set_inode_flags()
Thomas Petazzoni (2):
net: mvneta: rename MVNETA_GMAC2_PSC_ENABLE to MVNETA_GMAC2_PCS_ENABLE
net: mvneta: fix usage as a module on RGMII configurations
Wei Liu (1):
xen/balloon: flush persistent kmaps in correct position
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 13 -SUBLEVEL = 8 +SUBLEVEL = 9 EXTRAVERSION = NAME = One Giant Leap for Frogkind
arch/x86/include/asm/pgtable.h +2 -12
@@ -445,20 +445,10 @@ static inline int pte_same(pte_t a, pte_t b)return a.pte == b.pte; } -static inline int pteval_present (pteval_t pteval) -{ -/* -* Yes Linus, _PAGE_PROTNONE == _PAGE_NUMA. Expressing it this -* way clearly states that the intent is that protnone and numa -* hinting ptes are considered present for the purposes of -* pagetable operations like zapping, protection changes, gup etc. -*/ -return pteval & (_PAGE_PRESENT | _PAGE_PROTNONE | _PAGE_NUMA); -} -static inline int pte_present (pte_t a) { -return pteval_present (pte_flags (a)); +return pte_flags (a) & (_PAGE_PRESENT | _PAGE_PROTNONE | + _PAGE_NUMA); }#define pte_accessible pte_accessible
arch/x86/include/asm/topology.h +2 -1
@@ -119,9 +119,10 @@ static inline void setup_node_to_cpumask_map(void) { }extern const struct cpumask *cpu_coregroup_mask (int cpu); -#ifdef ENABLE_TOPO_DEFINES #define topology_physical_package_id (cpu) (cpu_data(cpu).phys_proc_id)#define topology_core_id (cpu) (cpu_data(cpu).cpu_core_id) + +#ifdef ENABLE_TOPO_DEFINES #define topology_core_cpumask (cpu) (per_cpu(cpu_core_map, cpu))#define topology_thread_cpumask (cpu) (per_cpu(cpu_sibling_map, cpu))#endif
arch/x86/xen/mmu.c +2 -2
@@ -365,7 +365,7 @@ void xen_ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr,/* Assume pteval_t is equivalent to all the other *val_t types. */ static pteval_t pte_mfn_to_pfn (pteval_t val) { -if (pteval_present (val)) { +if (val & _PAGE_PRESENT) {unsigned long mfn = (val &PTE_PFN_MASK ) >>PAGE_SHIFT ;unsigned long pfn =mfn_to_pfn (mfn);
@@ -381,7 +381,7 @@ static pteval_t pte_mfn_to_pfn(pteval_t val)static pteval_t pte_pfn_to_mfn (pteval_t val) { -if (pteval_present (val)) { +if (val & _PAGE_PRESENT) {unsigned long pfn = (val &PTE_PFN_MASK ) >>PAGE_SHIFT ;pteval_t flags = val &PTE_FLAGS_MASK ;unsigned long mfn;
drivers/block/aoe/aoecmd.c +2 -2
@@ -905,7 +905,7 @@ bio_pageinc(struct bio *bio)/* Non-zero page count for non-head members of * compound pages is no longer allowed by the kernel. */ - page =compound_trans_head (bv->bv_page); + page =compound_head (bv->bv_page);atomic_inc (&page->_count); } }
@@ -918,7 +918,7 @@ bio_pagedec(struct bio *bio)int i;bio_for_each_segment (bv, bio, i) { - page =compound_trans_head (bv->bv_page); + page =compound_head (bv->bv_page);atomic_dec (&page->_count); } }
drivers/gpu/drm/i915/i915_gem_gtt.c +1 -1
@@ -828,7 +828,7 @@ void i915_gem_suspend_gtt_mappings(struct drm_device *dev) dev_priv->gtt.base.clear_range (&dev_priv->gtt.base, dev_priv->gtt.base.start /PAGE_SIZE , dev_priv->gtt.base.total /PAGE_SIZE , - false); + true); }void i915_gem_restore_gtt_mappings (struct drm_device *dev)
drivers/i2c/busses/i2c-cpm.c +2 -0
@@ -40,7 +40,9 @@#include <linux/i2c.h> #include <linux/io.h> #include <linux/dma-mapping.h> +#include <linux/of_address.h> #include <linux/of_device.h> +#include <linux/of_irq.h> #include <linux/of_platform.h> #include <sysdev/fsl_soc.h> #include <asm/cpm.h>
drivers/input/mouse/cypress_ps2.c +0 -1
@@ -410,7 +410,6 @@ static int cypress_set_input_params(struct input_dev *input,__clear_bit (REL_X , input->relbit);__clear_bit (REL_Y , input->relbit); -__set_bit (INPUT_PROP_BUTTONPAD , input->propbit);__set_bit (EV_KEY , input->evbit);__set_bit (BTN_LEFT , input->keybit);__set_bit (BTN_RIGHT , input->keybit);
drivers/input/mouse/synaptics.c +55 -0
76 lines not on this page · raw message
drivers/input/mousedev.c +42 -31
159 lines not on this page · raw message
drivers/net/ethernet/marvell/mvneta.c +9 -34
71 lines not on this page · raw message
drivers/vfio/vfio_iommu_type1.c +2 -2
@@ -186,12 +186,12 @@ static bool is_invalid_reserved_pfn(unsigned long pfn)if (pfn_valid (pfn)) {bool reserved;struct page *tail =pfn_to_page (pfn); -struct page *head =compound_trans_head (tail); +struct page *head =compound_head (tail); reserved = !!(PageReserved (head));if (head != tail) {/* * "head" is not a dangling pointer -* (compound_trans_head takes care of that) +* (compound_head takes care of that) * but the hugepage may have been split * from under us (and we may not hold a * reference count on the head page so it can
drivers/xen/balloon.c +18 -6
@@ -406,11 +406,25 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp) state =BP_EAGAIN ;break ; } +scrub_page (page); - pfn =page_to_pfn (page); - frame_list[i] =pfn_to_mfn (pfn); + frame_list[i] =page_to_pfn (page); + } -scrub_page (page); +/* +* Ensure that ballooned highmem pages don't have kmaps. +* +* Do this before changing the p2m as kmap_flush_unused() +* reads PTEs to obtain pages (and hence needs the original +* p2m entry). +*/ +kmap_flush_unused (); + +/* Update direct mapping, invalidate P2M, and add to balloon. */ +for (i =0 ; i < nr_pages; i++) { + pfn = frame_list[i]; + frame_list[i] =pfn_to_mfn (pfn); + page =pfn_to_page (pfn);#ifdef CONFIG_XEN_HAVE_PVMMU /*
@@ -436,11 +450,9 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp) }#endif -balloon_append (pfn_to_page (pfn)); +balloon_append (page); } -/* Ensure that ballooned highmem pages don't have kmaps. */ -kmap_flush_unused ();flush_tlb_all ();set_xen_guest_handle (reservation.extent_start, frame_list);
fs/dcache.c +2 -2
@@ -2833,9 +2833,9 @@ static int prepend_name(char **buffer, int *buflen, struct qstr *name)u32 dlen =ACCESS_ONCE (name->len);char *p; -if (*buflen < dlen +1 ) -return -ENAMETOOLONG ; *buflen -= dlen +1 ; +if (*buflen <0 ) +return -ENAMETOOLONG ; p = *buffer -= dlen +1 ; *p++ ='/' ;while (dlen--) {
fs/ext4/inode.c +9 -6
@@ -38,6 +38,7 @@#include <linux/slab.h> #include <linux/ratelimit.h> #include <linux/aio.h> +#include <linux/bitops.h> #include "ext4_jbd2.h" #include "xattr.h"
@@ -3926,18 +3927,20 @@ int ext4_get_inode_loc(struct inode *inode, struct ext4_iloc *iloc)void ext4_set_inode_flags (struct inode *inode) {unsigned int flags =EXT4_I (inode)->i_flags; +unsigned int new_fl =0 ; - inode->i_flags &= ~(S_SYNC |S_APPEND |S_IMMUTABLE |S_NOATIME |S_DIRSYNC );if (flags &EXT4_SYNC_FL ) - inode->i_flags |=S_SYNC ; + new_fl |=S_SYNC ;if (flags &EXT4_APPEND_FL ) - inode->i_flags |=S_APPEND ; + new_fl |=S_APPEND ;if (flags &EXT4_IMMUTABLE_FL ) - inode->i_flags |=S_IMMUTABLE ; + new_fl |=S_IMMUTABLE ;if (flags &EXT4_NOATIME_FL ) - inode->i_flags |=S_NOATIME ; + new_fl |=S_NOATIME ;if (flags &EXT4_DIRSYNC_FL ) - inode->i_flags |=S_DIRSYNC ; + new_fl |=S_DIRSYNC ; +set_mask_bits (&inode->i_flags, +S_SYNC |S_APPEND |S_IMMUTABLE |S_NOATIME |S_DIRSYNC , new_fl); }/* Propagate flags from i_flags to EXT4_I(inode)->i_flags */
fs/mount.h +2 -2
@@ -19,13 +19,13 @@ struct mnt_pcp { };struct mountpoint { -struct list_head m_hash; +struct hlist_node m_hash;struct dentry *m_dentry;int m_count; };struct mount { -struct list_head mnt_hash; +struct hlist_node mnt_hash;struct mount *mnt_parent;struct dentry *mnt_mountpoint;struct vfsmount mnt;
fs/namei.c +13 -16
@@ -1098,7 +1098,7 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path,return false;if (!d_mountpoint (path->dentry)) -break ; +return true; mounted =__lookup_mnt (path->mnt, path->dentry);if (!mounted)
@@ -1114,20 +1114,7 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path,*/ *inode = path->dentry->d_inode; } -return true; -} - -static void follow_mount_rcu (struct nameidata *nd) -{ -while (d_mountpoint (nd->path.dentry)) { -struct mount *mounted; - mounted =__lookup_mnt (nd->path.mnt, nd->path.dentry); -if (!mounted) -break ; - nd->path.mnt = &mounted->mnt; - nd->path.dentry = mounted->mnt.mnt_root; - nd->seq =read_seqcount_begin (&nd->path.dentry->d_seq); - } +return read_seqretry (&mount_lock, nd->m_seq); }static int follow_dotdot_rcu (struct nameidata *nd)
@@ -1155,7 +1142,17 @@ static int follow_dotdot_rcu(struct nameidata *nd)break ; nd->seq =read_seqcount_begin (&nd->path.dentry->d_seq); } -follow_mount_rcu (nd); +while (d_mountpoint (nd->path.dentry)) { +struct mount *mounted; + mounted =__lookup_mnt (nd->path.mnt, nd->path.dentry); +if (!mounted) +break ; + nd->path.mnt = &mounted->mnt; + nd->path.dentry = mounted->mnt.mnt_root; + nd->seq =read_seqcount_begin (&nd->path.dentry->d_seq); +if (!read_seqretry (&mount_lock, nd->m_seq)) + goto failed; + } nd->inode = nd->path.dentry->d_inode;return 0 ;
fs/namespace.c +115 -62
343 lines not on this page · raw message
fs/pnode.c +15 -11
@@ -220,14 +220,14 @@ static struct mount *get_source(struct mount *dest,* @tree_list : list of heads of trees to be attached. */ int propagate_mnt (struct mount *dest_mnt,struct mountpoint *dest_mp, -struct mount *source_mnt,struct list_head *tree_list) +struct mount *source_mnt,struct hlist_head *tree_list) {struct user_namespace *user_ns = current->nsproxy->mnt_ns->user_ns;struct mount *m, *child;int ret =0 ;struct mount *prev_dest_mnt = dest_mnt;struct mount *prev_src_mnt = source_mnt; -LIST_HEAD (tmp_list); +HLIST_HEAD (tmp_list);for (m =propagation_next (dest_mnt, dest_mnt); m; m =propagation_next (m, dest_mnt)) {
@@ -246,27 +246,29 @@ int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp, child =copy_tree (source, source->mnt.mnt_root, type);if (IS_ERR (child)) { ret =PTR_ERR (child); -list_splice (tree_list, tmp_list.prev); + tmp_list = *tree_list; + tmp_list.first->pprev = &tmp_list.first; +INIT_HLIST_HEAD (tree_list); goto out; }if (is_subdir (dest_mp->m_dentry, m->mnt.mnt_root)) {mnt_set_mountpoint (m, dest_mp, child); -list_add_tail (&child->mnt_hash, tree_list); +hlist_add_head (&child->mnt_hash, tree_list); }else {/* * This can happen if the parent mount was bind mounted * on some subdirectory of a shared/slave mount. */ -list_add_tail (&child->mnt_hash, &tmp_list); +hlist_add_head (&child->mnt_hash, &tmp_list); } prev_dest_mnt = m; prev_src_mnt = child; } out:lock_mount_hash (); -while (!list_empty (&tmp_list)) { - child = list_first_entry(&tmp_list, struct mount, mnt_hash); +while (!hlist_empty (&tmp_list)) { + child = hlist_entry(tmp_list.first, struct mount, mnt_hash);umount_tree (child,0 ); }unlock_mount_hash ();
@@ -338,8 +340,10 @@ static void __propagate_umount(struct mount *mnt)* umount the child only if the child has no * other children */ -if (child &&list_empty (&child->mnt_mounts)) -list_move_tail (&child->mnt_hash, &mnt->mnt_hash); +if (child &&list_empty (&child->mnt_mounts)) { +hlist_del_init_rcu (&child->mnt_hash); +hlist_add_before_rcu (&child->mnt_hash, &mnt->mnt_hash); + } } }
@@ -350,11 +354,11 @@ static void __propagate_umount(struct mount *mnt)* * vfsmount lock must be held for write */ -int propagate_umount (struct list_head *list) +int propagate_umount (struct hlist_head *list) {struct mount *mnt; -list_for_each_entry (mnt, list, mnt_hash) +hlist_for_each_entry (mnt, list, mnt_hash)__propagate_umount (mnt);return 0 ; }
fs/pnode.h +2 -2
@@ -36,8 +36,8 @@ static inline void set_mnt_shared(struct mount *mnt)void change_mnt_propagation (struct mount *,int );int propagate_mnt (struct mount *,struct mountpoint *,struct mount *, -struct list_head *); -int propagate_umount (struct list_head *); +struct hlist_head *); +int propagate_umount (struct hlist_head *);int propagate_mount_busy (struct mount *,int );void mnt_release_group_id (struct mount *);int get_dominating_id (struct mount *mnt,const struct path *root);
fs/proc/page.c +1 -1
@@ -121,7 +121,7 @@ u64 stable_page_flags(struct page *page)* just checks PG_head/PG_tail, so we need to check PageLRU to make * sure a given page is a thp, not a non-huge compound page. */ - else if (PageTransCompound(page) && PageLRU(compound_trans_head(page))) + else if (PageTransCompound(page) && PageLRU(compound_head(page))) u |= 1 << KPF_THP;/*
include/linux/bitops.h +15 -0
@@ -196,6 +196,21 @@ static inline unsigned long __ffs64(u64 word)#ifdef __KERNEL__ +#ifndef set_mask_bits +#define set_mask_bits (ptr, _mask, _bits) \ +({ \ + const typeof(*ptr) mask = (_mask), bits = (_bits); \ + typeof(*ptr) old, new; \ + \ + do { \ + old = ACCESS_ONCE(*ptr); \ + new = (old & ~mask) | bits; \ + } while (cmpxchg(ptr, old, new) != old); \ + \ + new; \ +}) +#endif +#ifndef find_last_bit/** * find_last_bit - find the last set bit in a memory region
include/linux/cgroup.h +2 -0
@@ -169,6 +169,8 @@ struct cgroup {* * The ID of the root cgroup is always 0, and a new cgroup * will be assigned with a smallest available ID. +* +* Allocating/Removing ID must be protected by cgroup_mutex. */ int id;
include/linux/huge_mm.h +0 -18
@@ -157,23 +157,6 @@ static inline int hpage_nr_pages(struct page *page)return HPAGE_PMD_NR ;return 1 ; } -static inline struct page *compound_trans_head (struct page *page) -{ -if (PageTail (page)) { -struct page *head; - head = page->first_page; -smp_rmb (); -/* -* head may be a dangling pointer. -* __split_huge_page_refcount clears PageTail before -* overwriting first_page, so if PageTail is still -* there it means the head pointer isn't dangling. -*/ -if (PageTail (page)) -return head; - } -return page; -}extern int do_huge_pmd_numa_page (struct mm_struct *mm,struct vm_area_struct *vma,unsigned long addr,pmd_t pmd,pmd_t *pmdp);
@@ -203,7 +186,6 @@ static inline int split_huge_page(struct page *page) do { } while (0)#define split_huge_page_pmd_mm (__mm, __address, __pmd) \ do { } while (0) -#define compound_trans_head (page) compound_head(page)static inline int hugepage_madvise (struct vm_area_struct *vma,unsigned long *vm_flags,int advice) {
include/linux/mm.h +12 -2
@@ -389,8 +389,18 @@ static inline void compound_unlock_irqrestore(struct page *page,static inline struct page *compound_head (struct page *page) { -if (unlikely (PageTail (page))) -return page->first_page; +if (unlikely (PageTail (page))) { +struct page *head = page->first_page; + +/* +* page->first_page may be a dangling pointer to an old +* compound page, so recheck that it is still a tail +* page before returning. +*/ +smp_rmb (); +if (likely (PageTail (page))) +return head; + }return page; }
kernel/cgroup.c +13 -13
@@ -4363,16 +4363,6 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry,rcu_assign_pointer (cgrp->name, name);/* -* Temporarily set the pointer to NULL, so idr_find() won't return -* a half-baked cgroup. -*/ - cgrp->id =idr_alloc (&root->cgroup_idr,NULL ,1 ,0 ,GFP_KERNEL ); -if (cgrp->id <0 ) { - err = -ENOMEM ; - goto err_free_name; - } - -/* * Only live parents can have children. Note that the liveliness * check isn't strictly necessary because cgroup_mkdir() and * cgroup_rmdir() are fully synchronized by i_mutex; however, do it
@@ -4381,7 +4371,7 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry,*/ if (!cgroup_lock_live_group (parent)) { err = -ENODEV ; - goto err_free_id; + goto err_free_name; }/* Grab a reference on the superblock so the hierarchy doesn't
@@ -4391,6 +4381,16 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry,* fs */ atomic_inc (&sb->s_active); +/* +* Temporarily set the pointer to NULL, so idr_find() won't return +* a half-baked cgroup. +*/ + cgrp->id =idr_alloc (&root->cgroup_idr,NULL ,1 ,0 ,GFP_KERNEL ); +if (cgrp->id <0 ) { + err = -ENOMEM ; + goto err_unlock; + } +init_cgroup_housekeeping (cgrp); dentry->d_fsdata = cgrp;
@@ -4491,11 +4491,11 @@ err_free_all: ss->css_free (css); } } +idr_remove (&root->cgroup_idr, cgrp->id); +err_unlock:mutex_unlock (&cgroup_mutex);/* Release the reference count that we took on the superblock */ deactivate_super (sb); -err_free_id: -idr_remove (&root->cgroup_idr, cgrp->id); err_free_name:kfree (rcu_dereference_raw (cgrp->name)); err_free_cgrp:
lib/random32.c +12 -1
@@ -244,8 +244,19 @@ static void __prandom_reseed(bool late)static bool latch = false;static DEFINE_SPINLOCK (lock); +/* Asking for random bytes might result in bytes getting +* moved into the nonblocking pool and thus marking it +* as initialized. In this case we would double back into +* this function and attempt to do a late reseed. +* Ignore the pointless attempt to reseed again if we're +* already waiting for bytes when the nonblocking pool +* got initialized. +*/ +/* only allow initial seeding (late == false) once */ -spin_lock_irqsave (&lock, flags); +if (!spin_trylock_irqsave (&lock, flags)) +return ; +if (latch && !late) goto out; latch = true;
mm/ksm.c +1 -1
@@ -444,7 +444,7 @@ static void break_cow(struct rmap_item *rmap_item)static struct page *page_trans_compound_anon (struct page *page) {if (PageTransCompound (page)) { -struct page *head =compound_trans_head (page); +struct page *head =compound_head (page);/* * head may actually be splitted and freed from under * us but it's ok here.
mm/memory-failure.c +1 -1
@@ -1645,7 +1645,7 @@ int soft_offline_page(struct page *page, int flags) {int ret;unsigned long pfn =page_to_pfn (page); -struct page *hpage =compound_trans_head (page); +struct page *hpage =compound_head (page);if (PageHWPoison (page)) {pr_info ("soft offline: %#lx page already poisoned\n" , pfn);
mm/page_alloc.c +3 -1
@@ -369,9 +369,11 @@ void prep_compound_page(struct page *page, unsigned long order)__SetPageHead (page);for (i =1 ; i < nr_pages; i++) {struct page *p = page + i; -__SetPageTail (p);set_page_count (p,0 ); p->first_page = page; +/* Make sure p->first_page is always valid for PageTail() */ +smp_wmb (); +__SetPageTail (p); } }
mm/swap.c +2 -2
@@ -84,7 +84,7 @@ static void put_compound_page(struct page *page) {if (unlikely (PageTail (page))) {/* __split_huge_page_refcount can run under us */ -struct page *page_head =compound_trans_head (page); +struct page *page_head =compound_head (page);if (likely (page != page_head &&get_page_unless_zero (page_head))) {
@@ -222,7 +222,7 @@ bool __get_page_tail(struct page *page)*/ unsigned long flags;bool got = false; -struct page *page_head =compound_trans_head (page); +struct page *page_head =compound_head (page);if (likely (page != page_head &&get_page_unless_zero (page_head))) {/* Ref to put_compound_page() comment. */
net/netfilter/nf_conntrack_proto_dccp.c +3 -3
@@ -428,7 +428,7 @@ static bool dccp_new(struct nf_conn *ct, const struct sk_buff *skb,const char *msg;u_int8_t state; - dh =skb_header_pointer (skb, dataoff,sizeof (_dh), &dh); + dh =skb_header_pointer (skb, dataoff,sizeof (_dh), &_dh);BUG_ON (dh ==NULL ); state = dccp_state_table[CT_DCCP_ROLE_CLIENT ][dh->dccph_type][CT_DCCP_NONE ];
@@ -486,7 +486,7 @@ static int dccp_packet(struct nf_conn *ct, const struct sk_buff *skb,u_int8_t type, old_state, new_state;enum ct_dccp_roles role; - dh =skb_header_pointer (skb, dataoff,sizeof (_dh), &dh); + dh =skb_header_pointer (skb, dataoff,sizeof (_dh), &_dh);BUG_ON (dh ==NULL ); type = dh->dccph_type;
@@ -577,7 +577,7 @@ static int dccp_error(struct net *net, struct nf_conn *tmpl,unsigned int cscov;const char *msg; - dh =skb_header_pointer (skb, dataoff,sizeof (_dh), &dh); + dh =skb_header_pointer (skb, dataoff,sizeof (_dh), &_dh);if (dh ==NULL ) { msg ="nf_ct_dccp: short packet " ; goto out_invalid;