Linux 3.10.13
Greg KH
maintainerI'm announcing the release of the 3.10.13 kernel.
All users of the 3.10 kernel series must upgrade.
The updated 3.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.10.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/DocBook/media_api.tmpl | 4 Makefile | 2 arch/arm/boot/dts/at91rm9200.dtsi | 6 arch/arm/boot/dts/at91sam9260.dtsi | 8 - arch/arm/boot/dts/at91sam9263.dtsi | 8 - arch/arm/boot/dts/at91sam9g45.dtsi | 8 - arch/arm/boot/dts/at91sam9n12.dtsi | 8 - arch/arm/boot/dts/at91sam9x5.dtsi | 8 - arch/arm/boot/dts/sama5d3.dtsi | 4 arch/arm/boot/dts/sun4i-a10.dtsi | 4 arch/arm/boot/dts/sun5i-a13.dtsi | 4 arch/arm/kvm/coproc.c | 26 +++- arch/arm/kvm/coproc.h | 3 arch/arm/kvm/coproc_a15.c | 6 arch/arm/mach-versatile/include/mach/platform.h | 2 arch/arm/mach-versatile/pci.c | 47 ++++--- arch/arm/xen/enlighten.c | 5 arch/arm64/kernel/perf_event.c | 7 - arch/mips/ath79/clock.c | 2 arch/powerpc/kernel/align.c | 10 + arch/powerpc/kvm/book3s_xics.c | 1 arch/powerpc/platforms/pseries/setup.c | 31 +++-- arch/um/include/shared/os.h | 1 arch/um/kernel/Makefile | 2 arch/um/kernel/maccess.c | 24 +++ arch/um/os-Linux/process.c | 52 ++++++++ arch/x86/ia32/ia32_signal.c | 2 arch/x86/include/asm/checksum_32.h | 22 ++- arch/x86/include/asm/mce.h | 13 +- arch/x86/include/asm/mmu_context.h | 20 ++- arch/x86/kernel/amd_nb.c | 13 +- arch/x86/kernel/signal.c | 6 arch/x86/lib/csum-wrappers_64.c | 12 + crypto/api.c | 7 - drivers/acpi/acpi_lpss.c | 3 drivers/block/rbd.c | 14 +- drivers/clk/clk-wm831x.c | 2 drivers/cpuidle/coupled.c | 127 +++++++++++++++----- drivers/edac/amd64_edac.c | 9 + drivers/gpu/drm/drm_edid.c | 3 drivers/hid/hid-core.c | 17 ++ drivers/hid/hid-ids.h | 7 - drivers/hid/hid-input.c | 12 + drivers/hid/hid-ntrig.c | 3 drivers/hid/hid-picolcd_cir.c | 3 drivers/hid/hid-picolcd_core.c | 2 drivers/hid/hid-picolcd_fb.c | 6 drivers/hid/hid-pl.c | 10 + drivers/hid/hid-sensor-hub.c | 3 drivers/hid/hid-speedlink.c | 11 + drivers/hid/hidraw.c | 60 ++++----- drivers/hid/usbhid/hid-quirks.c | 2 drivers/input/mouse/bcm5974.c | 6 drivers/iommu/intel-iommu.c | 72 +++++------ drivers/leds/leds-wm831x-status.c | 4 drivers/media/common/siano/smsdvb-main.c | 3 drivers/media/dvb-frontends/mb86a20s.c | 16 +- drivers/media/platform/coda.c | 2 drivers/media/platform/exynos-gsc/gsc-core.c | 9 + drivers/media/platform/exynos-gsc/gsc-core.h | 1 drivers/media/platform/exynos-gsc/gsc-m2m.c | 1 drivers/media/platform/exynos4-is/media-dev.c | 2 drivers/media/platform/s5p-g2d/g2d.c | 1 drivers/media/usb/hdpvr/hdpvr-core.c | 11 - drivers/mmc/host/tmio_mmc_dma.c | 4 drivers/mtd/nand/nand_base.c | 8 - drivers/mtd/ubi/wl.c | 3 drivers/net/wireless/ath/ath9k/ar9003_phy.c | 4 drivers/net/wireless/ath/ath9k/ath9k.h | 5 drivers/net/wireless/ath/ath9k/recv.c | 17 ++ drivers/net/wireless/ath/ath9k/xmit.c | 1 drivers/net/wireless/brcm80211/brcmsmac/dma.c | 15 +- drivers/of/base.c | 1 drivers/pinctrl/pinctrl-at91.c | 4 drivers/scsi/mpt3sas/Makefile | 2 drivers/scsi/sd.c | 11 - drivers/staging/comedi/drivers/dt282x.c | 3 drivers/staging/iio/adc/mxs-lradc.c | 18 +- drivers/target/target_core_alua.c | 2 drivers/target/target_core_pr.c | 2 drivers/tty/tty_io.c | 3 drivers/usb/class/cdc-wdm.c | 13 +- drivers/usb/core/config.c | 3 drivers/usb/core/hub.c | 65 ++++------ drivers/usb/core/port.c | 13 -- drivers/usb/dwc3/gadget.c | 39 +++--- drivers/usb/gadget/uvc_queue.c | 6 drivers/usb/host/ehci-mxc.c | 2 drivers/usb/host/ohci-pci.c | 2 drivers/usb/host/xhci-plat.c | 2 drivers/usb/host/xhci.c | 29 ++++ drivers/usb/host/xhci.h | 1 drivers/usb/serial/mos7720.c | 6 drivers/xen/grant-table.c | 13 +- fs/btrfs/ioctl.c | 3 fs/ceph/ioctl.c | 4 fs/cifs/connect.c | 2 fs/cifs/smb2misc.c | 148 ++++++++++++------------ fs/ext4/inode.c | 109 +++++++---------- fs/fuse/dir.c | 15 ++ fs/fuse/file.c | 11 + fs/fuse/fuse_i.h | 2 fs/fuse/inode.c | 3 fs/isofs/inode.c | 16 -- fs/ocfs2/extent_map.c | 1 fs/proc/root.c | 3 include/linux/compat.h | 7 + include/linux/hid.h | 4 include/linux/pci_ids.h | 2 include/linux/rculist.h | 5 include/linux/signal.h | 8 + include/linux/usb/hcd.h | 2 include/media/v4l2-ctrls.h | 1 kernel/events/uprobes.c | 4 kernel/fork.c | 7 - kernel/pid.c | 1 mm/huge_memory.c | 2 mm/memcontrol.c | 8 + net/ceph/osd_client.c | 2 net/ceph/osdmap.c | 2 net/core/scm.c | 2 sound/pci/hda/hda_intel.c | 1 sound/pci/hda/patch_hdmi.c | 52 ++++++-- sound/soc/codecs/mc13783.c | 4 sound/soc/codecs/wm8960.c | 6 125 files changed, 1013 insertions(+), 521 deletions(-)
Al Viro (1):
Introduce [compat_]save_altstack_ex() to unbreak x86 SMAP
Alan Stern (4):
SCSI: sd: Fix potential out-of-bounds access
USB: OHCI: Allow runtime PM without system sleep
USB: fix build error when CONFIG_PM_SLEEP isn't enabled
USB: handle LPM errors during device suspend correctly
Alex Deucher (1):
drm/edid: add quirk for Medion MD30217PG
Alex Williamson (1):
intel-iommu: Fix leaks in pagetable freeing
Alexander Shiyan (1):
media: media: coda: Fix DT driver data pointer for i.MX27
Alexey Khoroshilov (1):
media: hdpvr: fix iteration over uninitialized lists in hdpvr_probe()
Anand Avati (1):
fuse: invalidate inode attributes on xattr modification
Andrzej Hajda (2):
media: DocBook: upgrade media_api DocBook version to 4.2
media: v4l2: added missing mutex.h include to v4l2-ctrls.h
Andy Lutomirski (1):
net: Check the correct namespace when spoofing pid over SCM_RIGHTS
Anssi Hannula (1):
ALSA: hda - hdmi: Fallback to ALSA allocation when selecting CA
Anton Blanchard (1):
powerpc: Handle unaligned ldbrx/stdbrx
Aravind Gopalakrishnan (2):
pci_ids: Add PCI device ID functions 3 and 4 for newer F15h models. x86, amd_nb: Clarify F15h, model 30h GART and L3 support
Arnd Bergmann (1):
ARM: dts: add missing cpu #address-cell values
Arun Kumar K (1):
media: exynos-gsc: Register v4l2 device
Bjørn Mork (1):
media: siano: fix divide error on 0 counters
Boris BREZILLON (1):
pinctrl: at91: fix get_pullup/down function return
Borislav Petkov (1):
amd64_edac: Fix single-channel setups
Brian Norris (1):
mtd: nand: fix NAND_BUSWIDTH_AUTO for x16 devices
Bruno Prémont (1):
HID: picolcd: Prevent NULL pointer dereference on _remove()
Christoffer Dall (1):
ARM: KVM: Fix 64-bit coprocessor handling
Colin Cross (2):
cpuidle: coupled: abort idle if pokes are pending
cpuidle: coupled: fix race condition between pokes and safe state
Dan Carpenter (2):
staging: comedi: dt282x: dt282x_ai_insn_read() always fails
USB: mos7720: use GFP_ATOMIC under spinlock
Daniel Mack (1):
usb: ehci-mxc: check for pdata before dereferencing
Eric W. Biederman (2):
pidns: Fix hang in zap_pid_ns_processes by sending a potentially extra wakeup
proc: Restrict mounting the proc filesystem
Felipe Balbi (1):
usb: dwc3: gadget: don't request IRQs in atomic
Felix Fietkau (4):
ath9k: always clear ps filter bit on new assoc
ath9k: fix rx descriptor related race condition
ath9k: avoid accessing MRC registers on single-chain devices
MIPS: ath79: Fix ar933x watchdog clock
Gera Kazakov (1):
target: Fix >= v3.9+ regression in PR APTPL + ALUA metadata write-out
Grant Likely (1):
of: Fix missing memory initialization on FDT unflattening
Greg Kroah-Hartman (2):
SCSI: Allow MPT Fusion SAS 3.0 driver to be built into the kernel Linux 3.10.13
Greg Thelen (1):
memcg: fix multiple large threshold notifications
H. Peter Anvin (1):
x86, smap: Handle csum_partial_copy_*_user()
Hans de Goede (1):
usb: config->desc.bLength may not exceed amount of data returned by the device
Henrik Rydberg (1):
HID: Correct the USB IDs for the new Macbook Air 6
Herbert Xu (1):
crypto: api - Fix race condition in larval lookup
Jan Kara (2):
ext4: simplify truncation code in ext4_setattr()
isofs: Refuse RW mount of the filesystem instead of making it RO
Jeff Layton (1):
cifs: ensure that srv_mutex is held when dealing with ssocket pointer
Jie Liu (1):
ocfs2: fix the end cluster offset of FIEMAP
Jiri Kosina (1):
HID: battery: don't do DMA from stack
Johan Hovold (1):
USB: mos7720: fix big-endian control requests
John W. Linville (1):
brcmsmac: Fix WARNING caused by lack of calls to dma_mapping_error()
Josh Durgin (1):
rbd: fix I/O error propagation for reads
Kees Cook (6):
HID: pantherlord: validate output report details
HID: sensor-hub: validate feature report details
HID: validate HID report id size
HID: picolcd_core: validate output report details
HID: ntrig: validate feature report details
HID: check for NULL field when setting values
Lan Tianyu (1):
usb: don't check pm qos NO_POWER_OFF flag in usb_port_suspend()
Laurent Pinchart (1):
usb: gadget: uvc: Fix error handling in uvc_queue_buffer()
Libin (1):
mm/huge_memory.c: fix potential NULL pointer dereference
Lorenzo Pieralisi (2):
ARM: dts: at91: cpus/cpu node dts updates
ARM: dts: sunxi: cpus/cpu nodes dts updates
Manoj Chourasia (1):
HID: hidraw: correctly deallocate memory on device disconnect
Marek Vasut (2):
iio: mxs-lradc: Fix misuse of iio->trig
iio: mxs-lradc: Remove useless check in read_raw
Mark Brown (2):
leds: wm831x-status: Request a REG resource
clk: wm831x: Initialise wm831x pointer on init
Mauro Carvalho Chehab (1):
media: mb86a20s: Fix TS parallel mode
Maxim Patlasov (2):
fuse: postpone end_page_writeback() in fuse_writepage_locked()
fuse: hotfix truncate_pagecache() issue
Mika Westerberg (1):
ACPI / LPSS: don't crash if a device has no MMIO resources
Mike Dyer (1):
ASoC: wm8960: Fix PLL register writes
Miklos Szeredi (1):
fuse: readdir: check for slash in names
Oleg Nesterov (3):
tty: disassociate_ctty() sends the extra SIGCONT
uprobes: Fix utask->depth accounting in handle_trampoline()
pidns: fix vfork() after unshare(CLONE_NEWPID)
Oliver Neukum (1):
USB: cdc-wdm: fix race between interrupt handler and tasklet
Paul Mackerras (1):
KVM: PPC: Book3S: Fix compile error in XICS emulation
Pavel Shilovsky (2):
CIFS: Fix a memory leak when a lease break comes
CIFS: Fix missing lease break
Peter Maydell (3):
ARM: PCI: versatile: Fix map_irq function to match hardware
ARM: PCI: versatile: Fix PCI I/O
ARM: PCI: versatile: Fix SMAP register offsets
Richard Weinberger (2):
UBI: Fix PEB leak in wear_leveling_worker()
um: Implement probe_kernel_read()
Rik van Riel (1):
sched/x86: Optimize switch_mm() for multi-threaded workloads
Rob Herring (1):
ARM: xen: only set pm function ptrs for Xen guests
Roger Pau Monne (1):
xen-gnt: prevent adding duplicate gnt callbacks
Sachin Kamat (1):
media: s5p-g2d: Fix registration failure
Sage Weil (1):
libceph: use pg_num_mask instead of pgp_num_mask for pg.seed calc
Sarah Sharp (2):
xhci-plat: Don't enable legacy PCI interrupts.
usb: Don't fail port power resume on device disconnect.
Sergei Shtylyov (1):
mmc: tmio_mmc_dma: fix PIO fallback on SDHI
Shawn Nematbakhsh (1):
usb: xhci: Disable runtime PM suspend for quirky controllers
Stefan Behrens (1):
Btrfs: don't allow the replace procedure on read only filesystems
Stefan Kriwanek (1):
HID: Fix Speedlink VAD Cezanne support for some devices
Steffen Trumtrar (1):
ASoC: mc13783: add spi errata fix
Sylwester Nawrocki (1):
media: exynos4-is: Fix entity unregistration on error path
Takashi Iwai (2):
ALSA: hda - Re-setup HDMI pin and audio infoframe on stream switches
ALSA: hda - Add Toshiba Satellite C870 to MSI blacklist
Tejun Heo (1):
rculist: list_first_or_null_rcu() should use list_entry_rcu()
Tony Luck (1):
x86/mce: Pay no attention to 'F' bit in MCACOD when parsing 'UC' errors
Vaidyanathan Srinivasan (1):
powerpc: Default arch idle could cede processor on pseries
Vasily Titskiy (1):
HID: usbhid: quirk for N-Trig DuoSense Touch Screen
Will Deacon (2):
arm64: perf: fix group validation when using enable_on_exec
arm64: perf: fix ARMv8 EVTYPE_MASK to include NSH bit
majianpeng (2):
libceph: unregister request in __map_request failed and nofail == false
ceph: Don't forget the 'up_read(&osdc->map_sem)' if met error.Greg KH
maintainerDocumentation/DocBook/media_api.tmpl +2 -2
@@ -1,6 +1,6 @@ <?xml version="1.0"?> -<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" - "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ <!ENTITY % media-entities SYSTEM "./media-entities.tmpl"> %media-entities; <!ENTITY media-indices SYSTEM "./media-indices.tmpl">
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 10 -SUBLEVEL = 12 +SUBLEVEL = 13 EXTRAVERSION = NAME = TOSSUG Baby Fish
arch/arm/boot/dts/at91rm9200.dtsi +5 -1
@@ -35,8 +35,12 @@ ssc2 = &ssc2; }; cpus { - cpu@0 { + #address-cells = <0>; + #size-cells = <0>; + + cpu { compatible = "arm,arm920t"; + device_type = "cpu"; }; };
arch/arm/boot/dts/at91sam9260.dtsi +6 -2
@@ -32,8 +32,12 @@ ssc0 = &ssc0; }; cpus { - cpu@0 { - compatible = "arm,arm926ejs"; + #address-cells = <0>; + #size-cells = <0>; + + cpu { + compatible = "arm,arm926ej-s"; + device_type = "cpu"; }; };
arch/arm/boot/dts/at91sam9263.dtsi +6 -2
@@ -29,8 +29,12 @@ ssc1 = &ssc1; }; cpus { - cpu@0 { - compatible = "arm,arm926ejs"; + #address-cells = <0>; + #size-cells = <0>; + + cpu { + compatible = "arm,arm926ej-s"; + device_type = "cpu"; }; };
arch/arm/boot/dts/at91sam9g45.dtsi +6 -2
@@ -35,8 +35,12 @@ ssc1 = &ssc1; }; cpus { - cpu@0 { - compatible = "arm,arm926ejs"; + #address-cells = <0>; + #size-cells = <0>; + + cpu { + compatible = "arm,arm926ej-s"; + device_type = "cpu"; }; };
arch/arm/boot/dts/at91sam9n12.dtsi +6 -2
@@ -31,8 +31,12 @@ ssc0 = &ssc0; }; cpus { - cpu@0 { - compatible = "arm,arm926ejs"; + #address-cells = <0>; + #size-cells = <0>; + + cpu { + compatible = "arm,arm926ej-s"; + device_type = "cpu"; }; };
arch/arm/boot/dts/at91sam9x5.dtsi +6 -2
@@ -33,8 +33,12 @@ ssc0 = &ssc0; }; cpus { - cpu@0 { - compatible = "arm,arm926ejs"; + #address-cells = <0>; + #size-cells = <0>; + + cpu { + compatible = "arm,arm926ej-s"; + device_type = "cpu"; }; };
arch/arm/boot/dts/sama5d3.dtsi +4 -0
@@ -35,8 +35,12 @@ ssc1 = &ssc1; }; cpus { + #address-cells = <1>; + #size-cells = <0>; cpu@0 { + device_type = "cpu"; compatible = "arm,cortex-a5"; + reg = <0x0>; }; };
arch/arm/boot/dts/sun4i-a10.dtsi +4 -0
@@ -16,8 +16,12 @@ interrupt-parent = <&intc>; cpus { + #address-cells = <1>; + #size-cells = <0>; cpu@0 { + device_type = "cpu"; compatible = "arm,cortex-a8"; + reg = <0x0>; }; };
arch/arm/boot/dts/sun5i-a13.dtsi +4 -0
@@ -17,8 +17,12 @@ interrupt-parent = <&intc>; cpus { + #address-cells = <1>; + #size-cells = <0>; cpu@0 { + device_type = "cpu"; compatible = "arm,cortex-a8"; + reg = <0x0>; }; };
arch/arm/kvm/coproc.c +19 -7
@@ -146,7 +146,11 @@ static bool pm_fake(struct kvm_vcpu *vcpu,#define access_pmintenclr pm_fake/* Architected CP15 registers. -* Important: Must be sorted ascending by CRn, CRM, Op1, Op2 +* CRn denotes the primary register number, but is copied to the CRm in the +* user space API for 64-bit register access in line with the terminology used +* in the ARM ARM. +* Important: Must be sorted ascending by CRn, CRM, Op1, Op2 and with 64-bit +* registers preceding 32-bit ones. */ static const struct coproc_reg cp15_regs[] = {/* CSSELR: swapped by interrupt.S. */
@@ -154,8 +158,8 @@ static const struct coproc_reg cp15_regs[] = { NULL, reset_unknown, c0_CSSELR },/* TTBR0/TTBR1: swapped by interrupt.S. */ - { CRm( 2), Op1( 0), is64, NULL, reset_unknown64, c2_TTBR0 }, - { CRm( 2), Op1( 1), is64, NULL, reset_unknown64, c2_TTBR1 }, + { CRm64( 2), Op1( 0), is64, NULL, reset_unknown64, c2_TTBR0 }, + { CRm64( 2), Op1( 1), is64, NULL, reset_unknown64, c2_TTBR1 },/* TTBCR: swapped by interrupt.S. */ { CRn( 2), CRm( 0), Op1( 0), Op2( 2), is32,
@@ -182,7 +186,7 @@ static const struct coproc_reg cp15_regs[] = { NULL, reset_unknown, c6_IFAR },/* PAR swapped by interrupt.S */ - { CRn( 7), Op1( 0), is64, NULL, reset_unknown64, c7_PAR }, + { CRm64( 7), Op1( 0), is64, NULL, reset_unknown64, c7_PAR },/* * DC{C,I,CI}SW operations:
@@ -399,12 +403,13 @@ static bool index_to_params(u64 id, struct coproc_params *params) | KVM_REG_ARM_OPC1_MASK))return false; params->is_64bit = true; - params->CRm = ((id &KVM_REG_ARM_CRM_MASK ) +/* CRm to CRn: see cp15_to_index for details */ + params->CRn = ((id &KVM_REG_ARM_CRM_MASK ) >>KVM_REG_ARM_CRM_SHIFT ); params->Op1 = ((id &KVM_REG_ARM_OPC1_MASK ) >>KVM_REG_ARM_OPC1_SHIFT ); params->Op2 =0 ; - params->CRn =0 ; + params->CRm =0 ;return true;default :return false;
@@ -898,7 +903,14 @@ static u64 cp15_to_index(const struct coproc_reg *reg)if (reg->is_64) { val |=KVM_REG_SIZE_U64 ; val |= (reg->Op1 <<KVM_REG_ARM_OPC1_SHIFT ); - val |= (reg->CRm <<KVM_REG_ARM_CRM_SHIFT ); +/* +* CRn always denotes the primary coproc. reg. nr. for the +* in-kernel representation, but the user space API uses the +* CRm for the encoding, because it is modelled after the +* MRRC/MCRR instructions: see the ARM ARM rev. c page +* B3-1445 +*/ + val |= (reg->CRn <<KVM_REG_ARM_CRM_SHIFT ); }else { val |=KVM_REG_SIZE_U32 ; val |= (reg->Op1 <<KVM_REG_ARM_OPC1_SHIFT );
arch/arm/kvm/coproc.h +3 -0
@@ -135,6 +135,8 @@ static inline int cmp_reg(const struct coproc_reg *i1,return -1 ;if (i1->CRn != i2->CRn)return i1->CRn - i2->CRn; +if (i1->is_64 != i2->is_64) +return i2->is_64 - i1->is_64;if (i1->CRm != i2->CRm)return i1->CRm - i2->CRm;if (i1->Op1 != i2->Op1)
@@ -145,6 +147,7 @@ static inline int cmp_reg(const struct coproc_reg *i1,#define CRn (_x) .CRn = _x#define CRm (_x) .CRm = _x +#define CRm64 (_x) .CRn = _x, .CRm = 0#define Op1 (_x) .Op1 = _x#define Op2 (_x) .Op2 = _x#define is64 .is_64 = true
arch/arm/kvm/coproc_a15.c +5 -1
@@ -114,7 +114,11 @@ static bool access_l2ectlr(struct kvm_vcpu *vcpu,/* * A15-specific CP15 registers. -* Important: Must be sorted ascending by CRn, CRM, Op1, Op2 +* CRn denotes the primary register number, but is copied to the CRm in the +* user space API for 64-bit register access in line with the terminology used +* in the ARM ARM. +* Important: Must be sorted ascending by CRn, CRM, Op1, Op2 and with 64-bit +* registers preceding 32-bit ones. */ static const struct coproc_reg a15_regs[] = {/* MPIDR: we use VMPIDR for guest access. */
arch/arm/mach-versatile/include/mach/platform.h +2 -0
@@ -231,12 +231,14 @@/* PCI space */ #define VERSATILE_PCI_BASE 0x41000000/* PCI Interface */ #define VERSATILE_PCI_CFG_BASE 0x42000000 +#define VERSATILE_PCI_IO_BASE 0x43000000#define VERSATILE_PCI_MEM_BASE0 0x44000000#define VERSATILE_PCI_MEM_BASE1 0x50000000#define VERSATILE_PCI_MEM_BASE2 0x60000000/* Sizes of above maps */ #define VERSATILE_PCI_BASE_SIZE 0x01000000#define VERSATILE_PCI_CFG_BASE_SIZE 0x02000000 +#define VERSATILE_PCI_IO_BASE_SIZE 0x01000000#define VERSATILE_PCI_MEM_BASE0_SIZE 0x0c000000/* 32Mb */ #define VERSATILE_PCI_MEM_BASE1_SIZE 0x10000000/* 256Mb */ #define VERSATILE_PCI_MEM_BASE2_SIZE 0x10000000/* 256Mb */
arch/arm/mach-versatile/pci.c +30 -17
97 lines not on this page · raw message
arch/arm/xen/enlighten.c +4 -1
@@ -273,12 +273,15 @@ core_initcall(xen_guest_init);static int __init xen_pm_init (void ) { +if (!xen_domain ()) +return -ENODEV ; + pm_power_off = xen_power_off; arm_pm_restart = xen_restart;return 0 ; } -subsys_initcall (xen_pm_init); +late_initcall (xen_pm_init);static irqreturn_t xen_arm_callback (int irq,void *arg) {
arch/arm64/kernel/perf_event.c +5 -2
@@ -325,7 +325,10 @@ validate_event(struct pmu_hw_events *hw_events,if (is_software_event (event))return 1 ; -if (event->pmu != leader_pmu || event->state <=PERF_EVENT_STATE_OFF ) +if (event->pmu != leader_pmu || event->state <PERF_EVENT_STATE_OFF ) +return 1 ; + +if (event->state ==PERF_EVENT_STATE_OFF && !event->attr.enable_on_exec)return 1 ;return armpmu->get_event_idx (hw_events, &fake_event) >=0 ;
@@ -781,7 +784,7 @@ static const unsigned armv8_pmuv3_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]/* * PMXEVTYPER: Event selection reg */ -#define ARMV8_EVTYPE_MASK 0xc00000ff/* Mask for writable bits */ +#define ARMV8_EVTYPE_MASK 0xc80000ff/* Mask for writable bits */ #define ARMV8_EVTYPE_EVENT 0xff/* Mask for EVENT bits */ /*
arch/mips/ath79/clock.c +1 -1
@@ -164,7 +164,7 @@ static void __init ar933x_clocks_init(void) ath79_ahb_clk.rate = freq / t; } - ath79_wdt_clk.rate = ath79_ref_clk.rate; + ath79_wdt_clk.rate = ath79_ahb_clk.rate; ath79_uart_clk.rate = ath79_ref_clk.rate; }
arch/powerpc/kernel/align.c +10 -0
@@ -764,6 +764,16 @@ int fix_alignment(struct pt_regs *regs) nb = aligninfo[instr].len; flags = aligninfo[instr].flags; +/* ldbrx/stdbrx overlap lfs/stfs in the DSISR unfortunately */ +if (IS_XFORM (instruction) && ((instruction >>1 ) &0x3ff ) ==532 ) { + nb =8 ; + flags =LD +SW ; + }else if (IS_XFORM (instruction) && + ((instruction >>1 ) &0x3ff ) ==660 ) { + nb =8 ; + flags =ST +SW ; + } +/* Byteswap little endian loads and stores */ swiz =0 ;if (regs->msr &MSR_LE ) {
arch/powerpc/kvm/book3s_xics.c +1 -0
@@ -19,6 +19,7 @@#include <asm/hvcall.h> #include <asm/xics.h> #include <asm/debug.h> +#include <asm/time.h> #include <linux/debugfs.h> #include <linux/seq_file.h>
arch/powerpc/platforms/pseries/setup.c +21 -10
@@ -354,7 +354,7 @@ static int alloc_dispatch_log_kmem_cache(void) }early_initcall (alloc_dispatch_log_kmem_cache); -static void pSeries_idle (void ) +static void pseries_lpar_idle (void ) {/* This would call on the cpuidle framework, and the back-end pseries * driver to go to idle states
@@ -362,10 +362,22 @@ static void pSeries_idle(void)if (cpuidle_idle_call ()) {/* On error, execute default handler * to go into low thread priority and possibly -* low power mode. +* low power mode by cedeing processor to hypervisor */ -HMT_low (); -HMT_very_low (); + +/* Indicate to hypervisor that we are idle. */ +get_lppaca ()->idle =1 ; + +/* +* Yield the processor to the hypervisor. We return if +* an external interrupt occurs (which are driven prior +* to returning here) or if a prod occurs from another +* processor. When returning here, external interrupts +* are enabled. +*/ +cede_processor (); + +get_lppaca ()->idle =0 ; } }
@@ -456,15 +468,14 @@ static void __init pSeries_setup_arch(void)pSeries_nvram_init (); -if (firmware_has_feature (FW_FEATURE_SPLPAR )) { +if (firmware_has_feature (FW_FEATURE_LPAR )) {vpa_init (boot_cpuid); - ppc_md.power_save = pSeries_idle; - } - -if (firmware_has_feature (FW_FEATURE_LPAR )) + ppc_md.power_save = pseries_lpar_idle; ppc_md.enable_pmcs = pseries_lpar_enable_pmcs; -else + }else { +/* No special idle routine */ ppc_md.enable_pmcs = power4_enable_pmcs; + } ppc_md.pcibios_root_bridge_prepare = pseries_root_bridge_prepare;
arch/um/include/shared/os.h +1 -0
@@ -200,6 +200,7 @@ extern int os_unmap_memory(void *addr, int len);extern int os_drop_memory (void *addr,int length);extern int can_drop_memory (void );extern void os_flush_stdout (void ); +extern int os_mincore (void *addr,unsigned long len);/* execvp.c */ extern int execvp_noalloc (char *buf,const char *file,char *const argv[]);
arch/um/kernel/Makefile +1 -1
@@ -13,7 +13,7 @@ clean-files := obj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \ physmem.o process.o ptrace.o reboot.o sigio.o \ signal.o smp.o syscall.o sysrq.o time.o tlb.o trap.o \ - um_arch.o umid.o skas/ + um_arch.o umid.o maccess.o skas/ obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o obj-$(CONFIG_GPROF) += gprof_syms.o
arch/um/kernel/maccess.c new file +24 -0
@@ -0,0 +1,24 @@ +/* +* Copyright (C) 2013 Richard Weinberger <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#include <linux/uaccess.h> +#include <linux/kernel.h> +#include <os.h> + +long probe_kernel_read (void *dst,const void *src,size_t size) +{ +void *psrc = (void *)rounddown ((unsigned long )src,PAGE_SIZE ); + +if ((unsigned long )src <PAGE_SIZE || size <=0 ) +return -EFAULT ; + +if (os_mincore (psrc, size + src - psrc) <=0 ) +return -EFAULT ; + +return __probe_kernel_read (dst, src, size); +}
arch/um/os-Linux/process.c +52 -0
64 lines not on this page · raw message
arch/x86/ia32/ia32_signal.c +1 -1
@@ -459,7 +459,7 @@ int ia32_setup_rt_frame(int sig, struct ksignal *ksig,else put_user_ex (0 , &frame->uc.uc_flags);put_user_ex (0 , &frame->uc.uc_link); - err |=__compat_save_altstack (&frame->uc.uc_stack, regs->sp); +compat_save_altstack_ex (&frame->uc.uc_stack, regs->sp);if (ksig->ka.sa.sa_flags &SA_RESTORER ) restorer = ksig->ka.sa.sa_restorer;
arch/x86/include/asm/checksum_32.h +17 -5
@@ -49,9 +49,15 @@ static inline __wsum csum_partial_copy_from_user(const void __user *src, int len, __wsum sum, int *err_ptr) { + __wsum ret; +might_sleep (); -return csum_partial_copy_generic ((__force void *)src, dst, - len, sum, err_ptr,NULL ); +stac (); + ret =csum_partial_copy_generic ((__force void *)src, dst, + len, sum, err_ptr,NULL ); +clac (); + +return ret; }/*
@@ -176,10 +182,16 @@ static inline __wsum csum_and_copy_to_user(const void *src, int len, __wsum sum, int *err_ptr) { + __wsum ret; +might_sleep (); -if (access_ok (VERIFY_WRITE , dst, len)) -return csum_partial_copy_generic (src, (__force void *)dst, - len, sum,NULL , err_ptr); +if (access_ok (VERIFY_WRITE , dst, len)) { +stac (); + ret =csum_partial_copy_generic (src, (__force void *)dst, + len, sum,NULL , err_ptr); +clac (); +return ret; + }if (len) *err_ptr = -EFAULT ;
arch/x86/include/asm/mce.h +11 -2
@@ -32,11 +32,20 @@#define MCI_STATUS_PCC (1ULL<<57)/* processor context corrupt */ #define MCI_STATUS_S (1ULL<<56)/* Signaled machine check */ #define MCI_STATUS_AR (1ULL<<55)/* Action required */ -#define MCACOD 0xffff/* MCA Error Code */ + +/* +* Note that the full MCACOD field of IA32_MCi_STATUS MSR is +* bits 15:0. But bit 12 is the 'F' bit, defined for corrected +* errors to indicate that errors are being filtered by hardware. +* We should mask out bit 12 when looking for specific signatures +* of uncorrected errors - so the F bit is deliberately skipped +* in this #define. +*/ +#define MCACOD 0xefff/* MCA Error Code */ /* Architecturally defined codes from SDM Vol. 3B Chapter 15 */ #define MCACOD_SCRUB 0x00C0/* 0xC0-0xCF Memory Scrubbing */ -#define MCACOD_SCRUBMSK 0xfff0 +#define MCACOD_SCRUBMSK 0xeff0/* Skip bit 12 ('F' bit) */ #define MCACOD_L3WB 0x017A/* L3 Explicit Writeback */ #define MCACOD_DATA 0x0134/* Data Load */ #define MCACOD_INSTR 0x0150/* Instruction Fetch */
arch/x86/include/asm/mmu_context.h +13 -7
@@ -45,22 +45,28 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,/* Re-load page tables */ load_cr3 (next->pgd); -/* stop flush ipis for the previous mm */ +/* Stop flush ipis for the previous mm */ cpumask_clear_cpu (cpu,mm_cpumask (prev)); -/* -* load the LDT, if the LDT is different: -*/ +/* Load the LDT, if the LDT is different: */ if (unlikely (prev->context.ldt != next->context.ldt))load_LDT_nolock (&next->context); }#ifdef CONFIG_SMP - else { + else {this_cpu_write (cpu_tlbstate.state,TLBSTATE_OK );BUG_ON (this_cpu_read (cpu_tlbstate.active_mm) != next); -if (!cpumask_test_and_set_cpu (cpu,mm_cpumask (next))) { -/* We were in lazy tlb mode and leave_mm disabled +if (!cpumask_test_cpu (cpu,mm_cpumask (next))) { +/* +* On established mms, the mm_cpumask is only changed +* from irq context, from ptep_clear_flush() while in +* lazy tlb mode, and here. Irqs are blocked during +* schedule, protecting us from simultaneous changes. +*/ +cpumask_set_cpu (cpu,mm_cpumask (next)); +/* +* We were in lazy tlb mode and leave_mm disabled * tlb flush IPI delivery. We must reload CR3 * to make sure to use no freed page tables. */
arch/x86/kernel/amd_nb.c +11 -2
@@ -20,6 +20,7 @@ const struct pci_device_id amd_nb_misc_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M10H_F3) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) }, {} };
@@ -27,6 +28,7 @@ EXPORT_SYMBOL(amd_nb_misc_ids);static const struct pci_device_id amd_nb_link_ids[] = { {PCI_DEVICE (PCI_VENDOR_ID_AMD ,PCI_DEVICE_ID_AMD_15H_NB_F4 ) }, + {PCI_DEVICE (PCI_VENDOR_ID_AMD ,PCI_DEVICE_ID_AMD_15H_M30H_NB_F4 ) }, {PCI_DEVICE (PCI_VENDOR_ID_AMD ,PCI_DEVICE_ID_AMD_16H_NB_F4 ) }, {} };
@@ -81,13 +83,20 @@ int amd_cache_northbridges(void)next_northbridge (misc, amd_nb_misc_ids);node_to_amd_nb (i)->link = link =next_northbridge (link, amd_nb_link_ids); - } + } +/* GART present only on Fam15h upto model 0fh */ if (boot_cpu_data.x86 ==0xf || boot_cpu_data.x86 ==0x10 || - boot_cpu_data.x86 ==0x15 ) + (boot_cpu_data.x86 ==0x15 && boot_cpu_data.x86_model <0x10 )) amd_northbridges.flags |=AMD_NB_GART ;/* +* Check for L3 cache presence. +*/ +if (!cpuid_edx (0x80000006 )) +return 0 ; + +/* * Some CPU families support L3 Cache Index Disable. There are some * limitations because of E382 and E388 on family 0x10. */
arch/x86/kernel/signal.c +3 -3
@@ -364,7 +364,7 @@ static int __setup_rt_frame(int sig, struct ksignal *ksig,else put_user_ex (0 , &frame->uc.uc_flags);put_user_ex (0 , &frame->uc.uc_link); - err |=__save_altstack (&frame->uc.uc_stack, regs->sp); +save_altstack_ex (&frame->uc.uc_stack, regs->sp);/* Set up to return from userspace. */ restorer =VDSO32_SYMBOL (current->mm->context.vdso, rt_sigreturn);
@@ -429,7 +429,7 @@ static int __setup_rt_frame(int sig, struct ksignal *ksig,else put_user_ex (0 , &frame->uc.uc_flags);put_user_ex (0 , &frame->uc.uc_link); - err |=__save_altstack (&frame->uc.uc_stack, regs->sp); +save_altstack_ex (&frame->uc.uc_stack, regs->sp);/* Set up to return from userspace. If provided, use a stub already in userspace. */
@@ -496,7 +496,7 @@ static int x32_setup_rt_frame(struct ksignal *ksig,else put_user_ex (0 , &frame->uc.uc_flags);put_user_ex (0 , &frame->uc.uc_link); - err |=__compat_save_altstack (&frame->uc.uc_stack, regs->sp); +compat_save_altstack_ex (&frame->uc.uc_stack, regs->sp);put_user_ex (0 , &frame->uc.uc__pad0);if (ksig->ka.sa.sa_flags &SA_RESTORER ) {
arch/x86/lib/csum-wrappers_64.c +10 -2
@@ -6,6 +6,7 @@*/ #include <asm/checksum.h> #include <linux/module.h> +#include <asm/smap.h> /** * csum_partial_copy_from_user - Copy and checksum from user space.
@@ -52,8 +53,10 @@ csum_partial_copy_from_user(const void __user *src, void *dst, len -=2 ; } } +stac (); isum =csum_partial_copy_generic ((__force const void *)src, dst, len, isum, errp,NULL ); +clac ();if (unlikely (*errp)) goto out_err;
@@ -82,6 +85,8 @@ __wsum csum_partial_copy_to_user(const void *src, void __user *dst, int len, __wsum isum, int *errp) { + __wsum ret; +might_sleep ();if (unlikely (!access_ok (VERIFY_WRITE , dst, len))) {
@@ -105,8 +110,11 @@ csum_partial_copy_to_user(const void *src, void __user *dst, } *errp =0 ; -return csum_partial_copy_generic (src, (void __force *)dst, - len, isum,NULL , errp); +stac (); + ret =csum_partial_copy_generic (src, (void __force *)dst, + len, isum,NULL , errp); +clac (); +return ret; }EXPORT_SYMBOL (csum_partial_copy_to_user);
crypto/api.c +6 -1
@@ -34,6 +34,8 @@ EXPORT_SYMBOL_GPL(crypto_alg_sem);BLOCKING_NOTIFIER_HEAD (crypto_chain);EXPORT_SYMBOL_GPL (crypto_chain); +static struct crypto_alg *crypto_larval_wait (struct crypto_alg *alg); +struct crypto_alg *crypto_mod_get (struct crypto_alg *alg) {return try_module_get (alg->cra_module) ?crypto_alg_get (alg) :NULL ;
@@ -144,8 +146,11 @@ static struct crypto_alg *crypto_larval_add(const char *name, u32 type, }up_write (&crypto_alg_sem); -if (alg != &larval->alg) +if (alg != &larval->alg) {kfree (larval); +if (crypto_is_larval (alg)) + alg =crypto_larval_wait (alg); + }return alg; }
drivers/acpi/acpi_lpss.c +2 -1
@@ -155,12 +155,13 @@ static int acpi_lpss_create_device(struct acpi_device *adev, pdata->mmio_size =resource_size (&rentry->res); pdata->mmio_base =ioremap (rentry->res.start, pdata->mmio_size); - pdata->dev_desc = dev_desc;break ; }acpi_dev_free_resource_list (&resource_list); + pdata->dev_desc = dev_desc; +if (dev_desc->clk_required) { ret =register_device_clock (adev, pdata);if (ret) {
drivers/block/rbd.c +7 -7
@@ -1565,11 +1565,12 @@ rbd_img_obj_request_read_callback(struct rbd_obj_request *obj_request) obj_request, obj_request->img_request, obj_request->result, xferred, length);/* -* ENOENT means a hole in the image. We zero-fill the -* entire length of the request. A short read also implies -* zero-fill to the end of the request. Either way we -* update the xferred count to indicate the whole request -* was satisfied. +* ENOENT means a hole in the image. We zero-fill the entire +* length of the request. A short read also implies zero-fill +* to the end of the request. An error requires the whole +* length of the request to be reported finished with an error +* to the block layer. In each case we update the xferred +* count to indicate the whole request was satisfied. */ rbd_assert (obj_request->type !=OBJ_REQUEST_NODATA );if (obj_request->result == -ENOENT ) {
@@ -1578,14 +1579,13 @@ rbd_img_obj_request_read_callback(struct rbd_obj_request *obj_request)else zero_pages (obj_request->pages,0 , length); obj_request->result =0 ; - obj_request->xferred = length; }else if (xferred < length && !obj_request->result) {if (obj_request->type ==OBJ_REQUEST_BIO )zero_bio_chain (obj_request->bio_list, xferred);else zero_pages (obj_request->pages, xferred, length); - obj_request->xferred = length; } + obj_request->xferred = length;obj_request_done_set (obj_request); }
drivers/clk/clk-wm831x.c +2 -0
@@ -360,6 +360,8 @@ static int wm831x_clk_probe(struct platform_device *pdev)if (!clkdata)return -ENOMEM ; + clkdata->wm831x = wm831x; +/* XTAL_ENA can only be set via OTP/InstantConfig so just read once */ ret =wm831x_reg_read (wm831x,WM831X_CLOCK_CONTROL_2 );if (ret <0 ) {
drivers/cpuidle/coupled.c +96 -31
232 lines not on this page · raw message
drivers/edac/amd64_edac.c +8 -1
@@ -2470,8 +2470,15 @@ static int amd64_init_one_instance(struct pci_dev *F2) layers[0 ].size = pvt->csels[0 ].b_cnt; layers[0 ].is_virt_csrow = true; layers[1 ].type =EDAC_MC_LAYER_CHANNEL ; - layers[1 ].size = pvt->channel_count; + +/* +* Always allocate two channels since we can have setups with DIMMs on +* only one channel. Also, this simplifies handling later for the price +* of a couple of KBs tops. +*/ + layers[1 ].size =2 ; layers[1 ].is_virt_csrow = false; + mci =edac_mc_alloc (nid,ARRAY_SIZE (layers), layers,0 );if (!mci) goto err_siblings;
drivers/gpu/drm/drm_edid.c +3 -0
@@ -125,6 +125,9 @@ static struct edid_quirk {/* ViewSonic VA2026w */ { "VSC", 5020, EDID_QUIRK_FORCE_REDUCED_BLANKING }, + +/* Medion MD 30217 PG */ + { "MED", 0x7b8, EDID_QUIRK_PREFER_LARGE_75 }, };/*
drivers/hid/hid-core.c +13 -4
@@ -63,6 +63,8 @@ struct hid_report *hid_register_report(struct hid_device *device, unsigned type,struct hid_report_enum *report_enum = device->report_enum + type;struct hid_report *report; +if (id >=HID_MAX_IDS ) +return NULL ;if (report_enum->report_id_hash[id])return report_enum->report_id_hash[id];
@@ -404,8 +406,10 @@ static int hid_parser_global(struct hid_parser *parser, struct hid_item *item)case HID_GLOBAL_ITEM_TAG_REPORT_ID : parser->global.report_id =item_udata (item); -if (parser->global.report_id ==0 ) { -hid_err (parser->device,"report_id 0 is invalid\n" ); +if (parser->global.report_id ==0 || + parser->global.report_id >=HID_MAX_IDS ) { +hid_err (parser->device,"report_id %u is invalid\n" , + parser->global.report_id);return -1 ; }return 0 ;
@@ -575,7 +579,7 @@ static void hid_close_report(struct hid_device *device)for (i =0 ; i <HID_REPORT_TYPES ; i++) {struct hid_report_enum *report_enum = device->report_enum + i; -for (j =0 ; j <256 ; j++) { +for (j =0 ; j <HID_MAX_IDS ; j++) {struct hid_report *report = report_enum->report_id_hash[j];if (report)hid_free_report (report);
@@ -1152,7 +1156,12 @@ EXPORT_SYMBOL_GPL(hid_output_report);int hid_set_field (struct hid_field *field,unsigned offset,__s32 value) { -unsigned size = field->report_size; +unsigned size; + +if (!field) +return -1 ; + + size = field->report_size;hid_dump_input (field->report->device, field->usage + offset, value);
drivers/hid/hid-ids.h +4 -3
@@ -135,9 +135,9 @@#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI 0x0255#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO 0x0256 -#define USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI 0x0291 -#define USB_DEVICE_ID_APPLE_WELLSPRING8_ISO 0x0292 -#define USB_DEVICE_ID_APPLE_WELLSPRING8_JIS 0x0293 +#define USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI 0x0290 +#define USB_DEVICE_ID_APPLE_WELLSPRING8_ISO 0x0291 +#define USB_DEVICE_ID_APPLE_WELLSPRING8_JIS 0x0292#define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a#define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b#define USB_DEVICE_ID_APPLE_IRCONTROL 0x8240
@@ -646,6 +646,7 @@#define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_16 0x0012#define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_17 0x0013#define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18 0x0014 +#define USB_DEVICE_ID_NTRIG_DUOSENSE 0x1500#define USB_VENDOR_ID_ONTRAK 0x0a07#define USB_DEVICE_ID_ONTRAK_ADU100 0x0064
drivers/hid/hid-input.c +10 -2
@@ -340,7 +340,7 @@ static int hidinput_get_battery_property(struct power_supply *psy, { struct hid_device *dev = container_of(psy, struct hid_device, battery);int ret =0 ; -__u8 buf[2 ] = {}; +__u8 *buf;switch (prop) {case POWER_SUPPLY_PROP_PRESENT :
@@ -349,13 +349,20 @@ static int hidinput_get_battery_property(struct power_supply *psy,break ;case POWER_SUPPLY_PROP_CAPACITY : + + buf =kmalloc (2 *sizeof (__u8),GFP_KERNEL ); +if (!buf) { + ret = -ENOMEM ; +break ; + } ret = dev->hid_get_raw_report (dev, dev->battery_report_id, - buf,sizeof (buf), + buf,2 , dev->battery_report_type);if (ret !=2 ) {if (ret >=0 ) ret = -EINVAL ; +kfree (buf);break ; }
@@ -364,6 +371,7 @@ static int hidinput_get_battery_property(struct power_supply *psy, buf[1] <= dev->battery_max) val->intval = (100 * (buf[1 ] - dev->battery_min)) / (dev->battery_max - dev->battery_min); +kfree (buf);break ;case POWER_SUPPLY_PROP_MODEL_NAME :
drivers/hid/hid-ntrig.c +2 -1
@@ -115,7 +115,8 @@ static inline int ntrig_get_mode(struct hid_device *hdev)struct hid_report *report = hdev->report_enum[HID_FEATURE_REPORT ]. report_id_hash[0x0d ]; -if (!report) +if (!report || report->maxfield <1 || + report->field[0 ]->report_count <1 )return -EINVAL ;hid_hw_request (hdev, report,HID_REQ_GET_REPORT );
drivers/hid/hid-picolcd_cir.c +2 -1
@@ -145,6 +145,7 @@ void picolcd_exit_cir(struct picolcd_data *data)struct rc_dev *rdev = data->rc_dev; data->rc_dev =NULL ; -rc_unregister_device (rdev); +if (rdev) +rc_unregister_device (rdev); }
drivers/hid/hid-picolcd_core.c +1 -1
@@ -290,7 +290,7 @@ static ssize_t picolcd_operation_mode_store(struct device *dev, buf +=10 ; cnt -=10 ; } -if (!report) +if (!report || report->maxfield !=1 )return -EINVAL ;while (cnt >0 && (buf[cnt-1 ] =='\n' || buf[cnt-1 ] =='\r' ))
drivers/hid/hid-picolcd_fb.c +5 -1
@@ -593,10 +593,14 @@ err_nomem:void picolcd_exit_framebuffer (struct picolcd_data *data) {struct fb_info *info = data->fb_info; -struct picolcd_fb_data *fbdata = info->par; +struct picolcd_fb_data *fbdata;unsigned long flags; +if (!info) +return ; +device_remove_file (&data->hdev->dev, &dev_attr_fb_update_rate); + fbdata = info->par;/* disconnect framebuffer from HID dev */ spin_lock_irqsave (&fbdata->lock, flags);
drivers/hid/hid-pl.c +8 -2
@@ -132,8 +132,14 @@ static int plff_init(struct hid_device *hid) strong = &report->field[0 ]->value[2 ]; weak = &report->field[0 ]->value[3 ];debug ("detected single-field device" ); - }else if (report->maxfield >=4 && report->field[0 ]->maxusage ==1 && - report->field[0 ]->usage[0 ].hid == (HID_UP_LED |0x43 )) { + }else if (report->field[0 ]->maxusage ==1 && + report->field[0 ]->usage[0 ].hid == + (HID_UP_LED |0x43 ) && + report->maxfield >=4 && + report->field[0 ]->report_count >=1 && + report->field[1 ]->report_count >=1 && + report->field[2 ]->report_count >=1 && + report->field[3 ]->report_count >=1 ) { report->field[0 ]->value[0 ] =0x00 ; report->field[1 ]->value[0 ] =0x00 ; strong = &report->field[2 ]->value[0 ];
drivers/hid/hid-sensor-hub.c +2 -1
@@ -221,7 +221,8 @@ int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,mutex_lock (&data->mutex); report =sensor_hub_report (report_id, hsdev->hdev,HID_FEATURE_REPORT ); -if (!report || (field_index >= report->maxfield)) { +if (!report || (field_index >= report->maxfield) || + report->field[field_index]->report_count <1 ) { ret = -EINVAL ; goto done_proc; }
drivers/hid/hid-speedlink.c +8 -3
@@ -3,7 +3,7 @@* Fixes "jumpy" cursor and removes nonexistent keyboard LEDS from * the HID descriptor. * -* Copyright (c) 2011 Stefan Kriwanek <[email protected]> +* Copyright (c) 2011, 2013 Stefan Kriwanek <[email protected]> */ /*
@@ -46,8 +46,13 @@ static int speedlink_event(struct hid_device *hdev, struct hid_field *field, struct hid_usage *usage, __s32 value) {/* No other conditions due to usage_table. */ -/* Fix "jumpy" cursor (invalid events sent by device). */ -if (value ==256 ) + +/* This fixes the "jumpy" cursor occuring due to invalid events sent +* by the device. Some devices only send them with value==+256, others +* don't. However, catching abs(value)>=256 is restrictive enough not +* to interfere with devices that were bug-free (has been tested). +*/ +if (abs (value) >=256 )return 1 ;/* Drop useless distance 0 events (on button clicks etc.) as well */ if (value ==0 )
drivers/hid/hidraw.c +25 -35
96 lines not on this page · raw message
drivers/hid/usbhid/hid-quirks.c +2 -0
@@ -109,6 +109,8 @@ static const struct hid_blacklist { { USB_VENDOR_ID_SIGMA_MICRO, USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X, HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X, HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_DUOSENSE, HID_QUIRK_NO_INIT_REPORTS }, + { 0, 0 } };
drivers/input/mouse/bcm5974.c +3 -3
@@ -89,9 +89,9 @@#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO 0x025a#define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS 0x025b/* MacbookAir6,2 (unibody, June 2013) */ -#define USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI 0x0291 -#define USB_DEVICE_ID_APPLE_WELLSPRING8_ISO 0x0292 -#define USB_DEVICE_ID_APPLE_WELLSPRING8_JIS 0x0293 +#define USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI 0x0290 +#define USB_DEVICE_ID_APPLE_WELLSPRING8_ISO 0x0291 +#define USB_DEVICE_ID_APPLE_WELLSPRING8_JIS 0x0292#define BCM5974_DEVICE (prod) { \ .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
drivers/iommu/intel-iommu.c +35 -37
91 lines not on this page · raw message
drivers/leds/leds-wm831x-status.c +2 -2
@@ -230,9 +230,9 @@ static int wm831x_status_probe(struct platform_device *pdev)int id = pdev->id %ARRAY_SIZE (chip_pdata->status);int ret; - res =platform_get_resource (pdev,IORESOURCE_IO ,0 ); + res =platform_get_resource (pdev,IORESOURCE_REG ,0 );if (res ==NULL ) { -dev_err (&pdev->dev,"No I/O resource\n" ); +dev_err (&pdev->dev,"No register resource\n" ); ret = -EINVAL ; goto err; }
drivers/media/common/siano/smsdvb-main.c +2 -1
@@ -275,7 +275,8 @@ static void smsdvb_update_per_slices(struct smsdvb_client_t *client,/* Legacy PER/BER */ tmp = p->ets_packets *65535 ; -do_div (tmp, p->ts_packets + p->ets_packets); +if (p->ts_packets + p->ets_packets) +do_div (tmp, p->ts_packets + p->ets_packets); client->legacy_per = tmp; }
drivers/media/dvb-frontends/mb86a20s.c +7 -9
@@ -157,7 +157,6 @@ static struct regdata mb86a20s_init2[] = { { 0x45, 0x04 }, /* CN symbol 4 */ { 0x48, 0x04 }, /* CN manual mode */ - { 0x50, 0xd5 }, { 0x51, 0x01 }, /* Serial */ { 0x50, 0xd6 }, { 0x51, 0x1f }, { 0x50, 0xd2 }, { 0x51, 0x03 }, { 0x50, 0xd7 }, { 0x51, 0xbf },
@@ -1860,16 +1859,15 @@ static int mb86a20s_initfe(struct dvb_frontend *fe)dev_dbg (&state->i2c->dev,"%s: IF=%d, IF reg=0x%06llx\n" , __func__, state->if_freq, (long long )pll); -if (!state->config->is_serial) { +if (!state->config->is_serial) regD5 &= ~1 ; - rc =mb86a20s_writereg (state,0x50 ,0xd5 ); -if (rc <0 ) - goto err; - rc =mb86a20s_writereg (state,0x51 , regD5); -if (rc <0 ) - goto err; - } + rc =mb86a20s_writereg (state,0x50 ,0xd5 ); +if (rc <0 ) + goto err; + rc =mb86a20s_writereg (state,0x51 , regD5); +if (rc <0 ) + goto err; rc =mb86a20s_writeregdata (state, mb86a20s_init2);if (rc <0 )
drivers/media/platform/coda.c +1 -1
@@ -1933,7 +1933,7 @@ MODULE_DEVICE_TABLE(platform, coda_platform_ids);#ifdef CONFIG_OF static const struct of_device_id coda_dt_ids[] = { - { .compatible ="fsl,imx27-vpu" , .data = &coda_platform_ids[CODA_IMX27 ] }, + { .compatible ="fsl,imx27-vpu" , .data = &coda_devdata[CODA_IMX27 ] }, { .compatible ="fsl,imx53-vpu" , .data = &coda_devdata[CODA_IMX53 ] }, {/* sentinel */ } };
drivers/media/platform/exynos-gsc/gsc-core.c +8 -1
@@ -1122,10 +1122,14 @@ static int gsc_probe(struct platform_device *pdev) goto err_clk; } - ret =gsc_register_m2m_device (gsc); + ret =v4l2_device_register (dev, &gsc->v4l2_dev);if (ret) goto err_clk; + ret =gsc_register_m2m_device (gsc); +if (ret) + goto err_v4l2; +platform_set_drvdata (pdev, gsc);pm_runtime_enable (dev); ret =pm_runtime_get_sync (&pdev->dev);
@@ -1147,6 +1151,8 @@ err_pm:pm_runtime_put (dev); err_m2m:gsc_unregister_m2m_device (gsc); +err_v4l2: +v4l2_device_unregister (&gsc->v4l2_dev); err_clk:gsc_clk_put (gsc);return ret;
@@ -1157,6 +1163,7 @@ static int gsc_remove(struct platform_device *pdev)struct gsc_dev *gsc =platform_get_drvdata (pdev);gsc_unregister_m2m_device (gsc); +v4l2_device_unregister (&gsc->v4l2_dev);vb2_dma_contig_cleanup_ctx (gsc->alloc_ctx);pm_runtime_disable (&pdev->dev);
drivers/media/platform/exynos-gsc/gsc-core.h +1 -0
@@ -343,6 +343,7 @@ struct gsc_dev {unsigned long state;struct vb2_alloc_ctx *alloc_ctx;struct video_device vdev; +struct v4l2_device v4l2_dev; };/**
drivers/media/platform/exynos-gsc/gsc-m2m.c +1 -0
@@ -751,6 +751,7 @@ int gsc_register_m2m_device(struct gsc_dev *gsc) gsc->vdev.release = video_device_release_empty; gsc->vdev.lock = &gsc->lock; gsc->vdev.vfl_dir =VFL_DIR_M2M ; + gsc->vdev.v4l2_dev = &gsc->v4l2_dev;snprintf (gsc->vdev.name,sizeof (gsc->vdev.name),"%s.%d:m2m" ,GSC_MODULE_NAME , gsc->id);
drivers/media/platform/exynos4-is/media-dev.c +1 -1
@@ -1441,9 +1441,9 @@ static int fimc_md_probe(struct platform_device *pdev) err_unlock:mutex_unlock (&fmd->media_dev.graph_mutex); err_clk: -media_device_unregister (&fmd->media_dev);fimc_md_put_clocks (fmd);fimc_md_unregister_entities (fmd); +media_device_unregister (&fmd->media_dev); err_md:v4l2_device_unregister (&fmd->v4l2_dev);return ret;
drivers/media/platform/s5p-g2d/g2d.c +1 -0
@@ -784,6 +784,7 @@ static int g2d_probe(struct platform_device *pdev) } *vfd = g2d_videodev; vfd->lock = &dev->mutex; + vfd->v4l2_dev = &dev->v4l2_dev; ret =video_register_device (vfd,VFL_TYPE_GRABBER ,0 );if (ret) {v4l2_err (&dev->v4l2_dev,"Failed to register video device\n" );
drivers/media/usb/hdpvr/hdpvr-core.c +6 -5
@@ -311,6 +311,11 @@ static int hdpvr_probe(struct usb_interface *interface, dev->workqueue =0 ; +/* init video transfer queues first of all */ +/* to prevent oops in hdpvr_delete() on error paths */ +INIT_LIST_HEAD (&dev->free_buff_list); +INIT_LIST_HEAD (&dev->rec_buff_list); +/* register v4l2_device early so it can be used for printks */ if (v4l2_device_register (&interface->dev, &dev->v4l2_dev)) {dev_err (&interface->dev,"v4l2_device_register failed\n" );
@@ -333,10 +338,6 @@ static int hdpvr_probe(struct usb_interface *interface,if (!dev->workqueue) goto error; -/* init video transfer queues */ -INIT_LIST_HEAD (&dev->free_buff_list); -INIT_LIST_HEAD (&dev->rec_buff_list); - dev->options = hdpvr_default_options;if (default_video_input <HDPVR_VIDEO_INPUTS )
@@ -413,7 +414,7 @@ static int hdpvr_probe(struct usb_interface *interface, video_nr[atomic_inc_return(&dev_nr)]);if (retval <0 ) {v4l2_err (&dev->v4l2_dev,"registering videodev failed\n" ); - goto error; + goto reg_fail; }/* let the user know what node this device is now attached to */
drivers/mmc/host/tmio_mmc_dma.c +2 -2
@@ -104,6 +104,7 @@ static void tmio_mmc_start_dma_rx(struct tmio_mmc_host *host) pio:if (!desc) {/* DMA failed, fall back to PIO */ +tmio_mmc_enable_dma (host, false);if (ret >=0 ) ret = -EIO ; host->chan_rx =NULL ;
@@ -116,7 +117,6 @@ pio: }dev_warn (&host->pdev->dev,"DMA failed: %d, falling back to PIO\n" , ret); -tmio_mmc_enable_dma (host, false); } dev_dbg(&host->pdev->dev, "%s(): desc %p, cookie %d, sg[%d]\n", __func__,
@@ -185,6 +185,7 @@ static void tmio_mmc_start_dma_tx(struct tmio_mmc_host *host) pio:if (!desc) {/* DMA failed, fall back to PIO */ +tmio_mmc_enable_dma (host, false);if (ret >=0 ) ret = -EIO ; host->chan_tx =NULL ;
@@ -197,7 +198,6 @@ pio: }dev_warn (&host->pdev->dev,"DMA failed: %d, falling back to PIO\n" , ret); -tmio_mmc_enable_dma (host, false); } dev_dbg(&host->pdev->dev, "%s(): desc %p, cookie %d\n", __func__,
drivers/mtd/nand/nand_base.c +5 -3
@@ -2793,7 +2793,9 @@ static void nand_set_defaults(struct nand_chip *chip, int busw)if (!chip->select_chip) chip->select_chip = nand_select_chip; -if (!chip->read_byte) + +/* If called twice, pointers that depend on busw may need to be reset */ +if (!chip->read_byte || chip->read_byte == nand_read_byte) chip->read_byte = busw ? nand_read_byte16 : nand_read_byte;if (!chip->read_word) chip->read_word = nand_read_word;
@@ -2801,9 +2803,9 @@ static void nand_set_defaults(struct nand_chip *chip, int busw) chip->block_bad = nand_block_bad;if (!chip->block_markbad) chip->block_markbad = nand_default_block_markbad; -if (!chip->write_buf) +if (!chip->write_buf || chip->write_buf == nand_write_buf) chip->write_buf = busw ? nand_write_buf16 : nand_write_buf; -if (!chip->read_buf) +if (!chip->read_buf || chip->read_buf == nand_read_buf) chip->read_buf = busw ? nand_read_buf16 : nand_read_buf;if (!chip->scan_bbt) chip->scan_bbt = nand_default_bbt;
drivers/mtd/ubi/wl.c +3 -0
@@ -1069,6 +1069,9 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk,if (!(e2->ec - e1->ec >=UBI_WL_THRESHOLD )) {dbg_wl ("no WL needed: min used EC %d, max free EC %d" , e1->ec, e2->ec); + +/* Give the unused PEB back */ +wl_tree_add (e2, &ubi->free); goto out_cancel; }self_check_in_wl_tree (ubi, e1, &ubi->used);
drivers/net/wireless/ath/ath9k/ar9003_phy.c +4 -0
@@ -1076,6 +1076,10 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,* is_on == 0 means MRC CCK is OFF (more noise imm) */ bool is_on = param ?1 :0 ; + +if (ah->caps.rx_chainmask ==1 ) +break ; +REG_RMW_FIELD (ah,AR_PHY_MRC_CCK_CTRL ,AR_PHY_MRC_CCK_ENABLE , is_on); REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL,
drivers/net/wireless/ath/ath9k/ath9k.h +1 -4
@@ -79,10 +79,6 @@ struct ath_config { sizeof(struct ath_buf_state)); \ }while (0 ) -#define ATH_RXBUF_RESET (_bf) do { \ - (_bf)->bf_stale = false; \ - } while (0) -/** * enum buffer_type - Buffer type flags *
@@ -316,6 +312,7 @@ struct ath_rx {struct ath_descdma rxdma;struct ath_rx_edma rx_edma[ATH9K_RX_QUEUE_MAX ]; +struct ath_buf *buf_hold;struct sk_buff *frag;u32 ampdu_ref;
drivers/net/wireless/ath/ath9k/recv.c +13 -4
@@ -42,8 +42,6 @@ static void ath_rx_buf_link(struct ath_softc *sc, struct ath_buf *bf)struct ath_desc *ds;struct sk_buff *skb; -ATH_RXBUF_RESET (bf); - ds = bf->bf_desc; ds->ds_link =0 ;/* link to null */ ds->ds_data = bf->bf_buf_addr;
@@ -70,6 +68,14 @@ static void ath_rx_buf_link(struct ath_softc *sc, struct ath_buf *bf) sc->rx.rxlink = &ds->ds_link; } +static void ath_rx_buf_relink (struct ath_softc *sc,struct ath_buf *bf) +{ +if (sc->rx.buf_hold) +ath_rx_buf_link (sc, sc->rx.buf_hold); + + sc->rx.buf_hold = bf; +} +static void ath_setdefantenna (struct ath_softc *sc,u32 antenna) {/* XXX block beacon interrupts */
@@ -117,7 +123,6 @@ static bool ath_rx_edma_buf_link(struct ath_softc *sc, skb = bf->bf_mpdu; -ATH_RXBUF_RESET (bf);memset (skb->data,0 , ah->caps.rx_status_len);dma_sync_single_for_device (sc->dev, bf->bf_buf_addr, ah->caps.rx_status_len,DMA_TO_DEVICE );
@@ -432,6 +437,7 @@ int ath_startrecv(struct ath_softc *sc)if (list_empty (&sc->rx.rxbuf)) goto start_recv; + sc->rx.buf_hold =NULL ; sc->rx.rxlink =NULL ;list_for_each_entry_safe (bf, tbf, &sc->rx.rxbuf, list) {ath_rx_buf_link (sc, bf);
@@ -677,6 +683,9 @@ static struct ath_buf *ath_get_next_rx_buf(struct ath_softc *sc, } bf = list_first_entry(&sc->rx.rxbuf, struct ath_buf, list); +if (bf == sc->rx.buf_hold) +return NULL ; + ds = bf->bf_desc;/*
@@ -1378,7 +1387,7 @@ requeue:if (edma) {ath_rx_edma_buf_link (sc, qtype); }else { -ath_rx_buf_link (sc, bf); +ath_rx_buf_relink (sc, bf);ath9k_hw_rxena (ah); } }while (1 );
drivers/net/wireless/ath/ath9k/xmit.c +1 -0
@@ -2387,6 +2387,7 @@ void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an)for (acno =0 , ac = &an->ac[acno]; acno <IEEE80211_NUM_ACS ; acno++, ac++) { ac->sched = false; + ac->clear_ps_filter = true; ac->txq = sc->tx.txq_map[acno];INIT_LIST_HEAD (&ac->tid_q); }
drivers/net/wireless/brcm80211/brcmsmac/dma.c +11 -4
@@ -1015,9 +1015,10 @@ static bool dma64_txidle(struct dma_info *di)/* * post receive buffers -* return false is refill failed completely and ring is empty this will stall -* the rx dma and user might want to call rxfill again asap. This unlikely -* happens on memory-rich NIC, but often on memory-constrained dongle +* Return false if refill failed completely or dma mapping failed. The ring +* is empty, which will stall the rx dma and user might want to call rxfill +* again asap. This is unlikely to happen on a memory-rich NIC, but often on +* memory-constrained dongle. */ bool dma_rxfill (struct dma_pub *pub) {
@@ -1078,6 +1079,8 @@ bool dma_rxfill(struct dma_pub *pub) pa =dma_map_single (di->dmadev, p->data, di->rxbufsize,DMA_FROM_DEVICE ); +if (dma_mapping_error (di->dmadev, pa)) +return false;/* save the free packet pointer */ di->rxp[rxout] = p;
@@ -1284,7 +1287,11 @@ static void dma_txenq(struct dma_info *di, struct sk_buff *p)/* get physical address of buffer start */ pa =dma_map_single (di->dmadev, data, len,DMA_TO_DEVICE ); - +/* if mapping failed, free skb */ +if (dma_mapping_error (di->dmadev, pa)) { +brcmu_pkt_buf_free_skb (p); +return ; + }/* With a DMA segment list, Descriptor table is filled * using the segment list instead of looping over * buffers in multi-chain DMA. Therefore, EOF for SGLIST
drivers/of/base.c +1 -0
@@ -1629,6 +1629,7 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align)) ap =dt_alloc (sizeof (*ap) + len +1 ,4 );if (!ap)continue ; +memset (ap,0 ,sizeof (*ap) + len +1 ); ap->alias = start;of_alias_add (ap, np, id, start, len); }
drivers/pinctrl/pinctrl-at91.c +2 -2
@@ -325,7 +325,7 @@ static void at91_mux_disable_interrupt(void __iomem *pio, unsigned mask)static unsigned at91_mux_get_pullup (void __iomem *pio,unsigned pin) { -return (readl_relaxed (pio +PIO_PUSR ) >> pin) &0x1 ; +return !((readl_relaxed (pio +PIO_PUSR ) >> pin) &0x1 ); }static void at91_mux_set_pullup (void __iomem *pio,unsigned mask,bool on)
@@ -445,7 +445,7 @@ static void at91_mux_pio3_set_debounce(void __iomem *pio, unsigned mask,static bool at91_mux_pio3_get_pulldown (void __iomem *pio,unsigned pin) { -return (__raw_readl (pio +PIO_PPDSR ) >> pin) &0x1 ; +return !((__raw_readl (pio +PIO_PPDSR ) >> pin) &0x1 ); }static void at91_mux_pio3_set_pulldown (void __iomem *pio,unsigned mask,bool is_on)
drivers/scsi/mpt3sas/Makefile +1 -1
@@ -1,5 +1,5 @@ # mpt3sas makefile -obj-m += mpt3sas.o +obj-$(CONFIG_SCSI_MPT3SAS) += mpt3sas.o mpt3sas-y += mpt3sas_base.o \ mpt3sas_config.o \ mpt3sas_scsih.o \
drivers/scsi/sd.c +3 -8
@@ -2409,14 +2409,9 @@ sd_read_cache_type(struct scsi_disk *sdkp, unsigned char *buffer) } } -if (modepage ==0x3F ) { -sd_printk (KERN_ERR , sdkp,"No Caching mode page " -"present\n" ); - goto defaults; - }else if ((buffer[offset] &0x3f ) != modepage) { -sd_printk (KERN_ERR , sdkp,"Got wrong page\n" ); - goto defaults; - } +sd_printk (KERN_ERR , sdkp,"No Caching mode page found\n" ); + goto defaults; + Page_found:if (modepage ==8 ) { sdkp->WCE = ((buffer[offset +2 ] &0x04 ) !=0 );
drivers/staging/comedi/drivers/dt282x.c +2 -1
@@ -269,8 +269,9 @@ struct dt282x_private { } \udelay (5 ); \ } \ -if (_i) \ +if (_i) { \ b \ + } \ }while (0 ) static int prep_ai_dma(struct comedi_device *dev, int chan, int size);
drivers/staging/iio/adc/mxs-lradc.c +7 -11
@@ -234,7 +234,6 @@ static int mxs_lradc_read_raw(struct iio_dev *iio_dev, {struct mxs_lradc *lradc =iio_priv (iio_dev);int ret; -unsigned long mask;if (m !=IIO_CHAN_INFO_RAW )return -EINVAL ;
@@ -243,12 +242,6 @@ static int mxs_lradc_read_raw(struct iio_dev *iio_dev,if (chan->channel >LRADC_MAX_TOTAL_CHANS )return -EINVAL ; -/* Validate the channel if it doesn't intersect with reserved chans. */ -bitmap_set (&mask, chan->channel,1 ); - ret =iio_validate_scan_mask_onehot (iio_dev, &mask); -if (ret) -return -EINVAL ; -/* * See if there is no buffered operation in progess. If there is, simply * bail out. This can be improved to support both buffered and raw IO at
@@ -661,12 +654,13 @@ static int mxs_lradc_trigger_init(struct iio_dev *iio) {int ret;struct iio_trigger *trig; +struct mxs_lradc *lradc =iio_priv (iio); trig =iio_trigger_alloc ("%s-dev%i" , iio->name, iio->id);if (trig ==NULL )return -ENOMEM ; - trig->dev.parent = iio->dev.parent; + trig->dev.parent = lradc->dev;iio_trigger_set_drvdata (trig, iio); trig->ops = &mxs_lradc_trigger_ops;
@@ -676,15 +670,17 @@ static int mxs_lradc_trigger_init(struct iio_dev *iio)return ret; } - iio->trig = trig; + lradc->trig = trig;return 0 ; }static void mxs_lradc_trigger_remove (struct iio_dev *iio) { -iio_trigger_unregister (iio->trig); -iio_trigger_free (iio->trig); +struct mxs_lradc *lradc =iio_priv (iio); + +iio_trigger_unregister (lradc->trig); +iio_trigger_free (lradc->trig); }static int mxs_lradc_buffer_preenable (struct iio_dev *iio)
drivers/target/target_core_alua.c +1 -1
@@ -730,7 +730,7 @@ static int core_alua_write_tpg_metadata(if (ret <0 )pr_err ("Error writing ALUA metadata file: %s\n" , path);fput (file); -return ret ? -EIO :0 ; +return (ret <0 ) ? -EIO :0 ; }/*
drivers/target/target_core_pr.c +1 -1
@@ -1987,7 +1987,7 @@ static int __core_scsi3_write_aptpl_to_file(pr_debug ("Error writing APTPL metadata file: %s\n" , path);fput (file); -return ret ? -EIO :0 ; +return (ret <0 ) ? -EIO :0 ; } static int
drivers/tty/tty_io.c +2 -1
@@ -850,7 +850,8 @@ void disassociate_ctty(int on_exit)struct pid *tty_pgrp =tty_get_pgrp (tty);if (tty_pgrp) {kill_pgrp (tty_pgrp,SIGHUP , on_exit); -kill_pgrp (tty_pgrp,SIGCONT , on_exit); +if (!on_exit) +kill_pgrp (tty_pgrp,SIGCONT , on_exit);put_pid (tty_pgrp); } }
drivers/usb/class/cdc-wdm.c +9 -4
@@ -209,6 +209,7 @@ skip_error:static void wdm_int_callback (struct urb *urb) {int rv =0 ; +int responding;int status = urb->status;struct wdm_device *desc;struct usb_cdc_notification *dr;
@@ -262,8 +263,8 @@ static void wdm_int_callback(struct urb *urb)spin_lock (&desc->iuspin);clear_bit (WDM_READ , &desc->flags); -set_bit (WDM_RESPONDING , &desc->flags); -if (!test_bit (WDM_DISCONNECTING , &desc->flags) + responding =test_and_set_bit (WDM_RESPONDING , &desc->flags); +if (!responding && !test_bit (WDM_DISCONNECTING , &desc->flags) && !test_bit (WDM_SUSPENDING , &desc->flags)) { rv =usb_submit_urb (desc->response,GFP_ATOMIC ); dev_dbg(&desc->intf->dev, "%s: usb_submit_urb %d",
@@ -685,16 +686,20 @@ static void wdm_rxwork(struct work_struct *work) { struct wdm_device *desc = container_of(work, struct wdm_device, rxwork);unsigned long flags; -int rv; +int rv =0 ; +int responding;spin_lock_irqsave (&desc->iuspin, flags);if (test_bit (WDM_DISCONNECTING , &desc->flags)) {spin_unlock_irqrestore (&desc->iuspin, flags); }else { + responding =test_and_set_bit (WDM_RESPONDING , &desc->flags);spin_unlock_irqrestore (&desc->iuspin, flags); - rv =usb_submit_urb (desc->response,GFP_KERNEL ); +if (!responding) + rv =usb_submit_urb (desc->response,GFP_KERNEL );if (rv <0 && rv != -EPERM ) {spin_lock_irqsave (&desc->iuspin, flags); +clear_bit (WDM_RESPONDING , &desc->flags);if (!test_bit (WDM_DISCONNECTING , &desc->flags))schedule_work (&desc->rxwork);spin_unlock_irqrestore (&desc->iuspin, flags);
drivers/usb/core/config.c +2 -1
@@ -424,7 +424,8 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,memcpy (&config->desc, buffer,USB_DT_CONFIG_SIZE );if (config->desc.bDescriptorType !=USB_DT_CONFIG || - config->desc.bLength <USB_DT_CONFIG_SIZE ) { + config->desc.bLength <USB_DT_CONFIG_SIZE || + config->desc.bLength > size) {dev_err (ddev,"invalid descriptor for config index %d: " "type = 0x%X, length = %d\n" , cfgidx, config->desc.bDescriptorType, config->desc.bLength);
drivers/usb/core/hub.c +30 -35
102 lines not on this page · raw message
drivers/usb/core/port.c +5 -8
@@ -89,22 +89,19 @@ static int usb_port_runtime_resume(struct device *dev) retval =usb_hub_set_port_power (hdev, port1, true);if (port_dev->child && !retval) {/* -* Wait for usb hub port to be reconnected in order to make -* the resume procedure successful. +* Attempt to wait for usb hub port to be reconnected in order +* to make the resume procedure successful. The device may have +* disconnected while the port was powered off, so ignore the +* return status. */ retval =hub_port_debounce_be_connected (hub, port1); -if (retval <0 ) { +if (retval <0 )dev_dbg (&port_dev->dev,"can't get reconnection after setting port power on, status %d\n" , retval); - goto out; - }usb_clear_port_feature (hdev, port1,USB_PORT_FEAT_C_ENABLE ); - -/* Set return value to 0 if debounce successful */ retval =0 ; } -out:clear_bit (port1, hub->busy_bits);usb_autopm_put_interface (intf);return retval;
drivers/usb/dwc3/gadget.c +22 -17
@@ -1508,6 +1508,15 @@ static int dwc3_gadget_start(struct usb_gadget *g,int irq;u32 reg; + irq =platform_get_irq (to_platform_device (dwc->dev),0 ); + ret =request_threaded_irq (irq, dwc3_interrupt, dwc3_thread_interrupt, +IRQF_SHARED |IRQF_ONESHOT ,"dwc3" , dwc); +if (ret) { +dev_err (dwc->dev,"failed to request irq #%d --> %d\n" , + irq, ret); + goto err0; + } +spin_lock_irqsave (&dwc->lock, flags);if (dwc->gadget_driver) {
@@ -1515,7 +1524,7 @@ static int dwc3_gadget_start(struct usb_gadget *g, dwc->gadget.name, dwc->gadget_driver->driver.name); ret = -EBUSY ; - goto err0; + goto err1; } dwc->gadget_driver = driver;
@@ -1551,42 +1560,38 @@ static int dwc3_gadget_start(struct usb_gadget *g, ret =__dwc3_gadget_ep_enable (dep, &dwc3_gadget_ep0_desc,NULL , false);if (ret) {dev_err (dwc->dev,"failed to enable %s\n" , dep->name); - goto err0; + goto err2; } dep = dwc->eps[1 ]; ret =__dwc3_gadget_ep_enable (dep, &dwc3_gadget_ep0_desc,NULL , false);if (ret) {dev_err (dwc->dev,"failed to enable %s\n" , dep->name); - goto err1; + goto err3; }/* begin to receive SETUP packets */ dwc->ep0state =EP0_SETUP_PHASE ;dwc3_ep0_out_start (dwc); - irq =platform_get_irq (to_platform_device (dwc->dev),0 ); - ret =request_threaded_irq (irq, dwc3_interrupt, dwc3_thread_interrupt, -IRQF_SHARED |IRQF_ONESHOT ,"dwc3" , dwc); -if (ret) { -dev_err (dwc->dev,"failed to request irq #%d --> %d\n" , - irq, ret); - goto err1; - } -dwc3_gadget_enable_irq (dwc);spin_unlock_irqrestore (&dwc->lock, flags);return 0 ; -err1: +err3:__dwc3_gadget_ep_disable (dwc->eps[0 ]); -err0: +err2: dwc->gadget_driver =NULL ; + +err1:spin_unlock_irqrestore (&dwc->lock, flags); +free_irq (irq, dwc); + +err0:return ret; }
@@ -1600,9 +1605,6 @@ static int dwc3_gadget_stop(struct usb_gadget *g,spin_lock_irqsave (&dwc->lock, flags);dwc3_gadget_disable_irq (dwc); - irq =platform_get_irq (to_platform_device (dwc->dev),0 ); -free_irq (irq, dwc); -__dwc3_gadget_ep_disable (dwc->eps[0 ]);__dwc3_gadget_ep_disable (dwc->eps[1 ]);
@@ -1610,6 +1612,9 @@ static int dwc3_gadget_stop(struct usb_gadget *g,spin_unlock_irqrestore (&dwc->lock, flags); + irq =platform_get_irq (to_platform_device (dwc->dev),0 ); +free_irq (irq, dwc); +return 0 ; }
drivers/usb/gadget/uvc_queue.c +5 -1
@@ -177,12 +177,16 @@ static int uvc_queue_buffer(struct uvc_video_queue *queue,mutex_lock (&queue->mutex); ret =vb2_qbuf (&queue->queue, buf); +if (ret <0 ) + goto done; +spin_lock_irqsave (&queue->irqlock, flags); ret = (queue->flags &UVC_QUEUE_PAUSED ) !=0 ; queue->flags &= ~UVC_QUEUE_PAUSED ;spin_unlock_irqrestore (&queue->irqlock, flags); -mutex_unlock (&queue->mutex); +done: +mutex_unlock (&queue->mutex);return ret; }
drivers/usb/host/ehci-mxc.c +1 -1
@@ -184,7 +184,7 @@ static int ehci_mxc_drv_remove(struct platform_device *pdev)if (pdata && pdata->exit) pdata->exit (pdev); -if (pdata->otg) +if (pdata && pdata->otg)usb_phy_shutdown (pdata->otg);clk_disable_unprepare (priv->usbclk);
drivers/usb/host/ohci-pci.c +1 -1
@@ -371,7 +371,7 @@ static struct pci_driver ohci_pci_driver = { .remove = usb_hcd_pci_remove, .shutdown = usb_hcd_pci_shutdown, -#ifdef CONFIG_PM_SLEEP +#ifdef CONFIG_PM .driver = { .pm = &usb_hcd_pci_pm_ops },
drivers/usb/host/xhci-plat.c +1 -1
@@ -24,7 +24,7 @@ static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)* here that the generic code does not try to make a pci_dev from our * dev struct in order to setup MSI */ - xhci->quirks |=XHCI_BROKEN_MSI ; + xhci->quirks |=XHCI_PLAT ; }/* called during probe() after chip reset completes */
drivers/usb/host/xhci.c +28 -1
@@ -342,9 +342,14 @@ static void xhci_msix_sync_irqs(struct xhci_hcd *xhci)static int xhci_try_enable_msi (struct usb_hcd *hcd) {struct xhci_hcd *xhci =hcd_to_xhci (hcd); -struct pci_dev *pdev =to_pci_dev (xhci_to_hcd (xhci)->self.controller); +struct pci_dev *pdev;int ret; +/* The xhci platform device has set up IRQs through usb_add_hcd. */ +if (xhci->quirks &XHCI_PLAT ) +return 0 ; + + pdev =to_pci_dev (xhci_to_hcd (xhci)->self.controller);/* * Some Fresco Logic host controllers advertise MSI, but fail to * generate interrupts. Don't even try to enable MSI.
@@ -3506,10 +3511,21 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev) {struct xhci_hcd *xhci =hcd_to_xhci (hcd);struct xhci_virt_device *virt_dev; +struct device *dev = hcd->self.controller;unsigned long flags;u32 state;int i, ret; +#ifndef CONFIG_USB_DEFAULT_PERSIST +/* +* We called pm_runtime_get_noresume when the device was attached. +* Decrement the counter here to allow controller to runtime suspend +* if no devices remain. +*/ +if (xhci->quirks &XHCI_RESET_ON_RESUME ) +pm_runtime_put_noidle (dev); +#endif + ret =xhci_check_args (hcd, udev,NULL ,0 , true, __func__);/* If the host is halted due to driver unload, we still need to free the * device.
@@ -3581,6 +3597,7 @@ static int xhci_reserve_host_control_ep_resources(struct xhci_hcd *xhci)int xhci_alloc_dev (struct usb_hcd *hcd,struct usb_device *udev) {struct xhci_hcd *xhci =hcd_to_xhci (hcd); +struct device *dev = hcd->self.controller;unsigned long flags;int timeleft;int ret;
@@ -3633,6 +3650,16 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev) goto disable_slot; } udev->slot_id = xhci->slot_id; + +#ifndef CONFIG_USB_DEFAULT_PERSIST +/* +* If resetting upon resume, we can't put the controller into runtime +* suspend if there is a device attached. +*/ +if (xhci->quirks &XHCI_RESET_ON_RESUME ) +pm_runtime_get_noresume (dev); +#endif +/* Is this a LS or FS device under a HS hub? */ /* Hub or peripherial? */ return 1 ;
drivers/usb/host/xhci.h +1 -0
@@ -1516,6 +1516,7 @@ struct xhci_hcd {#define XHCI_SPURIOUS_REBOOT (1 << 13)#define XHCI_COMP_MODE_QUIRK (1 << 14)#define XHCI_AVOID_BEI (1 << 15) +#define XHCI_PLAT (1 << 16)unsigned int num_active_eps;unsigned int limit_active_eps;/* There are two roothubs to keep track of bus suspend info for */
drivers/usb/serial/mos7720.c +3 -3
@@ -374,7 +374,7 @@ static int write_parport_reg_nonblock(struct mos7715_parport *mos_parport,kfree (urbtrack);return -ENOMEM ; } - urbtrack->setup =kmalloc (sizeof (*urbtrack->setup),GFP_KERNEL ); + urbtrack->setup =kmalloc (sizeof (*urbtrack->setup),GFP_ATOMIC );if (!urbtrack->setup) {usb_free_urb (urbtrack->urb);kfree (urbtrack);
@@ -382,8 +382,8 @@ static int write_parport_reg_nonblock(struct mos7715_parport *mos_parport, } urbtrack->setup->bRequestType = (__u8 )0x40 ; urbtrack->setup->bRequest = (__u8 )0x0e ; - urbtrack->setup->wValue =get_reg_value (reg, dummy); - urbtrack->setup->wIndex =get_reg_index (reg); + urbtrack->setup->wValue =cpu_to_le16 (get_reg_value (reg, dummy)); + urbtrack->setup->wIndex =cpu_to_le16 (get_reg_index (reg)); urbtrack->setup->wLength =0 ; usb_fill_control_urb(urbtrack->urb, usbdev, usb_sndctrlpipe(usbdev, 0),
drivers/xen/grant-table.c +11 -2
@@ -729,9 +729,18 @@ void gnttab_request_free_callback(struct gnttab_free_callback *callback, void (*fn)(void *), void *arg, u16 count) { unsigned long flags; +struct gnttab_free_callback *cb; +spin_lock_irqsave (&gnttab_list_lock, flags); -if (callback->next) - goto out; + +/* Check if the callback is already on the list */ + cb = gnttab_free_callback_list; +while (cb) { +if (cb == callback) + goto out; + cb = cb->next; + } + callback->fn = fn; callback->arg = arg; callback->count = count;
fs/btrfs/ioctl.c +3 -0
@@ -3299,6 +3299,9 @@ static long btrfs_ioctl_dev_replace(struct btrfs_root *root, void __user *arg)switch (p->cmd) {case BTRFS_IOCTL_DEV_REPLACE_CMD_START : +if (root->fs_info->sb->s_flags &MS_RDONLY ) +return -EROFS ; +if (atomic_xchg ( &root->fs_info->mutually_exclusive_operation_running,1 )) {
fs/ceph/ioctl.c +3 -1
@@ -196,8 +196,10 @@ static long ceph_ioctl_get_dataloc(struct file *file, void __user *arg) r =ceph_calc_file_object_mapping (&ci->i_layout, dl.file_offset, len, &dl.object_no, &dl.object_offset, &olen); -if (r <0 ) +if (r <0 ) { +up_read (&osdc->map_sem);return -EIO ; + } dl.file_offset -= dl.object_offset; dl.object_size =ceph_file_layout_object_size (ci->i_layout); dl.block_size =ceph_file_layout_su (ci->i_layout);
fs/cifs/connect.c +2 -0
@@ -377,6 +377,7 @@ cifs_reconnect(struct TCP_Server_Info *server)try_to_freeze ();/* we should try only the port we connected to before */ +mutex_lock (&server->srv_mutex); rc =generic_ip_connect (server);if (rc) {cifs_dbg (FYI ,"reconnect error %d\n" , rc);
@@ -388,6 +389,7 @@ cifs_reconnect(struct TCP_Server_Info *server) server->tcpStatus = CifsNeedNegotiate;spin_unlock (&GlobalMid_Lock); } +mutex_unlock (&server->srv_mutex); }while (server->tcpStatus == CifsNeedReconnect);return rc;
fs/cifs/smb2misc.c +80 -68
183 lines not on this page · raw message
fs/ext4/inode.c +49 -60
129 lines not on this page · raw message
fs/fuse/dir.c +14 -1
@@ -1175,6 +1175,8 @@ static int parse_dirfile(char *buf, size_t nbytes, struct file *file,return -EIO ;if (reclen > nbytes)break ; +if (memchr (dirent->name,'/' , dirent->namelen) !=NULL ) +return -EIO ; over =filldir (dstbuf, dirent->name, dirent->namelen, file->f_pos, dirent->ino, dirent->type);
@@ -1323,6 +1325,8 @@ static int parse_dirplusfile(char *buf, size_t nbytes, struct file *file,return -EIO ;if (reclen > nbytes)break ; +if (memchr (dirent->name,'/' , dirent->namelen) !=NULL ) +return -EIO ;if (!over) {/* We fill entries into dstbuf only as much as
@@ -1594,6 +1598,7 @@ int fuse_do_setattr(struct inode *inode, struct iattr *attr, struct file *file) {struct fuse_conn *fc =get_fuse_conn (inode); +struct fuse_inode *fi =get_fuse_inode (inode);struct fuse_req *req;struct fuse_setattr_in inarg;struct fuse_attr_out outarg;
@@ -1621,8 +1626,10 @@ int fuse_do_setattr(struct inode *inode, struct iattr *attr,if (IS_ERR (req))return PTR_ERR (req); -if (is_truncate) +if (is_truncate) {fuse_set_nowrite (inode); +set_bit (FUSE_I_SIZE_UNSTABLE , &fi->state); + }memset (&inarg,0 ,sizeof (inarg));memset (&outarg,0 ,sizeof (outarg));
@@ -1684,12 +1691,14 @@ int fuse_do_setattr(struct inode *inode, struct iattr *attr,invalidate_inode_pages2 (inode->i_mapping); } +clear_bit (FUSE_I_SIZE_UNSTABLE , &fi->state);return 0 ; error:if (is_truncate)fuse_release_nowrite (inode); +clear_bit (FUSE_I_SIZE_UNSTABLE , &fi->state);return err; }
@@ -1753,6 +1762,8 @@ static int fuse_setxattr(struct dentry *entry, const char *name, fc->no_setxattr =1 ; err = -EOPNOTSUPP ; } +if (!err) +fuse_invalidate_attr (inode);return err; }
@@ -1882,6 +1893,8 @@ static int fuse_removexattr(struct dentry *entry, const char *name) fc->no_removexattr =1 ; err = -EOPNOTSUPP ; } +if (!err) +fuse_invalidate_attr (inode);return err; }
fs/fuse/file.c +9 -2
@@ -630,7 +630,8 @@ static void fuse_read_update_size(struct inode *inode, loff_t size,struct fuse_inode *fi =get_fuse_inode (inode);spin_lock (&fc->lock); -if (attr_ver == fi->attr_version && size < inode->i_size) { +if (attr_ver == fi->attr_version && size < inode->i_size && + !test_bit (FUSE_I_SIZE_UNSTABLE , &fi->state)) { fi->attr_version = ++fc->attr_version;i_size_write (inode, size); }
@@ -1033,12 +1034,16 @@ static ssize_t fuse_perform_write(struct file *file, {struct inode *inode = mapping->host;struct fuse_conn *fc =get_fuse_conn (inode); +struct fuse_inode *fi =get_fuse_inode (inode);int err =0 ;ssize_t res =0 ;if (is_bad_inode (inode))return -EIO ; +if (inode->i_size < pos +iov_iter_count (ii)) +set_bit (FUSE_I_SIZE_UNSTABLE , &fi->state); + do { struct fuse_req *req; ssize_t count;
@@ -1074,6 +1079,7 @@ static ssize_t fuse_perform_write(struct file *file,if (res >0 )fuse_write_update_size (inode, pos); +clear_bit (FUSE_I_SIZE_UNSTABLE , &fi->state);fuse_invalidate_attr (inode);return res >0 ? res : err;
@@ -1530,7 +1536,6 @@ static int fuse_writepage_locked(struct page *page)inc_bdi_stat (mapping->backing_dev_info,BDI_WRITEBACK );inc_zone_page_state (tmp_page,NR_WRITEBACK_TEMP ); -end_page_writeback (page);spin_lock (&fc->lock);list_add (&req->writepages_entry, &fi->writepages);
@@ -1538,6 +1543,8 @@ static int fuse_writepage_locked(struct page *page)fuse_flush_writepages (inode);spin_unlock (&fc->lock); +end_page_writeback (page); +return 0 ; err_free:
fs/fuse/fuse_i.h +2 -0
@@ -115,6 +115,8 @@ struct fuse_inode {enum {/** Advise readdirplus */ FUSE_I_ADVISE_RDPLUS , +/** An operation changing file size is in progress */ +FUSE_I_SIZE_UNSTABLE , };struct fuse_conn ;
fs/fuse/inode.c +2 -1
@@ -201,7 +201,8 @@ void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr,struct timespec old_mtime;spin_lock (&fc->lock); -if (attr_version !=0 && fi->attr_version > attr_version) { +if ((attr_version !=0 && fi->attr_version > attr_version) || +test_bit (FUSE_I_SIZE_UNSTABLE , &fi->state)) {spin_unlock (&fc->lock);return ; }
fs/isofs/inode.c +5 -11
@@ -125,8 +125,8 @@ static void destroy_inodecache(void)static int isofs_remount (struct super_block *sb,int *flags,char *data) { -/* we probably want a lot more here */ - *flags |=MS_RDONLY ; +if (!(*flags &MS_RDONLY )) +return -EROFS ;return 0 ; }
@@ -779,15 +779,6 @@ root_found:*/ s->s_maxbytes =0x80000000000LL ; -/* -* The CDROM is read-only, has no nodes (devices) on it, and since -* all of the files appear to be owned by root, we really do not want -* to allow suid. (suid or devices will not show up unless we have -* Rock Ridge extensions) -*/ - - s->s_flags |=MS_RDONLY /* | MS_NODEV | MS_NOSUID */ ; -/* Set this for reference. Its not currently used except on write which we don't have .. */
@@ -1546,6 +1537,9 @@ struct inode *isofs_iget(struct super_block *sb,static struct dentry *isofs_mount (struct file_system_type *fs_type,int flags,const char *dev_name,void *data) { +/* We don't support read-write mounts */ +if (!(flags &MS_RDONLY )) +return ERR_PTR (-EACCES );return mount_bdev (fs_type, flags, dev_name, data, isofs_fill_super); }
fs/ocfs2/extent_map.c +0 -1
@@ -781,7 +781,6 @@ int ocfs2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, cpos = map_start >> osb->s_clustersize_bits; mapping_end =ocfs2_clusters_for_bytes (inode->i_sb, map_start + map_len); - mapping_end -= cpos; is_last =0 ;while (cpos < mapping_end && !is_last) {u32 fe_flags;
fs/proc/root.c +2 -1
@@ -110,7 +110,8 @@ static struct dentry *proc_mount(struct file_system_type *fs_type, ns =task_active_pid_ns (current); options = data; -if (!current_user_ns ()->may_mount_proc) +if (!current_user_ns ()->may_mount_proc || + !ns_capable (ns->user_ns,CAP_SYS_ADMIN ))return ERR_PTR (-EPERM ); }
include/linux/compat.h +7 -0
@@ -669,6 +669,13 @@ asmlinkage long compat_sys_sigaltstack(const compat_stack_t __user *uss_ptr,int compat_restore_altstack (const compat_stack_t __user *uss);int __compat_save_altstack (compat_stack_t __user *,unsigned long ); +#define compat_save_altstack_ex (uss, sp) do { \ + compat_stack_t __user *__uss = uss; \ + struct task_struct *t = current; \ + put_user_ex(ptr_to_compat((void __user *)t->sas_ss_sp), &__uss->ss_sp); \ + put_user_ex(sas_ss_flags(sp), &__uss->ss_flags); \ + put_user_ex(t->sas_ss_size, &__uss->ss_size); \ +} while (0);asmlinkage long compat_sys_sched_rr_get_interval (compat_pid_t pid,struct compat_timespec __user *interval);
include/linux/hid.h +3 -1
@@ -393,10 +393,12 @@ struct hid_report {struct hid_device *device;/* associated device */ }; +#define HID_MAX_IDS 256 +struct hid_report_enum {unsigned numbered;struct list_head report_list; -struct hid_report *report_id_hash[256 ]; +struct hid_report *report_id_hash[HID_MAX_IDS ]; };#define HID_REPORT_TYPES 3
include/linux/pci_ids.h +2 -0
@@ -518,6 +518,8 @@#define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303#define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304#define PCI_DEVICE_ID_AMD_15H_M10H_F3 0x1403 +#define PCI_DEVICE_ID_AMD_15H_M30H_NB_F3 0x141d +#define PCI_DEVICE_ID_AMD_15H_M30H_NB_F4 0x141e#define PCI_DEVICE_ID_AMD_15H_NB_F0 0x1600#define PCI_DEVICE_ID_AMD_15H_NB_F1 0x1601#define PCI_DEVICE_ID_AMD_15H_NB_F2 0x1602
include/linux/rculist.h +3 -2
@@ -267,8 +267,9 @@ static inline void list_splice_init_rcu(struct list_head *list,*/ #define list_first_or_null_rcu (ptr, type, member) \ ({struct list_head *__ptr = (ptr); \ - struct list_head __rcu *__next = list_next_rcu(__ptr); \ - likely(__ptr != __next) ? container_of(__next, type, member) : NULL; \ + struct list_head *__next = ACCESS_ONCE(__ptr->next); \ + likely(__ptr != __next) ? \ + list_entry_rcu(__next, type, member) : NULL; \ })/**
include/linux/signal.h +8 -0
@@ -434,6 +434,14 @@ void signals_init(void);int restore_altstack (const stack_t __user *);int __save_altstack (stack_t __user *,unsigned long ); +#define save_altstack_ex (uss, sp) do { \ + stack_t __user *__uss = uss; \ + struct task_struct *t = current; \ + put_user_ex((void __user *)t->sas_ss_sp, &__uss->ss_sp); \ + put_user_ex(sas_ss_flags(sp), &__uss->ss_flags); \ + put_user_ex(t->sas_ss_size, &__uss->ss_size); \ +} while (0); +#ifdef CONFIG_PROC_FS struct seq_file ;extern void render_sigset_t (struct seq_file *,const char *,sigset_t *);
include/linux/usb/hcd.h +1 -1
@@ -410,7 +410,7 @@ extern int usb_hcd_pci_probe(struct pci_dev *dev,extern void usb_hcd_pci_remove (struct pci_dev *dev);extern void usb_hcd_pci_shutdown (struct pci_dev *dev); -#ifdef CONFIG_PM_SLEEP +#ifdef CONFIG_PM extern const struct dev_pm_ops usb_hcd_pci_pm_ops;#endif #endif /* CONFIG_PCI */
include/media/v4l2-ctrls.h +1 -0
@@ -22,6 +22,7 @@#define _V4L2_CTRLS_H#include <linux/list.h> +#include <linux/mutex.h> #include <linux/videodev2.h> /* forward references */
kernel/events/uprobes.c +1 -3
@@ -1682,12 +1682,10 @@ static bool handle_trampoline(struct pt_regs *regs) tmp = ri; ri = ri->next;kfree (tmp); + utask->depth--;if (!chained)break ; - - utask->depth--; -BUG_ON (!ri); }
kernel/fork.c +4 -3
@@ -1171,10 +1171,11 @@ static struct task_struct *copy_process(unsigned long clone_flags,return ERR_PTR (-EINVAL );/* -* If the new process will be in a different pid namespace -* don't allow the creation of threads. +* If the new process will be in a different pid namespace don't +* allow it to share a thread group or signal handlers with the +* forking task. */ -if ((clone_flags & (CLONE_VM |CLONE_NEWPID )) && +if ((clone_flags & (CLONE_SIGHAND |CLONE_NEWPID )) && (task_active_pid_ns (current) != current->nsproxy->pid_ns))return ERR_PTR (-EINVAL );
kernel/pid.c +1 -0
@@ -264,6 +264,7 @@ void free_pid(struct pid *pid)struct pid_namespace *ns = upid->ns;hlist_del_rcu (&upid->pid_chain);switch (--ns->nr_hashed) { +case 2 :case 1 :/* When all that is left in the pid namespace * is the reaper wake up the reaper. The reaper
mm/huge_memory.c +2 -0
@@ -2286,6 +2286,8 @@ static void collapse_huge_page(struct mm_struct *mm, goto out; vma =find_vma (mm, address); +if (!vma) + goto out; hstart = (vma->vm_start + ~HPAGE_PMD_MASK ) &HPAGE_PMD_MASK ; hend = vma->vm_end &HPAGE_PMD_MASK ;if (address < hstart || address +HPAGE_PMD_SIZE > hend)
mm/memcontrol.c +7 -1
@@ -5584,7 +5584,13 @@ static int compare_thresholds(const void *a, const void *b)const struct mem_cgroup_threshold *_a = a;const struct mem_cgroup_threshold *_b = b; -return _a->threshold - _b->threshold; +if (_a->threshold > _b->threshold) +return 1 ; + +if (_a->threshold < _b->threshold) +return -1 ; + +return 0 ;
Lines of this file are not shown. View the raw message.
sound/pci/hda/patch_hdmi.c +42 -10
52 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.