Linux 3.14.11
Greg KH
maintainerI'm announcing the release of the 3.14.11 kernel.
All users of the 3.14 kernel series must upgrade.
The updated 3.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.14.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
------------
Documentation/SubmittingPatches | 22 ++++ Makefile | 2 arch/arm/boot/dts/exynos5420.dtsi | 7 + arch/mips/kernel/irq-msc01.c | 2 arch/mips/kvm/kvm_mips.c | 13 -- arch/powerpc/include/asm/switch_to.h | 2 arch/powerpc/include/asm/systbl.h | 2 arch/powerpc/include/uapi/asm/cputable.h | 1 arch/powerpc/kernel/cputable.c | 3 arch/powerpc/kernel/legacy_serial.c | 15 +-- arch/powerpc/kernel/setup-common.c | 10 +- arch/powerpc/kernel/time.c | 2 arch/powerpc/lib/sstep.c | 2 arch/powerpc/mm/hash_utils_64.c | 31 ++++-- arch/powerpc/platforms/pseries/eeh_pseries.c | 1 arch/x86/include/asm/ptrace.h | 16 +++ drivers/block/mtip32xx/mtip32xx.c | 123 +++++++++++++++++++-------- drivers/infiniband/core/user_mad.c | 75 +++++++++------- drivers/infiniband/hw/ipath/ipath_diag.c | 4 drivers/infiniband/hw/mlx5/cq.c | 13 ++ drivers/infiniband/hw/mlx5/srq.c | 14 ++- drivers/infiniband/hw/mlx5/user.h | 2 drivers/infiniband/hw/qib/qib_mad.c | 2 drivers/infiniband/ulp/srp/ib_srp.c | 6 + drivers/input/mouse/elantech.c | 27 ++++- drivers/input/mouse/synaptics.c | 19 ++-- drivers/pci/pci.c | 2 drivers/pci/quirks.c | 1 drivers/target/iscsi/iscsi_target.c | 2 drivers/target/iscsi/iscsi_target_login.c | 13 +- drivers/target/iscsi/iscsi_target_util.c | 2 drivers/target/target_core_device.c | 1 drivers/watchdog/ath79_wdt.c | 10 ++ drivers/watchdog/kempld_wdt.c | 2 drivers/watchdog/sp805_wdt.c | 4 fs/nfs/inode.c | 26 +++-- fs/nfs/nfs4filelayout.c | 2 fs/nfs/nfs4state.c | 6 - fs/nfs/super.c | 1 fs/nfs/write.c | 4 fs/nfsd/nfs4state.c | 2 fs/nfsd/nfs4xdr.c | 4 fs/reiserfs/inode.c | 8 + fs/ubifs/file.c | 3 fs/ubifs/shrinker.c | 1 fs/xfs/xfs_mount.c | 23 +++-- include/linux/ptrace.h | 3 include/trace/syscall.h | 15 +++ kernel/fork.c | 2 kernel/trace/trace.c | 13 +- kernel/watchdog.c | 2 lib/lz4/lz4_decompress.c | 6 + net/netfilter/ipvs/ip_vs_core.c | 15 ++- net/sunrpc/svc_xprt.c | 2 scripts/recordmcount.h | 4 sound/pci/hda/patch_hdmi.c | 2 sound/usb/card.c | 13 ++ sound/usb/endpoint.c | 17 +++ sound/usb/endpoint.h | 1 59 files changed, 450 insertions(+), 178 deletions(-)
Alex Smith (1):
recordmcount/MIPS: Fix possible incorrect mcount_loc table entries in modules
Anton Blanchard (1):
powerpc: 64bit sendfile is capped at 2GB
Asai Thambi S P (3):
mtip32xx: Fix ERO and NoSnoop values in PCIe upstream on AMD systems
mtip32xx: Increase timeout for STANDBY IMMEDIATE command
mtip32xx: Remove dfs_parent after pci unregister
Bart Van Assche (3):
IB/srp: Fix a sporadic crash triggered by cable pulling IB/umad: Fix error handling
IB/umad: Fix use-after-free on close
Benjamin Herrenschmidt (2):
powerpc/serial: Use saner flags when creating legacy ports
powerpc: Add AT_HWCAP2 to indicate V.CRYPTO category support
Benjamin Tissoires (1):
Input: synaptics - fix resolution for manually provided min/max
Bjorn Helgaas (1):
PCI: Fix incorrect vgaarb conditional in WARN_ON()
Christoph Hellwig (1):
nfsd: getattr for FATTR4_WORD0_FILES_AVAIL needs the statfs buffer
Dave Chinner (1):
xfs: xfs_readsb needs to check for magic numbers
Deng-Cheng Zhu (1):
MIPS: KVM: Fix memory leak on VCPU
Dennis Dalessandro (1):
IB/ipath: Translate legacy diagpkt into newer extended diagpkt
Don Zickus (1):
kernel/watchdog.c: remove preemption restrictions when restarting lockup detector
Gabor Juhos (1):
watchdog: ath79_wdt: avoid spurious restarts on AR934x
Gavin Shan (1):
powerpc/pseries: Fix overwritten PE state
Greg Kroah-Hartman (2):
lz4: add overrun checks to lz4_uncompress_unknownoutputsize() Linux 3.14.11
Hans de Goede (2):
Input: elantech - deal with clickpads reporting right button events
Input: elantech - don't set bit 1 of reg_10 when the no_hw_res quirk is set
J. Bruce Fields (1):
nfsd4: fix FREE_STATEID lockowner leak
Jacob Keller (1):
Documentation/SubmittingPatches: describe the Fixes: tag
James Hogan (1):
MIPS: KVM: Remove redundant NULL checks before kfree()
Jeff Mahoney (1):
reiserfs: call truncate_setsize under tailpack mutex
Markos Chandras (1):
MIPS: MSC: Prevent out-of-bounds writes to MIPS SC ioremap'd region
Mateusz Guzik (1):
NFS: populate ->net in mount data when remounting
Michael Ellerman (2):
powerpc/mm: Check paca psize is up to date for huge mappings powerpc/perf: Ensure all EBB register state is cleared on fork()
Michael Neuling (1):
powerpc: Don't setup CPUs with bad status
Mike Marciniszyn (1):
IB/qib: Fix port in pkey change event
Mikulas Patocka (1):
iscsi-target: fix iscsit_del_np deadlock on unload
Nicholas Bellinger (3):
target: Fix left-over se_lun->lun_sep pointer OOPs
iscsi-target: Avoid rejecting incorrect ITT for Data-Out
iscsi-target: Explicily clear login response PDU in exception path
Oleg Nesterov (1):
tracing: Fix syscall_*regfunc() vs copy_process() race
Paul Bolle (2):
powerpc: fix typo 'CONFIG_PMAC'
powerpc: fix typo 'CONFIG_PPC_CPU'
Peter Christensen (1):
ipvs: Fix panic due to non-linear skb
Pierre Ossman (1):
ALSA: hda - hdmi: call overridden init on resume
Scott Mayhew (1):
nfs: Fix cache_validity check in nfs_write_pageuptodate()
Scott Wood (1):
powerpc: Don't skip ePAPR spin-table CPUs
Seungwon Jeon (1):
ARM: dts: disable MDMA1 node for exynos5420
Steven Rostedt (Red Hat) (1):
tracing: Try again for saved cmdline if failed due to locking
Takashi Iwai (1):
ALSA: usb-audio: Fix races at disconnection and PCM closing
Tejun Heo (1):
ptrace,x86: force IRET path after a ptrace_stop()
Thomas Jarosch (1):
PCI: Add new ID for Intel GPU "spurious interrupt" quirk
Trond Myklebust (4):
SUNRPC: Fix a module reference leak in svc_handle_xprt
pNFS: Handle allocation errors correctly in filelayout_alloc_layout_hdr()
NFS: Don't declare inode uptodate unless all attributes were checked
NFS: Use raw_write_seqcount_begin/end int nfs4_reclaim_open_state
Viresh Kumar (1):
watchdog: sp805: Set watchdog_device->timeout from ->set_timeout()
Yann Droneaud (2):
IB/mlx5: add missing padding at end of struct mlx5_ib_create_cq IB/mlx5: add missing padding at end of struct mlx5_ib_create_srq
gundberg (1):
watchdog: kempld-wdt: Use the correct value when configuring the prescaler with the watchdog
hujianyang (2):
UBIFS: fix an mmap and fsync race condition
UBIFS: Remove incorrect assertion in shrink_tnc()
Greg KH
maintainerDocumentation/SubmittingPatches +21 -1
@@ -119,6 +119,20 @@ Example: platform_set_drvdata(), but left the variable "dev" unused, delete it. +If your patch fixes a bug in a specific commit, e.g. you found an issue using +git-bisect, please use the 'Fixes:' tag with the first 12 characters of the +SHA-1 ID, and the one line summary. +Example: + + Fixes: e21d2170f366 ("video: remove unnecessary platform_set_drvdata()") + +The following git-config settings can be used to add a pretty format for +outputting the above style in the git log or git show commands + + [core] + abbrev = 12 + [pretty] + fixes = Fixes: %h (\"%s\") 3) Separate your changes.
@@ -430,7 +444,7 @@ person it names. This tag documents that potentially interested parties have been included in the discussion -14) Using Reported-by:, Tested-by:, Reviewed-by: and Suggested-by: +14) Using Reported-by:, Tested-by:, Reviewed-by:, Suggested-by: and Fixes: If this patch fixes a problem reported by somebody else, consider adding a Reported-by: tag to credit the reporter for their contribution. Please
@@ -485,6 +499,12 @@ idea was not posted in a public forum. That said, if we diligently credit our idea reporters, they will, hopefully, be inspired to help us again in the future. +A Fixes: tag indicates that the patch fixes an issue in a previous commit. It +is used to make it easy to determine where a bug originated, which can help +review a bug fix. This tag also assists the stable kernel team in determining +which stable kernel versions should receive your fix. This is the preferred +method for indicating a bug fixed by the patch. See #2 above for more details. + 15) The canonical patch format
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 14 -SUBLEVEL = 10 +SUBLEVEL = 11 EXTRAVERSION = NAME = Remembering Coco
arch/arm/boot/dts/exynos5420.dtsi +7 -0
@@ -323,6 +323,13 @@ #dma-cells = <1>; #dma-channels = <8>; #dma-requests = <1>; + /* + * MDMA1 can support both secure and non-secure + * AXI transactions. When this is enabled in the kernel + * for boards that run in secure mode, we are getting + * imprecise external aborts causing the kernel to oops. + */ + status = "disabled"; }; };
arch/mips/kernel/irq-msc01.c +1 -1
@@ -131,7 +131,7 @@ void __init init_msc_irqs(unsigned long icubase, unsigned int irqbase, msc_irqma board_bind_eic_interrupt = &msc_bind_eic_interrupt; -for (; nirq >=0 ; nirq--, imp++) { +for (; nirq >0 ; nirq--, imp++) {int n = imp->im_irq;switch (imp->im_type) {
arch/mips/kvm/kvm_mips.c +4 -9
@@ -149,9 +149,7 @@ void kvm_mips_free_vcpus(struct kvm *kvm)if (kvm->arch.guest_pmap[i] !=KVM_INVALID_PAGE )kvm_mips_release_pfn_clean (kvm->arch.guest_pmap[i]); } - -if (kvm->arch.guest_pmap) -kfree (kvm->arch.guest_pmap); +kfree (kvm->arch.guest_pmap);kvm_for_each_vcpu (i, vcpu, kvm) {kvm_arch_vcpu_free (vcpu);
@@ -389,12 +387,9 @@ void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)kvm_mips_dump_stats (vcpu); -if (vcpu->arch.guest_ebase) -kfree (vcpu->arch.guest_ebase); - -if (vcpu->arch.kseg0_commpage) -kfree (vcpu->arch.kseg0_commpage); - +kfree (vcpu->arch.guest_ebase); +kfree (vcpu->arch.kseg0_commpage); +kfree (vcpu); }void kvm_arch_vcpu_destroy (struct kvm_vcpu *vcpu)
arch/powerpc/include/asm/switch_to.h +2 -0
@@ -84,6 +84,8 @@ static inline void clear_task_ebb(struct task_struct *t) {#ifdef CONFIG_PPC_BOOK3S_64 /* EBB perf events are not inherited, so clear all EBB state. */ + t->thread.ebbrr =0 ; + t->thread.ebbhr =0 ; t->thread.bescr =0 ; t->thread.mmcr2 =0 ; t->thread.mmcr0 =0 ;
arch/powerpc/include/asm/systbl.h +1 -1
@@ -190,7 +190,7 @@ SYSCALL_SPU(getcwd) SYSCALL_SPU(capget) SYSCALL_SPU(capset) COMPAT_SYS(sigaltstack) -COMPAT_SYS_SPU(sendfile) +SYSX_SPU(sys_sendfile64,compat_sys_sendfile,sys_sendfile) SYSCALL(ni_syscall) SYSCALL(ni_syscall) PPC_SYS(vfork)
arch/powerpc/include/uapi/asm/cputable.h +1 -0
@@ -41,5 +41,6 @@#define PPC_FEATURE2_EBB 0x10000000#define PPC_FEATURE2_ISEL 0x08000000#define PPC_FEATURE2_TAR 0x04000000 +#define PPC_FEATURE2_VEC_CRYPTO 0x02000000#endif /* _UAPI__ASM_POWERPC_CPUTABLE_H */
arch/powerpc/kernel/cputable.c +2 -1
@@ -109,7 +109,8 @@ extern void __restore_cpu_e6500(void); PPC_FEATURE_PSERIES_PERFMON_COMPAT)#define COMMON_USER2_POWER8 (PPC_FEATURE2_ARCH_2_07 | \ PPC_FEATURE2_HTM_COMP | PPC_FEATURE2_DSCR | \ - PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR) + PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | \ + PPC_FEATURE2_VEC_CRYPTO)#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\ PPC_FEATURE_TRUE_LE | \ PPC_FEATURE_HAS_ALTIVEC_COMP)
arch/powerpc/kernel/legacy_serial.c +9 -6
@@ -48,6 +48,9 @@ static struct of_device_id legacy_serial_parents[] __initdata = {static unsigned int legacy_serial_count;static int legacy_serial_console =-1 ; +static const upf_t legacy_port_flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST | +UPF_SHARE_IRQ |UPF_FIXED_PORT ; +static unsigned int tsi_serial_in (struct uart_port *p,int offset) {unsigned int tmp;
@@ -153,8 +156,6 @@ static int __init add_legacy_soc_port(struct device_node *np, {u64 addr;const __be32 *addrp; -upf_t flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST |UPF_SHARE_IRQ - |UPF_FIXED_PORT ;struct device_node *tsi =of_get_parent (np);/* We only support ports that have a clock frequency properly
@@ -185,9 +186,11 @@ static int __init add_legacy_soc_port(struct device_node *np,* IO port value. It will be fixed up later along with the irq */ if (tsi && !strcmp (tsi->type,"tsi-bridge" )) -return add_legacy_port (np,-1 ,UPIO_TSI , addr, addr,NO_IRQ , flags,0 ); +return add_legacy_port (np,-1 ,UPIO_TSI , addr, addr, +NO_IRQ , legacy_port_flags,0 );else -return add_legacy_port (np,-1 ,UPIO_MEM , addr, addr,NO_IRQ , flags,0 ); +return add_legacy_port (np,-1 ,UPIO_MEM , addr, addr, +NO_IRQ , legacy_port_flags,0 ); } static int __init add_legacy_isa_port(struct device_node *np,
@@ -233,7 +236,7 @@ static int __init add_legacy_isa_port(struct device_node *np,/* Add port, irq will be dealt with later */ return add_legacy_port (np, index,UPIO_PORT ,be32_to_cpu (reg[1 ]), - taddr,NO_IRQ ,UPF_BOOT_AUTOCONF ,0 ); + taddr,NO_IRQ , legacy_port_flags,0 ); }
@@ -306,7 +309,7 @@ static int __init add_legacy_pci_port(struct device_node *np,* IO port value. It will be fixed up later along with the irq */ return add_legacy_port (np, index, iotype, base, addr,NO_IRQ , - UPF_BOOT_AUTOCONF, np != pci_dev); + legacy_port_flags, np != pci_dev); }#endif
arch/powerpc/kernel/setup-common.c +9 -1
@@ -456,9 +456,17 @@ void __init smp_setup_cpu_maps(void) }for (j =0 ; j < nthreads && cpu < nr_cpu_ids; j++) { +bool avail; +DBG (" thread %d -> cpu %d (hard id %d)\n" , j, cpu,be32_to_cpu (intserv[j])); -set_cpu_present (cpu, true); + + avail =of_device_is_available (dn); +if (!avail) + avail = !of_property_match_string (dn, +"enable-method" ,"spin-table" ); + +set_cpu_present (cpu, avail);set_hard_smp_processor_id (cpu,be32_to_cpu (intserv[j]));set_cpu_possible (cpu, true); cpu++;
arch/powerpc/kernel/time.c +1 -1
@@ -511,7 +511,7 @@ void timer_interrupt(struct pt_regs * regs)may_hard_irq_enable (); -#if defined(CONFIG_PPC32 ) && defined(CONFIG_PMAC ) +#if defined(CONFIG_PPC32 ) && defined(CONFIG_PPC_PMAC )if (atomic_read (&ppc_n_lost_interrupts) !=0 )do_IRQ (regs);#endif
arch/powerpc/lib/sstep.c +1 -1
@@ -1470,7 +1470,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) regs->gpr[rd] =byterev_4 (val); goto ldst_done; -#ifdef CONFIG_PPC_CPU +#ifdef CONFIG_PPC_FPU case 535 :/* lfsx */ case 567 :/* lfsux */ if (!(regs->msr &MSR_FP ))
arch/powerpc/mm/hash_utils_64.c +20 -11
@@ -960,6 +960,22 @@ void hash_failure_debug(unsigned long ea, unsigned long access, trap, vsid, ssize, psize, lpsize, pte); } +static void check_paca_psize (unsigned long ea,struct mm_struct *mm, +int psize,bool user_region) +{ +if (user_region) { +if (psize !=get_paca_psize (ea)) { +get_paca ()->context = mm->context; +slb_flush_and_rebolt (); + } + }else if (get_paca ()->vmalloc_sllp != + mmu_psize_defs[mmu_vmalloc_psize].sllp) { +get_paca ()->vmalloc_sllp = + mmu_psize_defs[mmu_vmalloc_psize].sllp; +slb_vmalloc_update (); + } +} +/* Result code is: * 0 - handled * 1 - normal page fault
@@ -1081,6 +1097,8 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap) WARN_ON(1); }#endif +check_paca_psize (ea, mm, psize, user_region); + goto bail; }
@@ -1121,17 +1139,8 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap) #endif } } -if (user_region) { -if (psize !=get_paca_psize (ea)) { -get_paca ()->context = mm->context; -slb_flush_and_rebolt (); - } - }else if (get_paca ()->vmalloc_sllp != - mmu_psize_defs[mmu_vmalloc_psize].sllp) { -get_paca ()->vmalloc_sllp = - mmu_psize_defs[mmu_vmalloc_psize].sllp; -slb_vmalloc_update (); - } + +check_paca_psize (ea, mm, psize, user_region);#endif /* CONFIG_PPC_64K_PAGES */ #ifdef CONFIG_PPC_HAS_HASH_64K
arch/powerpc/platforms/pseries/eeh_pseries.c +1 -0
@@ -464,6 +464,7 @@ static int pseries_eeh_get_state(struct eeh_pe *pe, int *state) }else { result =EEH_STATE_NOT_SUPPORT ; } +break ;default : result =EEH_STATE_NOT_SUPPORT ; }
arch/x86/include/asm/ptrace.h +16 -0
@@ -231,6 +231,22 @@ static inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs,#define ARCH_HAS_USER_SINGLE_STEP_INFO +/* +* When hitting ptrace_stop(), we cannot return using SYSRET because +* that does not restore the full CPU state, only a minimal set. The +* ptracer can change arbitrary register values, which is usually okay +* because the usual ptrace stops run off the signal delivery path which +* forces IRET; however, ptrace_event() stops happen in arbitrary places +* in the kernel and don't force IRET path. +* +* So force IRET path after a ptrace stop. +*/ +#define arch_ptrace_stop_needed (code, info) \ +({ \ + set_thread_flag(TIF_NOTIFY_RESUME); \ + false; \ +}) +struct user_desc ;extern int do_get_thread_area (struct task_struct *p,int idx,struct user_desc __user *info);
drivers/block/mtip32xx/mtip32xx.c +90 -33
176 lines not on this page · raw message
drivers/infiniband/core/user_mad.c +44 -31
185 lines not on this page · raw message
drivers/infiniband/hw/ipath/ipath_diag.c +4 -0
@@ -346,6 +346,10 @@ static ssize_t ipath_diagpkt_write(struct file *fp, ret = -EFAULT ; goto bail; } + dp.len = odp.len; + dp.unit = odp.unit; + dp.data = odp.data; + dp.pbc_wd =0 ; }else { ret = -EINVAL ; goto bail;
drivers/infiniband/hw/mlx5/cq.c +12 -1
@@ -32,6 +32,7 @@#include <linux/kref.h> #include <rdma/ib_umem.h> +#include <rdma/ib_user_verbs.h> #include "mlx5_ib.h" #include "user.h"
@@ -540,14 +541,24 @@ static int create_cq_user(struct mlx5_ib_dev *dev, struct ib_udata *udata, int *cqe_size, int *index, int *inlen) { struct mlx5_ib_create_cq ucmd; +size_t ucmdlen;int page_shift;int npages;int ncont;int err; -if (ib_copy_from_udata (&ucmd, udata,sizeof (ucmd))) + ucmdlen = + (udata->inlen -sizeof (struct ib_uverbs_cmd_hdr ) < +sizeof (ucmd)) ? (sizeof (ucmd) - +sizeof (ucmd.reserved)) :sizeof (ucmd); + +if (ib_copy_from_udata (&ucmd, udata, ucmdlen))return -EFAULT ; +if (ucmdlen ==sizeof (ucmd) && + ucmd.reserved !=0 ) +return -EINVAL ; +if (ucmd.cqe_size !=64 && ucmd.cqe_size !=128 )return -EINVAL ;
drivers/infiniband/hw/mlx5/srq.c +13 -1
@@ -35,6 +35,7 @@#include <linux/mlx5/srq.h> #include <linux/slab.h> #include <rdma/ib_umem.h> +#include <rdma/ib_user_verbs.h> #include "mlx5_ib.h" #include "user.h"
@@ -78,16 +79,27 @@ static int create_srq_user(struct ib_pd *pd, struct mlx5_ib_srq *srq, {struct mlx5_ib_dev *dev =to_mdev (pd->device);struct mlx5_ib_create_srq ucmd; +size_t ucmdlen;int err;int npages;int page_shift;int ncont;u32 offset; -if (ib_copy_from_udata (&ucmd, udata,sizeof (ucmd))) { + ucmdlen = + (udata->inlen -sizeof (struct ib_uverbs_cmd_hdr ) < +sizeof (ucmd)) ? (sizeof (ucmd) - +sizeof (ucmd.reserved)) :sizeof (ucmd); + +if (ib_copy_from_udata (&ucmd, udata, ucmdlen)) {mlx5_ib_dbg (dev,"failed copy udata\n" );return -EFAULT ; } + +if (ucmdlen ==sizeof (ucmd) && + ucmd.reserved !=0 ) +return -EINVAL ; + srq->wq_sig = !!(ucmd.flags &MLX5_SRQ_FLAG_SIGNATURE ); srq->umem = ib_umem_get(pd->uobject->context, ucmd.buf_addr, buf_size,
drivers/infiniband/hw/mlx5/user.h +2 -0
@@ -91,6 +91,7 @@ struct mlx5_ib_create_cq {__u64 buf_addr;__u64 db_addr;__u32 cqe_size; +__u32 reserved;/* explicit padding (optional on i386) */ };struct mlx5_ib_create_cq_resp {
@@ -109,6 +110,7 @@ struct mlx5_ib_create_srq {__u64 buf_addr;__u64 db_addr;__u32 flags; +__u32 reserved;/* explicit padding (optional on i386) */ };struct mlx5_ib_create_srq_resp {
drivers/infiniband/hw/qib/qib_mad.c +1 -1
@@ -1028,7 +1028,7 @@ static int set_pkeys(struct qib_devdata *dd, u8 port, u16 *pkeys) event.event =IB_EVENT_PKEY_CHANGE ; event.device = &dd->verbs_dev.ibdev; - event.element.port_num =1 ; + event.element.port_num = port;ib_dispatch_event (&event); }return 0 ;
drivers/infiniband/ulp/srp/ib_srp.c +6 -0
@@ -1576,6 +1576,12 @@ err_unmap: err_iu:srp_put_tx_iu (target, iu,SRP_IU_CMD ); +/* +* Avoid that the loops that iterate over the request ring can +* encounter a dangling SCSI command pointer. +*/ + req->scmnd =NULL ; +spin_lock_irqsave (&target->lock, flags);list_add (&req->list, &target->free_reqs);
drivers/input/mouse/elantech.c +21 -6
@@ -473,8 +473,15 @@ static void elantech_report_absolute_v3(struct psmouse *psmouse,input_report_key (dev,BTN_TOOL_FINGER , fingers ==1 );input_report_key (dev,BTN_TOOL_DOUBLETAP , fingers ==2 );input_report_key (dev,BTN_TOOL_TRIPLETAP , fingers ==3 ); -input_report_key (dev,BTN_LEFT , packet[0 ] &0x01 ); -input_report_key (dev,BTN_RIGHT , packet[0 ] &0x02 ); + +/* For clickpads map both buttons to BTN_LEFT */ +if (etd->fw_version &0x001000 ) { +input_report_key (dev,BTN_LEFT , packet[0 ] &0x03 ); + }else { +input_report_key (dev,BTN_LEFT , packet[0 ] &0x01 ); +input_report_key (dev,BTN_RIGHT , packet[0 ] &0x02 ); + } +input_report_abs (dev,ABS_PRESSURE , pres);input_report_abs (dev,ABS_TOOL_WIDTH , width);
@@ -484,10 +491,17 @@ static void elantech_report_absolute_v3(struct psmouse *psmouse,static void elantech_input_sync_v4 (struct psmouse *psmouse) {struct input_dev *dev = psmouse->dev; +struct elantech_data *etd = psmouse->private;unsigned char *packet = psmouse->packet; -input_report_key (dev,BTN_LEFT , packet[0 ] &0x01 ); -input_report_key (dev,BTN_RIGHT , packet[0 ] &0x02 ); +/* For clickpads map both buttons to BTN_LEFT */ +if (etd->fw_version &0x001000 ) { +input_report_key (dev,BTN_LEFT , packet[0 ] &0x03 ); + }else { +input_report_key (dev,BTN_LEFT , packet[0 ] &0x01 ); +input_report_key (dev,BTN_RIGHT , packet[0 ] &0x02 ); + } +input_mt_report_pointer_emulation (dev, true);input_sync (dev); }
@@ -835,7 +849,7 @@ static int elantech_set_absolute_mode(struct psmouse *psmouse)if (etd->set_hw_resolution) etd->reg_10 =0x0b ;else - etd->reg_10 =0x03 ; + etd->reg_10 =0x01 ;if (elantech_write_reg (psmouse,0x10 , etd->reg_10)) rc =-1 ;
@@ -1336,7 +1350,8 @@ static int elantech_reconnect(struct psmouse *psmouse) }/* -* Some hw_version 3 models go into error state when we try to set bit 3 of r10 +* Some hw_version 3 models go into error state when we try to set +* bit 3 and/or bit 1 of r10. */ static const struct dmi_system_id no_hw_res_dmi_table[] = { #if defined(CONFIG_DMI) && defined(CONFIG_X86)
drivers/input/mouse/synaptics.c +10 -9
@@ -347,15 +347,6 @@ static int synaptics_resolution(struct psmouse *psmouse)unsigned char resp[3 ];int i; -for (i =0 ; min_max_pnpid_table[i].pnp_ids; i++) -if (matches_pnp_id (psmouse, min_max_pnpid_table[i].pnp_ids)) { - priv->x_min = min_max_pnpid_table[i].x_min; - priv->x_max = min_max_pnpid_table[i].x_max; - priv->y_min = min_max_pnpid_table[i].y_min; - priv->y_max = min_max_pnpid_table[i].y_max; -return 0 ; - } -if (SYN_ID_MAJOR (priv->identity) <4 )return 0 ;
@@ -366,6 +357,16 @@ static int synaptics_resolution(struct psmouse *psmouse) } } +for (i =0 ; min_max_pnpid_table[i].pnp_ids; i++) { +if (matches_pnp_id (psmouse, min_max_pnpid_table[i].pnp_ids)) { + priv->x_min = min_max_pnpid_table[i].x_min; + priv->x_max = min_max_pnpid_table[i].x_max; + priv->y_min = min_max_pnpid_table[i].y_min; + priv->y_max = min_max_pnpid_table[i].y_max; +return 0 ; + } + } +if (SYN_EXT_CAP_REQUESTS (priv->capabilities) >=5 &&SYN_CAP_MAX_DIMENSIONS (priv->ext_cap_0c)) {if (synaptics_send_cmd (psmouse,SYN_QUE_EXT_MAX_COORDS , resp)) {
drivers/pci/pci.c +1 -1
@@ -4102,7 +4102,7 @@ int pci_set_vga_state(struct pci_dev *dev, bool decode,u16 cmd;int rc; -WARN_ON ((flags &PCI_VGA_STATE_CHANGE_DECODES ) & (command_bits & ~(PCI_COMMAND_IO |PCI_COMMAND_MEMORY ))); +WARN_ON ((flags &PCI_VGA_STATE_CHANGE_DECODES ) && (command_bits & ~(PCI_COMMAND_IO |PCI_COMMAND_MEMORY )));/* ARCH specific VGA enables */ rc =pci_set_vga_state_arch (dev, decode, command_bits, flags);
drivers/pci/quirks.c +1 -0
@@ -2949,6 +2949,7 @@ static void disable_igfx_irq(struct pci_dev *dev) }DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0102 , disable_igfx_irq);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x010a , disable_igfx_irq); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0152 , disable_igfx_irq);/* * PCI devices which are on Intel chips can skip the 10ms delay
drivers/target/iscsi/iscsi_target.c +1 -1
@@ -1290,7 +1290,7 @@ iscsit_check_dataout_hdr(struct iscsi_conn *conn, unsigned char *buf,if (cmd->data_direction !=DMA_TO_DEVICE ) {pr_err ("Command ITT: 0x%08x received DataOUT for a" " NON-WRITE command.\n" , cmd->init_task_tag); -return iscsit_reject_cmd (cmd,ISCSI_REASON_PROTOCOL_ERROR , buf); +return iscsit_dump_data_payload (conn, payload_length,1 ); } se_cmd = &cmd->se_cmd;iscsit_mod_dataout_timer (cmd);
drivers/target/iscsi/iscsi_target_login.c +7 -6
@@ -1196,7 +1196,7 @@ old_sess_out:static int __iscsi_target_login_thread (struct iscsi_np *np) {u8 *buffer, zero_tsih =0 ; -int ret =0 , rc, stop; +int ret =0 , rc;struct iscsi_conn *conn =NULL ;struct iscsi_login *login;struct iscsi_portal_group *tpg =NULL ;
@@ -1210,6 +1210,9 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)if (np->np_thread_state ==ISCSI_NP_THREAD_RESET ) { np->np_thread_state =ISCSI_NP_THREAD_ACTIVE ;complete (&np->np_restart_comp); + }else if (np->np_thread_state ==ISCSI_NP_THREAD_SHUTDOWN ) { +spin_unlock_bh (&np->np_thread_lock); + goto exit; }else { np->np_thread_state =ISCSI_NP_THREAD_ACTIVE ; }
@@ -1402,10 +1405,8 @@ old_sess_out: } out: - stop =kthread_should_stop (); -/* Wait for another socket.. */ -if (!stop) -return 1 ; +return 1 ; + exit:iscsi_stop_login_thread_timer (np);spin_lock_bh (&np->np_thread_lock);
@@ -1422,7 +1423,7 @@ int iscsi_target_login_thread(void *arg)allow_signal (SIGINT ); -while (!kthread_should_stop ()) { +while (1 ) { ret =__iscsi_target_login_thread (np);/* * We break and exit here unless another sock_accept() call
drivers/target/iscsi/iscsi_target_util.c +2 -0
@@ -1295,6 +1295,8 @@ int iscsit_tx_login_rsp(struct iscsi_conn *conn, u8 status_class, u8 status_deta login->login_failed =1 ;iscsit_collect_login_stats (conn, status_class, status_detail); +memset (&login->rsp[0 ],0 ,ISCSI_HDR_LEN ); + hdr = (struct iscsi_login_rsp *)&login->rsp[0 ]; hdr->opcode =ISCSI_OP_LOGIN_RSP ; hdr->status_class = status_class;
drivers/target/target_core_device.c +1 -0
@@ -616,6 +616,7 @@ void core_dev_unexport( dev->export_count--;spin_unlock (&hba->device_lock); + lun->lun_sep =NULL ; lun->lun_se_dev =NULL ; }
drivers/watchdog/ath79_wdt.c +10 -0
@@ -20,6 +20,7 @@#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt#include <linux/bitops.h> +#include <linux/delay.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/init.h>
@@ -91,6 +92,15 @@ static inline void ath79_wdt_keepalive(void)static inline void ath79_wdt_enable (void ) {ath79_wdt_keepalive (); + +/* +* Updating the TIMER register requires a few microseconds +* on the AR934x SoCs at least. Use a small delay to ensure +* that the TIMER register is updated within the hardware +* before enabling the watchdog. +*/ +udelay (2 ); +ath79_wdt_wr (WDOG_REG_CTRL ,WDOG_CTRL_ACTION_FCR );/* flush write */ ath79_wdt_rr (WDOG_REG_CTRL );
drivers/watchdog/kempld_wdt.c +1 -1
@@ -162,7 +162,7 @@ static int kempld_wdt_set_stage_timeout(struct kempld_wdt_data *wdt_data,kempld_get_mutex (pld); stage_cfg =kempld_read8 (pld,KEMPLD_WDT_STAGE_CFG (stage->id)); stage_cfg &= ~STAGE_CFG_PRESCALER_MASK ; - stage_cfg |=STAGE_CFG_SET_PRESCALER (prescaler); + stage_cfg |=STAGE_CFG_SET_PRESCALER (PRESCALER_21 );kempld_write8 (pld,KEMPLD_WDT_STAGE_CFG (stage->id), stage_cfg);kempld_write32 (pld,KEMPLD_WDT_STAGE_TIMEOUT (stage->id), stage_timeout);
drivers/watchdog/sp805_wdt.c +1 -3
@@ -60,7 +60,6 @@* @adev: amba device structure of wdt * @status: current status of wdt * @load_val: load value to be set for current timeout -* @timeout: current programmed timeout */ struct sp805_wdt {struct watchdog_device wdd;
@@ -69,7 +68,6 @@ struct sp805_wdt {struct clk *clk;struct amba_device *adev;unsigned int load_val; -unsigned int timeout; };static bool nowayout =WATCHDOG_NOWAYOUT ;
@@ -99,7 +97,7 @@ static int wdt_setload(struct watchdog_device *wdd, unsigned int timeout)spin_lock (&wdt->lock); wdt->load_val = load;/* roundup timeout to closest positive integer value */ - wdt->timeout =div_u64 ((load +1 ) *2 + (rate /2 ), rate); + wdd->timeout =div_u64 ((load +1 ) *2 + (rate /2 ), rate);spin_unlock (&wdt->lock);return 0 ;
fs/nfs/inode.c +17 -9
@@ -1555,18 +1555,20 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) inode->i_version = fattr->change_attr; } }else if (server->caps &NFS_CAP_CHANGE_ATTR ) - invalid |= save_cache_validity; + nfsi->cache_validity |= save_cache_validity;if (fattr->valid &NFS_ATTR_FATTR_MTIME ) {memcpy (&inode->i_mtime, &fattr->mtime,sizeof (inode->i_mtime)); }else if (server->caps &NFS_CAP_MTIME ) - invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR + nfsi->cache_validity |= save_cache_validity & + (NFS_INO_INVALID_ATTR |NFS_INO_REVAL_FORCED );if (fattr->valid &NFS_ATTR_FATTR_CTIME ) {memcpy (&inode->i_ctime, &fattr->ctime,sizeof (inode->i_ctime)); }else if (server->caps &NFS_CAP_CTIME ) - invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR + nfsi->cache_validity |= save_cache_validity & + (NFS_INO_INVALID_ATTR |NFS_INO_REVAL_FORCED );/* Check if our cached file size is stale */
@@ -1588,7 +1590,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) (long long)new_isize); } }else - invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR + nfsi->cache_validity |= save_cache_validity & + (NFS_INO_INVALID_ATTR |NFS_INO_REVAL_PAGECACHE |NFS_INO_REVAL_FORCED );
@@ -1596,7 +1599,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)if (fattr->valid &NFS_ATTR_FATTR_ATIME )memcpy (&inode->i_atime, &fattr->atime,sizeof (inode->i_atime));else if (server->caps &NFS_CAP_ATIME ) - invalid |= save_cache_validity & (NFS_INO_INVALID_ATIME + nfsi->cache_validity |= save_cache_validity & + (NFS_INO_INVALID_ATIME |NFS_INO_REVAL_FORCED );if (fattr->valid &NFS_ATTR_FATTR_MODE ) {
@@ -1607,7 +1611,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) invalid |=NFS_INO_INVALID_ATTR |NFS_INO_INVALID_ACCESS |NFS_INO_INVALID_ACL ; } }else if (server->caps &NFS_CAP_MODE ) - invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR + nfsi->cache_validity |= save_cache_validity & + (NFS_INO_INVALID_ATTR |NFS_INO_INVALID_ACCESS |NFS_INO_INVALID_ACL |NFS_INO_REVAL_FORCED );
@@ -1618,7 +1623,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) inode->i_uid = fattr->uid; } }else if (server->caps &NFS_CAP_OWNER ) - invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR + nfsi->cache_validity |= save_cache_validity & + (NFS_INO_INVALID_ATTR |NFS_INO_INVALID_ACCESS |NFS_INO_INVALID_ACL |NFS_INO_REVAL_FORCED );
@@ -1629,7 +1635,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) inode->i_gid = fattr->gid; } }else if (server->caps &NFS_CAP_OWNER_GROUP ) - invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR + nfsi->cache_validity |= save_cache_validity & + (NFS_INO_INVALID_ATTR |NFS_INO_INVALID_ACCESS |NFS_INO_INVALID_ACL |NFS_INO_REVAL_FORCED );
@@ -1642,7 +1649,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)set_nlink (inode, fattr->nlink); } }else if (server->caps &NFS_CAP_NLINK ) - invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR + nfsi->cache_validity |= save_cache_validity & + (NFS_INO_INVALID_ATTR |NFS_INO_REVAL_FORCED );if (fattr->valid &NFS_ATTR_FATTR_SPACE_USED ) {
fs/nfs/nfs4filelayout.c +1 -1
@@ -1330,7 +1330,7 @@ filelayout_alloc_layout_hdr(struct inode *inode, gfp_t gfp_flags)struct nfs4_filelayout *flo; flo =kzalloc (sizeof (*flo), gfp_flags); -return &flo->generic_hdr; +return flo !=NULL ? &flo->generic_hdr :NULL ; } static void
fs/nfs/nfs4state.c +3 -3
@@ -1456,7 +1456,7 @@ static int nfs4_reclaim_open_state(struct nfs4_state_owner *sp, const struct nfs* server that doesn't support a grace period. */ spin_lock (&sp->so_lock); -write_seqcount_begin (&sp->so_reclaim_seqcount); +raw_write_seqcount_begin (&sp->so_reclaim_seqcount); restart:list_for_each_entry (state, &sp->so_states, open_states) {if (!test_and_clear_bit (ops->state_flag_bit, &state->flags))
@@ -1519,13 +1519,13 @@ restart:spin_lock (&sp->so_lock); goto restart; } -write_seqcount_end (&sp->so_reclaim_seqcount); +raw_write_seqcount_end (&sp->so_reclaim_seqcount);spin_unlock (&sp->so_lock);return 0 ; out_err:nfs4_put_open_state (state);spin_lock (&sp->so_lock); -write_seqcount_end (&sp->so_reclaim_seqcount); +raw_write_seqcount_end (&sp->so_reclaim_seqcount);spin_unlock (&sp->so_lock);return status; }
fs/nfs/super.c +1 -0
@@ -2246,6 +2246,7 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data) data->nfs_server.addrlen = nfss->nfs_client->cl_addrlen; data->version = nfsvers; data->minorversion = nfss->nfs_client->cl_minorversion; + data->net = current->nsproxy->net_ns;memcpy (&data->nfs_server.address, &nfss->nfs_client->cl_addr, data->nfs_server.addrlen);
fs/nfs/write.c +3 -1
@@ -913,12 +913,14 @@ static bool nfs_write_pageuptodate(struct page *page, struct inode *inode)if (nfs_have_delegated_attributes (inode)) goto out; -if (nfsi->cache_validity & (NFS_INO_INVALID_DATA |NFS_INO_REVAL_PAGECACHE )) +if (nfsi->cache_validity &NFS_INO_REVAL_PAGECACHE )return false;smp_rmb ();if (test_bit (NFS_INO_INVALIDATING , &nfsi->flags))return false; out: +if (nfsi->cache_validity &NFS_INO_INVALID_DATA ) +return false;return PageUptodate (page) !=0 ; }
fs/nfsd/nfs4state.c +1 -1
@@ -3723,7 +3723,7 @@ nfsd4_free_lock_stateid(struct nfs4_ol_stateid *stp)* correspondance, and we have to delete the lockowner when we * delete the lock stateid: */ -unhash_lockowner (lo); +release_lockowner (lo);return nfs_ok; }
fs/nfsd/nfs4xdr.c +2 -2
@@ -2096,8 +2096,8 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, err =vfs_getattr (&path, &stat);if (err) goto out_nfserr; -if ((bmval0 & (FATTR4_WORD0_FILES_FREE |FATTR4_WORD0_FILES_TOTAL | -FATTR4_WORD0_MAXNAME )) || +if ((bmval0 & (FATTR4_WORD0_FILES_AVAIL |FATTR4_WORD0_FILES_FREE | +FATTR4_WORD0_FILES_TOTAL |FATTR4_WORD0_MAXNAME )) || (bmval1 & (FATTR4_WORD1_SPACE_AVAIL |FATTR4_WORD1_SPACE_FREE |FATTR4_WORD1_SPACE_TOTAL ))) { err =vfs_statfs (&path, &statfs);
fs/reiserfs/inode.c +7 -1
@@ -3220,8 +3220,14 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr) attr->ia_size != i_size_read(inode)) { error =inode_newsize_ok (inode, attr->ia_size);if (!error) { +/* +* Could race against reiserfs_file_release +* if called from NFS, so take tailpack mutex. +*/ +mutex_lock (&REISERFS_I (inode)->tailpack);truncate_setsize (inode, attr->ia_size); -reiserfs_vfs_truncate_file (inode); +reiserfs_truncate_file (inode,1 ); +mutex_unlock (&REISERFS_I (inode)->tailpack); } }
fs/ubifs/file.c +1 -2
@@ -1525,8 +1525,7 @@ static int ubifs_vm_page_mkwrite(struct vm_area_struct *vma, }wait_for_stable_page (page); -unlock_page (page); -return 0 ; +return VM_FAULT_LOCKED ; out_unlock:unlock_page (page);
fs/ubifs/shrinker.c +0 -1
@@ -128,7 +128,6 @@ static int shrink_tnc(struct ubifs_info *c, int nr, int age, int *contention) freed =ubifs_destroy_tnc_subtree (znode);atomic_long_sub (freed, &ubifs_clean_zn_cnt);atomic_long_sub (freed, &c->clean_zn_cnt); -ubifs_assert (atomic_long_read (&c->clean_zn_cnt) >=0 ); total_freed += freed; znode = zprev; }
fs/xfs/xfs_mount.c +17 -6
@@ -320,8 +320,19 @@ reread:/* * Initialize the mount structure from the superblock. */ -xfs_sb_from_disk (&mp->m_sb,XFS_BUF_TO_SBP (bp)); -xfs_sb_quota_from_disk (&mp->m_sb); +xfs_sb_from_disk (sbp,XFS_BUF_TO_SBP (bp)); +xfs_sb_quota_from_disk (sbp); + +/* +* If we haven't validated the superblock, do so now before we try +* to check the sector size and reread the superblock appropriately. +*/ +if (sbp->sb_magicnum !=XFS_SB_MAGIC ) { +if (loud) +xfs_warn (mp,"Invalid superblock magic number" ); + error =EINVAL ; + goto release_buf; + }/* * We must be able to do sector-sized and sector-aligned IO.
@@ -334,11 +345,11 @@ reread: goto release_buf; } -/* -* Re-read the superblock so the buffer is correctly sized, -* and properly verified. -*/ if (buf_ops ==NULL ) { +/* +* Re-read the superblock so the buffer is correctly sized, +* and properly verified. +*/ xfs_buf_relse (bp); sector_size = sbp->sb_sectsize; buf_ops = loud ? &xfs_sb_buf_ops : &xfs_sb_quiet_buf_ops;
include/linux/ptrace.h +3 -0
@@ -334,6 +334,9 @@ static inline void user_single_step_siginfo(struct task_struct *tsk,* calling arch_ptrace_stop() when it would be superfluous. For example, * if the thread has not been back to user mode since the last stop, the * thread state might indicate that nothing needs to be done. +* +* This is guaranteed to be invoked once before a task stops for ptrace and +* may include arch-specific operations necessary prior to a ptrace stop. */ #define arch_ptrace_stop_needed (code, info) (0)#endif
include/trace/syscall.h +15 -0
@@ -4,6 +4,7 @@#include <linux/tracepoint.h> #include <linux/unistd.h> #include <linux/ftrace_event.h> +#include <linux/thread_info.h> #include <asm/ptrace.h>
@@ -32,4 +33,18 @@ struct syscall_metadata { struct ftrace_event_call *exit_event; }; +#if defined(CONFIG_TRACEPOINTS ) && defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS ) +static inline void syscall_tracepoint_update (struct task_struct *p) +{ +if (test_thread_flag (TIF_SYSCALL_TRACEPOINT )) +set_tsk_thread_flag (p,TIF_SYSCALL_TRACEPOINT ); +else +clear_tsk_thread_flag (p,TIF_SYSCALL_TRACEPOINT ); +} +#else +static inline void syscall_tracepoint_update (struct task_struct *p) +{ +} +#endif +#endif /* _TRACE_SYSCALL_H */
kernel/fork.c +2 -0
@@ -1484,7 +1484,9 @@ static struct task_struct *copy_process(unsigned long clone_flags, total_forks++;spin_unlock (¤t->sighand->siglock); +syscall_tracepoint_update (p);write_unlock_irq (&tasklist_lock); +proc_fork_connector (p);cgroup_post_fork (p);if (clone_flags &CLONE_THREAD )
kernel/trace/trace.c +7 -6
@@ -1449,12 +1449,12 @@ static void tracing_stop_tr(struct trace_array *tr)void trace_stop_cmdline_recording (void ); -static void trace_save_cmdline (struct task_struct *tsk) +static int trace_save_cmdline (struct task_struct *tsk) {unsigned pid, idx;if (!tsk->pid ||unlikely (tsk->pid >PID_MAX_DEFAULT )) -return ; +return 0 ;/* * It's not the end of the world if we don't get
@@ -1463,7 +1463,7 @@ static void trace_save_cmdline(struct task_struct *tsk)* so if we miss here, then better luck next time. */ if (!arch_spin_trylock (&trace_cmdline_lock)) -return ; +return 0 ; idx = map_pid_to_cmdline[tsk->pid];if (idx ==NO_CMDLINE_MAP ) {
@@ -1488,6 +1488,8 @@ static void trace_save_cmdline(struct task_struct *tsk)memcpy (&saved_cmdlines[idx], tsk->comm,TASK_COMM_LEN );arch_spin_unlock (&trace_cmdline_lock); + +return 1 ; }void trace_find_cmdline (int pid,char comm[])
@@ -1529,9 +1531,8 @@ void tracing_record_cmdline(struct task_struct *tsk)if (!__this_cpu_read (trace_cmdline_save))return ; -__this_cpu_write (trace_cmdline_save, false); - -trace_save_cmdline (tsk); +if (trace_save_cmdline (tsk)) +__this_cpu_write (trace_cmdline_save, false); }void
kernel/watchdog.c +0 -2
@@ -524,10 +524,8 @@ static void update_timers_all_cpus(void)int cpu;get_online_cpus (); -preempt_disable ();for_each_online_cpu (cpu)update_timers (cpu); -preempt_enable ();put_online_cpus (); }
lib/lz4/lz4_decompress.c +5 -1
@@ -192,6 +192,8 @@ static int lz4_uncompress_unknownoutputsize(const char *source, char *dest,int s =255 ;while ((ip < iend) && (s ==255 )) { s = *ip++; +if (unlikely (length > (size_t )(length + s))) + goto _output_error; length += s; } }
@@ -232,6 +234,8 @@ static int lz4_uncompress_unknownoutputsize(const char *source, char *dest,if (length ==ML_MASK ) {while (ip < iend) {int s = *ip++; +if (unlikely (length > (size_t )(length + s))) + goto _output_error; length += s;if (s ==255 )continue ;
@@ -284,7 +288,7 @@ static int lz4_uncompress_unknownoutputsize(const char *source, char *dest,/* write overflow error detected */ _output_error: -return (int ) (-(((char *) ip) - source)); +return -1 ; } int lz4_decompress(const unsigned char *src, size_t *src_len,
net/netfilter/ipvs/ip_vs_core.c +10 -5
@@ -1392,15 +1392,19 @@ ip_vs_in_icmp(struct sk_buff *skb, int *related, unsigned int hooknum)if (ipip) {__be32 info = ic->un.gateway; +__u8 type = ic->type; +__u8 code = ic->code;/* Update the MTU */ if (ic->type ==ICMP_DEST_UNREACH && ic->code ==ICMP_FRAG_NEEDED ) {struct ip_vs_dest *dest = cp->dest;u32 mtu =ntohs (ic->un.frag.mtu); +__be16 frag_off = cih->frag_off;/* Strip outer IP and ICMP, go to IPIP header */ -__skb_pull (skb, ihl +sizeof (_icmph)); +if (pskb_pull (skb, ihl +sizeof (_icmph)) ==NULL ) + goto ignore_ipip; offset2 -= ihl +sizeof (_icmph);skb_reset_network_header (skb); IP_VS_DBG(12, "ICMP for IPIP %pI4->%pI4: mtu=%u\n",
@@ -1408,7 +1412,7 @@ ip_vs_in_icmp(struct sk_buff *skb, int *related, unsigned int hooknum)ipv4_update_pmtu (skb,dev_net (skb->dev), mtu,0 ,0 ,0 ,0 );/* Client uses PMTUD? */ -if (!(cih->frag_off &htons (IP_DF ))) +if (!(frag_off &htons (IP_DF ))) goto ignore_ipip;/* Prefer the resulting PMTU */ if (dest) {
@@ -1427,12 +1431,13 @@ ip_vs_in_icmp(struct sk_buff *skb, int *related, unsigned int hooknum)/* Strip outer IP, ICMP and IPIP, go to IP header of * original request. */ -__skb_pull (skb, offset2); +if (pskb_pull (skb, offset2) ==NULL ) + goto ignore_ipip;skb_reset_network_header (skb);IP_VS_DBG (12 ,"Sending ICMP for %pI4->%pI4: t=%u, c=%u, i=%u\n" , &ip_hdr (skb)->saddr, &ip_hdr (skb)->daddr, - ic->type, ic->code,ntohl (info)); -icmp_send (skb, ic->type, ic->code, info); + type, code,ntohl (info)); +icmp_send (skb, type, code, info);/* ICMP can be shorter but anyways, account it */ ip_vs_out_stats (cp, skb);
net/sunrpc/svc_xprt.c +2 -0
@@ -730,6 +730,8 @@ static int svc_handle_xprt(struct svc_rqst *rqstp, struct svc_xprt *xprt) newxpt = xprt->xpt_ops->xpo_accept (xprt);if (newxpt)svc_add_new_temp_xprt (serv, newxpt); +else +module_put (xprt->xpt_class->xcl_owner); }else if (xprt->xpt_ops->xpo_has_wspace (xprt)) {/* XPT_DATA|XPT_DEFERRED case: */ dprintk("svc: server %p, pool %u, transport %p, inuse=%d\n",
scripts/recordmcount.h +2 -2
@@ -163,11 +163,11 @@ static int mcount_adjust = 0;static int MIPS_is_fake_mcount (Elf_Rel const *rp) { -static Elf_Addr old_r_offset; +static Elf_Addr old_r_offset = ~(Elf_Addr )0 ;Elf_Addr current_r_offset =_w (rp->r_offset);int is_fake; - is_fake = old_r_offset && + is_fake = (old_r_offset != ~(Elf_Addr )0 ) && (current_r_offset - old_r_offset ==MIPS_FAKEMCOUNT_OFFSET ); old_r_offset = current_r_offset;
sound/pci/hda/patch_hdmi.c +1 -1
@@ -2165,7 +2165,7 @@ static int generic_hdmi_resume(struct hda_codec *codec)struct hdmi_spec *spec = codec->spec;int pin_idx; -generic_hdmi_init (codec); + codec->patch_ops.init (codec);snd_hda_codec_resume_amp (codec);snd_hda_codec_resume_cache (codec);
sound/usb/card.c +10 -3
@@ -304,6 +304,11 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif)static int snd_usb_audio_free (struct snd_usb_audio *chip) { +struct list_head *p, *n; + +list_for_each_safe (p, n, &chip->ep_list) +snd_usb_endpoint_free (p); +mutex_destroy (&chip->mutex);kfree (chip);return 0 ;
@@ -580,7 +585,7 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, struct snd_usb_audio *chip) {struct snd_card *card; -struct list_head *p, *n; +struct list_head *p;if (chip == (void *)-1L )return ;
@@ -593,14 +598,16 @@ static void snd_usb_audio_disconnect(struct usb_device *dev,mutex_lock (®ister_mutex); chip->num_interfaces--;if (chip->num_interfaces <=0 ) { +struct snd_usb_endpoint *ep; +snd_card_disconnect (card);/* release the pcm resources */ list_for_each (p, &chip->pcm_list) {snd_usb_stream_disconnect (p); }/* release the endpoint resources */ -list_for_each_safe (p, n, &chip->ep_list) { -snd_usb_endpoint_free (p); +list_for_each_entry (ep, &chip->ep_list, list) { +snd_usb_endpoint_release (ep); }/* release the midi resources */ list_for_each (p, &chip->midi_list) {
sound/usb/endpoint.c +14 -3
@@ -981,19 +981,30 @@ void snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep) }/** +* snd_usb_endpoint_release: Tear down an snd_usb_endpoint +* +* @ep: the endpoint to release +* +* This function does not care for the endpoint's use count but will tear +* down all the streaming URBs immediately. +*/ +void snd_usb_endpoint_release (struct snd_usb_endpoint *ep) +{ +release_urbs (ep,1 ); +} + +/** * snd_usb_endpoint_free: Free the resources of an snd_usb_endpoint * * @ep: the list header of the endpoint to free * -* This function does not care for the endpoint's use count but will tear -* down all the streaming URBs immediately and free all resources. +* This free all resources of the given ep. */ void snd_usb_endpoint_free (struct list_head *head) {struct snd_usb_endpoint *ep; ep = list_entry(head, struct snd_usb_endpoint, list); -release_urbs (ep,1 );kfree (ep); }
sound/usb/endpoint.h +1 -0
@@ -23,6 +23,7 @@ void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep);void snd_usb_endpoint_sync_pending_stop (struct snd_usb_endpoint *ep);int snd_usb_endpoint_activate (struct snd_usb_endpoint *ep);void snd_usb_endpoint_deactivate (struct snd_usb_endpoint *ep); +void snd_usb_endpoint_release (struct snd_usb_endpoint *ep);void snd_usb_endpoint_free (struct list_head *head);int snd_usb_endpoint_implicit_feedback_sink (struct snd_usb_endpoint *ep);