Linux 3.10.33
Greg KH
maintainerI'm announcing the release of the 3.10.33 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
------------
Makefile | 2 arch/arm/include/asm/cacheflush.h | 1 arch/arm/include/asm/spinlock.h | 82 ++++++++++++++---------- arch/arm/mach-omap2/gpmc.c | 4 - arch/arm/mach-tegra/common.c | 11 +++ arch/arm/mm/dma-mapping.c | 2 arch/arm/mm/proc-v6.S | 3 arch/arm/mm/proc-v7.S | 2 arch/arm64/kernel/stacktrace.c | 6 + arch/avr32/Makefile | 2 arch/avr32/boards/mimc200/fram.c | 1 arch/powerpc/kernel/crash_dump.c | 8 +- arch/powerpc/platforms/pseries/hotplug-cpu.c | 22 +++--- arch/x86/kernel/cpu/perf_event.c | 3 arch/x86/kernel/pci-dma.c | 4 - arch/x86/kvm/x86.c | 2 arch/xtensa/include/asm/traps.h | 44 ++++++++---- arch/xtensa/kernel/entry.S | 60 ++++++++++++++--- drivers/acpi/pci_irq.c | 1 drivers/acpi/processor_throttling.c | 69 +++++++++----------- drivers/acpi/video.c | 8 ++ drivers/ata/ahci.c | 14 ++++ drivers/ata/libata-pmp.c | 7 +- drivers/ata/sata_sil.c | 1 drivers/cpufreq/powernow-k8.c | 10 ++ drivers/dma/ioat/dma.c | 52 +++++++++++++-- drivers/dma/ioat/dma.h | 1 drivers/dma/ioat/dma_v2.c | 11 +-- drivers/dma/ioat/dma_v3.c | 3 drivers/dma/ste_dma40.c | 4 - drivers/edac/i7300_edac.c | 38 +++++------ drivers/edac/i7core_edac.c | 9 ++ drivers/gpu/drm/nouveau/core/engine/disp/nv50.c | 2 drivers/gpu/drm/nouveau/nouveau_drm.c | 3 drivers/gpu/drm/radeon/atombios_crtc.c | 16 ++++ drivers/gpu/drm/radeon/radeon_atpx_handler.c | 3 drivers/gpu/drm/radeon/radeon_kms.c | 6 + drivers/hwmon/max1668.c | 2 drivers/iio/gyro/Kconfig | 2 drivers/iio/gyro/st_gyro.h | 1 drivers/iio/gyro/st_gyro_core.c | 9 +- drivers/iio/gyro/st_gyro_i2c.c | 1 drivers/iio/gyro/st_gyro_spi.c | 1 drivers/input/misc/arizona-haptics.c | 11 +-- drivers/irqchip/irq-metag-ext.c | 2 drivers/irqchip/irq-metag.c | 2 drivers/md/dm-mpath.c | 7 +- drivers/md/dm-thin-metadata.c | 17 ++++ drivers/md/dm-thin-metadata.h | 2 drivers/md/dm-thin.c | 8 +- drivers/misc/mei/client.c | 4 - drivers/net/bonding/bond_3ad.c | 6 - drivers/net/bonding/bond_3ad.h | 1 drivers/net/can/dev.c | 15 ---- drivers/net/can/janz-ican3.c | 18 +---- drivers/net/can/usb/kvaser_usb.c | 2 drivers/net/can/vcan.c | 9 +- drivers/net/ethernet/broadcom/tg3.c | 4 - drivers/net/usb/asix_devices.c | 3 drivers/net/usb/ax88179_178a.c | 4 + drivers/net/usb/gl620a.c | 4 + drivers/net/usb/mcs7830.c | 5 - drivers/net/usb/net1080.c | 4 + drivers/net/usb/qmi_wwan.c | 9 +- drivers/net/usb/rndis_host.c | 4 + drivers/net/usb/smsc75xx.c | 4 + drivers/net/usb/smsc95xx.c | 4 + drivers/net/usb/usbnet.c | 25 ++----- drivers/net/wireless/rtl818x/rtl8187/rtl8187.h | 10 ++ drivers/net/wireless/rtlwifi/ps.c | 2 drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 18 ++++- drivers/pci/pci.c | 10 ++ drivers/scsi/qla2xxx/qla_target.c | 3 drivers/staging/android/binder.c | 3 drivers/usb/chipidea/udc.c | 4 - drivers/usb/gadget/bcm63xx_udc.c | 58 +++++++++------- drivers/usb/host/ehci-hcd.c | 13 ++- drivers/usb/serial/ftdi_sio.c | 2 drivers/usb/serial/ftdi_sio_ids.h | 6 + drivers/usb/serial/option.c | 3 fs/attr.c | 5 - fs/btrfs/inode.c | 8 +- fs/cifs/file.c | 37 +++++++++- fs/cifs/smb2glob.h | 3 fs/cifs/smb2ops.c | 14 +--- fs/cifs/smb2pdu.c | 3 fs/ext4/ext4.h | 2 fs/ext4/inode.c | 4 + fs/ext4/ioctl.c | 3 fs/ext4/resize.c | 34 ++++++--- fs/ext4/super.c | 20 +++-- fs/quota/dquot.c | 14 +++- include/linux/can/skb.h | 38 +++++++++++ include/linux/ipc_namespace.h | 2 include/linux/netdevice.h | 7 +- include/linux/skbuff.h | 19 +++++ ipc/mq_sysctl.c | 18 +++-- ipc/mqueue.c | 6 - kernel/events/core.c | 12 +-- kernel/workqueue.c | 7 ++ mm/memcontrol.c | 4 - net/9p/trans_virtio.c | 5 + net/can/af_can.c | 3 net/can/bcm.c | 4 - net/core/dev.c | 27 ++++--- net/core/fib_rules.c | 7 ++ net/core/netpoll.c | 4 - net/core/skbuff.c | 25 +++++++ net/core/sock.c | 2 net/ieee802154/6lowpan.c | 20 +++++ net/ipv4/devinet.c | 3 net/ipv4/ip_forward.c | 71 ++++++++++++++++++++ net/ipv4/route.c | 4 - net/ipv4/tcp_output.c | 13 +++ net/ipv6/ip6_output.c | 17 ++++ net/sctp/socket.c | 41 +++++++++--- net/sunrpc/xprtsock.c | 6 + security/selinux/ss/policydb.c | 8 +- sound/pci/hda/patch_ca0132.c | 68 ++----------------- sound/pci/hda/patch_sigmatel.c | 33 +++++++++ sound/soc/codecs/da732x.c | 12 +++ sound/soc/codecs/max98090.c | 20 ++--- sound/soc/codecs/sta32x.c | 76 +++++++++++----------- sound/soc/codecs/wm8770.c | 4 - sound/soc/codecs/wm8958-dsp2.c | 2 sound/usb/mixer_maps.c | 9 ++ 126 files changed, 1078 insertions(+), 505 deletions(-)
Aleksander Morgado (1):
USB: serial: option: blacklist interface 4 for Cinterion PHS8 and PXS8
Alex Deucher (2):
drm/radeon: print the supported atpx function mask drm/radeon: disable pll sharing for DP on DCE4.1
Andrew Honig (1):
kvm: x86: fix emulator buffer overflow (CVE-2014-0049)
Arve Hjønnevåg (1):
staging: binder: Fix death notifications
Bjorn Helgaas (1):
PCI: Enable INTx if BIOS left them disabled
Bjørn Mork (1):
net: qmi_wwan: add Netgear Aircard 340U
Chao Bi (1):
mei: set client's read_cb to NULL when flow control fails
Charles Keepax (1):
Input - arizona-haptics: Fix double lock of dapm_mutex
Chen Gang (1):
avr32: Makefile: add '-D__linux__' flag for gcc-4.4.7 use
Christian König (1):
drm/radeon: fix missing bo reservation
Christoph Hellwig (1):
fs: fix iversion handling
Clemens Ladisch (1):
ALSA: usb-audio: work around KEF X300A firmware bug
Dan Williams (1):
ioat: fix tasklet tear down
Daniel Borkmann (1):
net: sctp: fix sctp_connectx abi for ia32 emulation/compat mode
Davidlohr Bueso (1):
ipc,mqueue: remove limits for the amount of system-wide queues
Denis CIOCCA (1):
iio:gyro: bug on L3GD20H gyroscope support
Denis V. Lunev (1):
ata: enable quirk from jmicron JMB350 for JMB394
Dr. Greg Wettstein (1):
qla2xxx: Fix kernel panic on selective retransmission request
Duan Jiong (1):
ipv4: fix counter in_slow_tot
Dylan Reid (1):
ASoC: max98090: sync regcache on entering STANDBY
Emil Goode (2):
net: asix: add missing flag to struct driver_info
usbnet: remove generic hard_header_len check
Eric Dumazet (2):
6lowpan: fix lockdep splats
net: use __GFP_NORETRY for high order allocations
Eric Paris (1):
SELinux: bigendian problems with filename trans rules
Florian Fainelli (1):
usb: gadget: bcm63xx_udc: fix build failure on DMA channel code
Florian Westphal (3):
net: add and use skb_gso_transport_seglen()
net: core: introduce netif_skb_dev_features
net: ip, ipv6: handle gso skbs in forwarding path
Geert Uytterhoeven (1):
ipv4: Fix runtime WARNING in rtmsg_ifa()
Greg Kroah-Hartman (1):
Linux 3.10.33
Guenter Roeck (1):
hwmon: (max1668) Fix writing the minimum temperature
Hannes Reinecke (1):
dm mpath: fix stalls when handling invalid ioctls
Hans de Goede (1):
ACPI / video: Filter the _BCL table for duplicate brightness values
Hsin-Yu Chao (2):
ALSA: hda/ca0132 - setup/cleanup streams
ALSA: hda/ca0132 - Fix recording from mode id 0x8
Hui Wang (1):
ALSA: hda - Enable front audio jacks on one HP desktop model
Ilia Mirkin (2):
drm/nouveau: set irq_enabled manually
drm/nv50/disp: use correct register to determine DP display bpp
James Hogan (1):
irq-metag*: stop set_affinity vectoring to offline cpus
Jan Kara (1):
quota: Fix race between dqput() and dquot_scan_active()
Jean Delvare (2):
i7core_edac: Fix PCI device reference count
i7300_edac: Fix device reference count
Jeff Layton (1):
cifs: ensure that uncached writes handle unmapped areas correctly
Jiri Bohac (1):
bonding: 802.3ad: make aggregator_identifier bond-private
Joerg Dorchain (1):
USB: ftdi_sio: add Cressi Leonardo PID
John Ogness (1):
tcp: tsq: fix nonagle handling
Lai Jiangshan (1):
workqueue: ensure @task is valid across kthread_stop()
Lan Tianyu (1):
ACPI / processor: Rework processor throttling with work_on_cpu()
Lars-Peter Clausen (2):
ASoC: sta32x: Fix cache sync
ASoC: wm8958-dsp: Fix firmware block loading
Laurent Dufour (1):
powerpc/crashdump : Fix page frame number check in copy_oldmem_page
Levente Kurusa (1):
ahci: disable NCQ on Samsung pci-e SSDs on macbooks
Linus Walleij (1):
dma: ste_dma40: don't dereference free:d descriptor
Maciej Żenczykowski (1):
net: fix 'ip rule' iif/oif device rename
Marek Szyprowski (2):
ARM: dma-mapping: fix GFP_ATOMIC macro usage
x86: dma-mapping: fix GFP_ATOMIC macro usage
Mark Brown (1):
ASoC: da732x: Mark DC offset control registers volatile
Matthieu CASTET (1):
usb: chipidea: need to mask when writting endptflush and endptprime
Max Filippov (1):
xtensa: introduce spill_registers_kernel macro
Michal Hocko (1):
memcg: fix endless loop caused by mem_cgroup_iter
Mike Snitzer (2):
dm thin: avoid metadata commit if a pool's thin devices haven't changed dm thin: fix the error path for the thin device constructor
Nithin Sujir (1):
tg3: Fix deadlock in tg3_change_mtu()
Oliver Hartkopp (1):
can: add destructor for self generated skbs
Olivier Langlois (2):
rtlwifi: Fix incorrect return from rtl_ps_enable_nic()
rtlwifi: rtl8192ce: Fix too long disable of IRQs
Olivier Sobrie (1):
can: kvaser_usb: check number of channels returned by HW
Olof Johansson (1):
ARM64: unwind: Fix PC calculation
Paul Gortmaker (1):
avr32: fix missing module.h causing build failure in mimc200/fram.c
Pavel Shilovsky (1):
CIFS: Fix too big maxBuf size for SMB3 mounts
Pekon Gupta (2):
ARM: OMAP2+: gpmc: fix: DT NAND child nodes not probed when MTD_NAND is built as module
ARM: OMAP2+: gpmc: fix: DT ONENAND child nodes not probed when MTD_ONENAND is built as module
Peter Zijlstra (2):
perf/x86: Fix event scheduling
perf: Fix hotplug splat
Richard Yao (1):
9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers
Sabrina Dubroca (1):
netpoll: fix netconsole IPv6 setup
Srivatsa S. Bhat (1):
cpufreq: powernow-k8: Initialize per-cpu data-structures properly
Stanislaw Gruszka (2):
rtl8187: fix regression on MIPS without coherent DMA
usb: ehci: fix deadlock when threadirqs option is used
Stephen Warren (1):
ARM: tegra: only run PL310 init on systems with one
Takashi Iwai (4):
ASoC: wm8770: Fix wrong number of enum items
ASoC: sta32x: Fix wrong enum for limiter2 release rate
ASoC: sta32x: Fix array access overflow
ALSA: hda - Add a fixup for HP Folio 13 mute LED
Tejun Heo (1):
sata_sil: apply MOD15WRITE quirk to TOSHIBA MK2561GSYN
Theodore Ts'o (4):
ext4: don't try to modify s_flags if the the file system is read-only
ext4: fix online resize with very large inode tables
ext4: fix online resize with a non-standard blocks per group setting
ext4: don't leave i_crtime.tv_sec uninitialized
Tomasz Nowicki (1):
ACPI / PCI: Fix memory leak in acpi_pci_irq_enable()
Tony Breeds (1):
powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly
Trond Myklebust (1):
SUNRPC: Fix races in xs_nospace()
Vinayak Kale (1):
ARM: 7957/1: add DSB after icache flush in __flush_icache_all()
Will Deacon (3):
ARM: 7953/1: mm: ensure TLB invalidation is complete before enabling MMU
ARM: 7749/1: spinlock: retry trylock operation if strex fails on free lock
ARM: 7812/1: rwlocks: retry trylock operation if strex fails on free lock
Zheng Liu (1):
ext4: fix error paths in swap_inode_boot_loader()
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 10 -SUBLEVEL = 32 +SUBLEVEL = 33 EXTRAVERSION = NAME = TOSSUG Baby Fish
arch/arm/include/asm/cacheflush.h +1 -0
@@ -212,6 +212,7 @@ extern void copy_to_user_page(struct vm_area_struct *, struct page *,static inline void __flush_icache_all (void ) {__flush_icache_preferred (); +dsb (); }/*
arch/arm/include/asm/spinlock.h +48 -34
102 lines not on this page · raw message
arch/arm/mach-omap2/gpmc.c +2 -2
@@ -1335,7 +1335,7 @@ static void __maybe_unused gpmc_read_timings_dt(struct device_node *np,of_property_read_bool (np,"gpmc,time-para-granularity" ); } -#ifdef CONFIG_MTD_NAND +#if IS_ENABLED (CONFIG_MTD_NAND )static const char *const nand_ecc_opts[] = { [OMAP_ECC_HAMMING_CODE_DEFAULT] = "sw",
@@ -1391,7 +1391,7 @@ static int gpmc_probe_nand_child(struct platform_device *pdev, }#endif -#ifdef CONFIG_MTD_ONENAND +#if IS_ENABLED (CONFIG_MTD_ONENAND )static int gpmc_probe_onenand_child (struct platform_device *pdev,struct device_node *child) {
arch/arm/mach-tegra/common.c +11 -0
@@ -22,6 +22,7 @@#include <linux/io.h> #include <linux/clk.h> #include <linux/delay.h> +#include <linux/of.h> #include <linux/irqchip.h> #include <linux/clk/tegra.h>
@@ -80,10 +81,20 @@ void tegra_assert_system_reset(char mode, const char *cmd)static void __init tegra_init_cache (void ) {#ifdef CONFIG_CACHE_L2X0 +static const struct of_device_id pl310_ids[]__initconst = { + { .compatible ="arm,pl310-cache" , }, + {} + }; + +struct device_node *np;int ret;void __iomem *p =IO_ADDRESS (TEGRA_ARM_PERIF_BASE ) +0x3000 ;u32 aux_ctrl, cache_type; + np =of_find_matching_node (NULL , pl310_ids); +if (!np) +return ; + cache_type =readl (p +L2X0_CACHE_TYPE ); aux_ctrl = (cache_type &0x700 ) << (17 -8 ); aux_ctrl |=0x7C400001 ;
arch/arm/mm/dma-mapping.c +1 -1
@@ -1311,7 +1311,7 @@ static void *arm_iommu_alloc_attrs(struct device *dev, size_t size, *handle =DMA_ERROR_CODE ; size =PAGE_ALIGN (size); -if (gfp &GFP_ATOMIC ) +if (!(gfp & __GFP_WAIT))return __iommu_alloc_atomic (dev, size, handle); pages =__iommu_alloc_buffer (dev, size, gfp, attrs);
arch/arm/mm/proc-v6.S +2 -1
@@ -206,7 +206,6 @@ __v6_setup: mcr p15, 0, r0, c7, c14, 0 @ clean+invalidate D cache mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache mcr p15, 0, r0, c7, c15, 0 @ clean+invalidate cache - mcr p15, 0, r0, c7, c10, 4 @ drain write buffer #ifdef CONFIG_MMU mcr p15, 0, r0, c8, c7, 0 @ invalidate I + D TLBs mcr p15, 0, r0, c2, c0, 2 @ TTB control register
@@ -216,6 +215,8 @@ __v6_setup: ALT_UP(orr r8, r8, #TTB_FLAGS_UP) mcr p15, 0, r8, c2, c0, 1 @ load TTB1 #endif /* CONFIG_MMU */ + mcr p15, 0, r0, c7, c10, 4 @ drain write buffer and + @ complete invalidations adr r5, v6_crval ldmia r5, {r5, r6} #ifdef CONFIG_CPU_ENDIAN_BE8
arch/arm/mm/proc-v7.S +1 -1
@@ -329,7 +329,6 @@ __v7_setup: 3: mov r10, #0 mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate - dsb #ifdef CONFIG_MMU mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs v7_ttb_setup r10, r4, r8, r5 @ TTBCR, TTBRx setup
@@ -338,6 +337,7 @@ __v7_setup: mcr p15, 0, r5, c10, c2, 0 @ write PRRR mcr p15, 0, r6, c10, c2, 1 @ write NMRR #endif + dsb @ Complete invalidations #ifndef CONFIG_ARM_THUMBEE mrc p15, 0, r0, c0, c1, 0 @ read ID_PFR0 for ThumbEE and r0, r0, #(0xf << 12) @ ThumbEE enabled field
arch/arm64/kernel/stacktrace.c +5 -1
@@ -48,7 +48,11 @@ int unwind_frame(struct stackframe *frame) frame->sp = fp +0x10 ; frame->fp = *(unsigned long *)(fp); - frame->pc = *(unsigned long *)(fp +8 ); +/* +* -4 here because we care about the PC at time of bl, +* not where the return will go. +*/ + frame->pc = *(unsigned long *)(fp +8 ) -4 ;return 0 ; }
arch/avr32/Makefile +1 -1
@@ -11,7 +11,7 @@ all: uImage vmlinux.elf KBUILD_DEFCONFIG := atstk1002_defconfig -KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic +KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic -D__linux__ KBUILD_AFLAGS += -mrelax -mno-pic KBUILD_CFLAGS_MODULE += -mno-relax LDFLAGS_vmlinux += --relax
arch/avr32/boards/mimc200/fram.c +1 -0
@@ -11,6 +11,7 @@#define FRAM_VERSION "1.0"#include <linux/miscdevice.h> +#include <linux/module.h> #include <linux/proc_fs.h> #include <linux/mm.h> #include <linux/io.h>
arch/powerpc/kernel/crash_dump.c +5 -3
@@ -108,17 +108,19 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf, size_t csize, unsigned long offset, int userbuf) { void *vaddr; +phys_addr_t paddr;if (!csize)return 0 ; csize =min_t (size_t, csize,PAGE_SIZE ); + paddr = pfn <<PAGE_SHIFT ; -if ((min_low_pfn < pfn) && (pfn < max_pfn)) { - vaddr =__va (pfn <<PAGE_SHIFT ); +if (memblock_is_region_memory (paddr, csize)) { + vaddr =__va (paddr); csize =copy_oldmem_vaddr (vaddr, buf, csize, offset, userbuf); }else { - vaddr =__ioremap (pfn <<PAGE_SHIFT ,PAGE_SIZE ,0 ); + vaddr =__ioremap (paddr,PAGE_SIZE ,0 ); csize =copy_oldmem_vaddr (vaddr, buf, csize, offset, userbuf);iounmap (vaddr); }
arch/powerpc/platforms/pseries/hotplug-cpu.c +11 -11
@@ -34,12 +34,7 @@#include "offline_states.h" /* This version can't take the spinlock, because it never returns */ -static struct rtas_args rtas_stop_self_args = { - .token =RTAS_UNKNOWN_SERVICE , - .nargs =0 , - .nret =1 , - .rets = &rtas_stop_self_args.args[0 ], -}; +static int rtas_stop_self_token =RTAS_UNKNOWN_SERVICE ; static DEFINE_PER_CPU(enum cpu_state_vals, preferred_offline_state) =CPU_STATE_OFFLINE ;
@@ -92,15 +87,20 @@ void set_default_offline_state(int cpu)static void rtas_stop_self (void ) { -struct rtas_args *args = &rtas_stop_self_args; +struct rtas_args args = { + .token =cpu_to_be32 (rtas_stop_self_token), + .nargs =0 , + .nret =1 , + .rets = &args.args[0 ], + };local_irq_disable (); -BUG_ON (args->token ==RTAS_UNKNOWN_SERVICE ); +BUG_ON (rtas_stop_self_token ==RTAS_UNKNOWN_SERVICE );printk ("cpu %u (hwid %u) Ready to die...\n" ,smp_processor_id (),hard_smp_processor_id ()); -enter_rtas (__pa (args)); +enter_rtas (__pa (&args));panic ("Alas, I survived.\n" ); }
@@ -391,10 +391,10 @@ static int __init pseries_cpu_hotplug_init(void) } } - rtas_stop_self_args.token =rtas_token ("stop-self" ); + rtas_stop_self_token =rtas_token ("stop-self" ); qcss_tok =rtas_token ("query-cpu-stopped-state" ); -if (rtas_stop_self_args.token ==RTAS_UNKNOWN_SERVICE || +if (rtas_stop_self_token ==RTAS_UNKNOWN_SERVICE || qcss_tok ==RTAS_UNKNOWN_SERVICE ) {printk (KERN_INFO "CPU Hotplug not supported by firmware " "- disabling.\n" );
arch/x86/kernel/cpu/perf_event.c +3 -0
@@ -1165,6 +1165,9 @@ static void x86_pmu_del(struct perf_event *event, int flags)for (i =0 ; i < cpuc->n_events; i++) {if (event == cpuc->event_list[i]) { +if (i >= cpuc->n_events - cpuc->n_added) + --cpuc->n_added; +if (x86_pmu.put_event_constraints) x86_pmu.put_event_constraints (cpuc, event);
arch/x86/kernel/pci-dma.c +3 -1
@@ -100,8 +100,10 @@ void *dma_generic_alloc_coherent(struct device *dev, size_t size, flag |= __GFP_ZERO; again: page =NULL ; -if (!(flag &GFP_ATOMIC )) +/* CMA can be used only in the context which permits sleeping */ +if (flag & __GFP_WAIT) page =dma_alloc_from_contiguous (dev, count,get_order (size)); +/* fallback */ if (!page) page =alloc_pages_node (dev_to_node (dev), flag,get_order (size));if (!page)
arch/x86/kvm/x86.c +1 -1
@@ -5982,7 +5982,7 @@ static int complete_emulated_mmio(struct kvm_vcpu *vcpu) frag->len -= len; } -if (vcpu->mmio_cur_fragment == vcpu->mmio_nr_fragments) { +if (vcpu->mmio_cur_fragment >= vcpu->mmio_nr_fragments) { vcpu->mmio_needed =0 ;if (vcpu->mmio_is_write)return 1 ;
arch/xtensa/include/asm/traps.h +28 -16
53 lines not on this page · raw message
arch/xtensa/kernel/entry.S +48 -12
95 lines not on this page · raw message
drivers/acpi/pci_irq.c +1 -0
@@ -432,6 +432,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev) pin_name(pin)); } +kfree (entry);return 0 ; }
drivers/acpi/processor_throttling.c +32 -37
136 lines not on this page · raw message
drivers/acpi/video.c +7 -1
@@ -733,6 +733,7 @@ acpi_video_init_brightness(struct acpi_video_device *device)union acpi_object *o;struct acpi_video_device_brightness *br =NULL ;int result = -EINVAL ; +u32 value;if (!ACPI_SUCCESS (acpi_video_device_lcd_query_levels (device, &obj))) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Could not query available "
@@ -763,7 +764,12 @@ acpi_video_init_brightness(struct acpi_video_device *device) printk(KERN_ERR PREFIX "Invalid data\n");continue ; } - br->levels[count] = (u32 ) o->integer.value; + value = (u32 ) o->integer.value; +/* Skip duplicate entries */ +if (count >2 && br->levels[count -1 ] == value) +continue ; + + br->levels[count] = value;if (br->levels[count] > max_level) max_level = br->levels[count];
drivers/ata/ahci.c +14 -0
@@ -61,6 +61,7 @@ enum board_ids {/* board IDs by feature in alphabetical order */ board_ahci, board_ahci_ign_iferr, + board_ahci_noncq, board_ahci_nosntf, board_ahci_yes_fbs,
@@ -119,6 +120,13 @@ static const struct ata_port_info ahci_port_info[] = { .udma_mask = ATA_UDMA6, .port_ops = &ahci_ops, }, + [board_ahci_noncq] = { + AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ), + .flags = AHCI_FLAG_COMMON, + .pio_mask = ATA_PIO4, + .udma_mask = ATA_UDMA6, + .port_ops = &ahci_ops, + }, [board_ahci_nosntf] = { AHCI_HFLAGS (AHCI_HFLAG_NO_SNTF), .flags = AHCI_FLAG_COMMON,
@@ -450,6 +458,12 @@ static const struct pci_device_id ahci_pci_tbl[] = { { PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */ { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */ +/* +* Samsung SSDs found on some macbooks. NCQ times out. +* https://bugzilla.kernel.org/show_bug.cgi?id=60731 +*/ + { PCI_VDEVICE(SAMSUNG, 0x1600), board_ahci_noncq }, +/* Enmotus */ { PCI_DEVICE(0x1c44, 0x8000), board_ahci },
drivers/ata/libata-pmp.c +5 -2
@@ -447,8 +447,11 @@ static void sata_pmp_quirks(struct ata_port *ap)* otherwise. Don't try hard to recover it. */ ap->pmp_link[ap->nr_pmp_links -1 ].flags |=ATA_LFLAG_NO_RETRY ; - }else if (vendor ==0x197b && devid ==0x2352 ) { -/* chip found in Thermaltake BlackX Duet, jmicron JMB350? */ + }else if (vendor ==0x197b && (devid ==0x2352 || devid ==0x0325 )) { +/* +* 0x2352: found in Thermaltake BlackX Duet, jmicron JMB350? +* 0x0325: jmicron JMB394. +*/ ata_for_each_link (link, ap,EDGE ) {/* SRST breaks detection and disks get misclassified * LPM disabled to avoid potential problems
drivers/ata/sata_sil.c +1 -0
@@ -157,6 +157,7 @@ static const struct sil_drivelist { { "ST380011ASL", SIL_QUIRK_MOD15WRITE }, { "ST3120022ASL", SIL_QUIRK_MOD15WRITE }, { "ST3160021ASL", SIL_QUIRK_MOD15WRITE }, + { "TOSHIBA MK2561GSYN", SIL_QUIRK_MOD15WRITE }, { "Maxtor 4D060H3", SIL_QUIRK_UDMA5MAX }, { } };
drivers/cpufreq/powernow-k8.c +7 -3
@@ -1100,7 +1100,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) {struct powernow_k8_data *data;struct init_on_cpu init_on_cpu; -int rc; +int rc, cpu;smp_call_function_single (pol->cpu, check_supported_cpu, &rc,1 );if (rc)
@@ -1169,7 +1169,9 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)pr_debug ("cpu_init done, current fid 0x%x, vid 0x%x\n" , data->currfid, data->currvid); -per_cpu (powernow_data, pol->cpu) = data; +/* Point all the CPUs in this policy to the same data */ +for_each_cpu (cpu, pol->cpus) +per_cpu (powernow_data, cpu) = data;return 0 ;
@@ -1184,6 +1186,7 @@ err_out:static int powernowk8_cpu_exit (struct cpufreq_policy *pol) {struct powernow_k8_data *data =per_cpu (powernow_data, pol->cpu); +int cpu;if (!data)return -EINVAL ;
@@ -1194,7 +1197,8 @@ static int powernowk8_cpu_exit(struct cpufreq_policy *pol)kfree (data->powernow_table);kfree (data); -per_cpu (powernow_data, pol->cpu) =NULL ; +for_each_cpu (cpu, pol->cpus) +per_cpu (powernow_data, cpu) =NULL ;return 0 ; }
drivers/dma/ioat/dma.c +45 -7
96 lines not on this page · raw message
drivers/dma/ioat/dma.h +1 -0
@@ -370,6 +370,7 @@ bool ioat_cleanup_preamble(struct ioat_chan_common *chan,void ioat_kobject_add (struct ioatdma_device *device,struct kobj_type *type);void ioat_kobject_del (struct ioatdma_device *device);int ioat_dma_setup_interrupts (struct ioatdma_device *device); +void ioat_stop (struct ioat_chan_common *chan);extern const struct sysfs_ops ioat_sysfs_ops;extern struct ioat_sysfs_entry ioat_version_attr;extern struct ioat_sysfs_entry ioat_cap_attr;
drivers/dma/ioat/dma_v2.c +5 -6
@@ -190,8 +190,11 @@ static void ioat2_cleanup(struct ioat2_dma_chan *ioat)void ioat2_cleanup_event (unsigned long data) {struct ioat2_dma_chan *ioat =to_ioat2_chan ((void *) data); +struct ioat_chan_common *chan = &ioat->base;ioat2_cleanup (ioat); +if (!test_bit (IOAT_RUN , &chan->state)) +return ;writew (IOAT_CHANCTRL_RUN , ioat->base.reg_base +IOAT_CHANCTRL_OFFSET ); }
@@ -553,10 +556,10 @@ int ioat2_alloc_chan_resources(struct dma_chan *c) ioat->issued =0 ; ioat->tail =0 ; ioat->alloc_order = order; +set_bit (IOAT_RUN , &chan->state);spin_unlock_bh (&ioat->prep_lock);spin_unlock_bh (&chan->cleanup_lock); -tasklet_enable (&chan->cleanup_task);ioat2_start_null_desc (ioat);/* check that we got off the ground */
@@ -566,7 +569,6 @@ int ioat2_alloc_chan_resources(struct dma_chan *c) }while (i++ <20 && !is_ioat_active (status) && !is_ioat_idle (status));if (is_ioat_active (status) ||is_ioat_idle (status)) { -set_bit (IOAT_RUN , &chan->state);return 1 << ioat->alloc_order; }else {u32 chanerr =readl (chan->reg_base +IOAT_CHANERR_OFFSET );
@@ -809,11 +811,8 @@ void ioat2_free_chan_resources(struct dma_chan *c)if (!ioat->ring)return ; -tasklet_disable (&chan->cleanup_task); -del_timer_sync (&chan->timer); - device->cleanup_fn ((unsigned long ) c); +ioat_stop (chan); device->reset_hw (chan); -clear_bit (IOAT_RUN , &chan->state);spin_lock_bh (&chan->cleanup_lock);spin_lock_bh (&ioat->prep_lock);
drivers/dma/ioat/dma_v3.c +3 -0
@@ -635,8 +635,11 @@ static void ioat3_cleanup(struct ioat2_dma_chan *ioat)static void ioat3_cleanup_event (unsigned long data) {struct ioat2_dma_chan *ioat =to_ioat2_chan ((void *) data); +struct ioat_chan_common *chan = &ioat->base;ioat3_cleanup (ioat); +if (!test_bit (IOAT_RUN , &chan->state)) +return ;writew (IOAT_CHANCTRL_RUN , ioat->base.reg_base +IOAT_CHANCTRL_OFFSET ); }
drivers/dma/ste_dma40.c +3 -1
@@ -1587,6 +1587,7 @@ static void dma_tasklet(unsigned long data)struct d40_chan *d40c = (struct d40_chan *) data;struct d40_desc *d40d;unsigned long flags; +bool callback_active;dma_async_tx_callback callback;void *callback_param;
@@ -1614,6 +1615,7 @@ static void dma_tasklet(unsigned long data) }/* Callback to client */ + callback_active = !!(d40d->txd.flags &DMA_PREP_INTERRUPT ); callback = d40d->txd.callback; callback_param = d40d->txd.callback_param;
@@ -1636,7 +1638,7 @@ static void dma_tasklet(unsigned long data)spin_unlock_irqrestore (&d40c->lock, flags); -if (callback && (d40d->txd.flags &DMA_PREP_INTERRUPT )) +if (callback_active && callback)callback (callback_param);return ;
drivers/edac/i7300_edac.c +20 -18
@@ -943,33 +943,35 @@ static int i7300_get_devices(struct mem_ctl_info *mci)/* Attempt to 'get' the MCH register we want */ pdev =NULL ; -while (!pvt->pci_dev_16_1_fsb_addr_map || - !pvt->pci_dev_16_2_fsb_err_regs) { - pdev =pci_get_device (PCI_VENDOR_ID_INTEL , -PCI_DEVICE_ID_INTEL_I7300_MCH_ERR , pdev); -if (!pdev) { -/* End of list, leave */ -i7300_printk (KERN_ERR , -"'system address,Process Bus' " -"device not found:" -"vendor 0x%x device 0x%x ERR funcs " -"(broken BIOS?)\n" , -PCI_VENDOR_ID_INTEL , -PCI_DEVICE_ID_INTEL_I7300_MCH_ERR ); - goto error; - } - +while ((pdev =pci_get_device (PCI_VENDOR_ID_INTEL , +PCI_DEVICE_ID_INTEL_I7300_MCH_ERR , + pdev))) {/* Store device 16 funcs 1 and 2 */ switch (PCI_FUNC (pdev->devfn)) {case 1 : - pvt->pci_dev_16_1_fsb_addr_map = pdev; +if (!pvt->pci_dev_16_1_fsb_addr_map) + pvt->pci_dev_16_1_fsb_addr_map = +pci_dev_get (pdev);break ;case 2 : - pvt->pci_dev_16_2_fsb_err_regs = pdev; +if (!pvt->pci_dev_16_2_fsb_err_regs) + pvt->pci_dev_16_2_fsb_err_regs = +pci_dev_get (pdev);break ; } } +if (!pvt->pci_dev_16_1_fsb_addr_map || + !pvt->pci_dev_16_2_fsb_err_regs) { +/* At least one device was not found */ +i7300_printk (KERN_ERR , +"'system address,Process Bus' device not found:" +"vendor 0x%x device 0x%x ERR funcs (broken BIOS?)\n" , +PCI_VENDOR_ID_INTEL , +PCI_DEVICE_ID_INTEL_I7300_MCH_ERR ); + goto error; + } + edac_dbg(1, "System Address, processor bus- PCI Bus ID: %s %x:%x\n", pci_name(pvt->pci_dev_16_0_fsb_ctlr), pvt->pci_dev_16_0_fsb_ctlr->vendor,
drivers/edac/i7core_edac.c +7 -2
@@ -1334,14 +1334,19 @@ static int i7core_get_onedevice(struct pci_dev **prev,* is at addr 8086:2c40, instead of 8086:2c41. So, we need * to probe for the alternate address in case of failure */ -if (dev_descr->dev_id ==PCI_DEVICE_ID_INTEL_I7_NONCORE && !pdev) +if (dev_descr->dev_id ==PCI_DEVICE_ID_INTEL_I7_NONCORE && !pdev) { +pci_dev_get (*prev);/* pci_get_device will put it */ pdev =pci_get_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_I7_NONCORE_ALT , *prev); + } -if (dev_descr->dev_id ==PCI_DEVICE_ID_INTEL_LYNNFIELD_NONCORE && !pdev) +if (dev_descr->dev_id ==PCI_DEVICE_ID_INTEL_LYNNFIELD_NONCORE && + !pdev) { +pci_dev_get (*prev);/* pci_get_device will put it */ pdev =pci_get_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_LYNNFIELD_NONCORE_ALT , *prev); + }if (!pdev) {if (*prev) {
drivers/gpu/drm/nouveau/core/engine/disp/nv50.c +1 -1
@@ -1112,7 +1112,7 @@ nv50_disp_intr_unk20_2(struct nv50_disp_priv *priv, int head)if (conf != ~0 ) {if (outp.location ==0 && outp.type ==DCB_OUTPUT_DP ) {u32 soff = (ffs (outp.or) -1 ) *0x08 ; -u32 ctrl =nv_rd32 (priv,0x610798 + soff); +u32 ctrl =nv_rd32 (priv,0x610794 + soff);u32 datarate;switch ((ctrl &0x000f0000 ) >>16 ) {
drivers/gpu/drm/nouveau/nouveau_drm.c +3 -0
@@ -339,6 +339,8 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags)if (ret) goto fail_device; + dev->irq_enabled = true; +/* workaround an odd issue on nvc1 by disabling the device's * nosnoop capability. hopefully won't cause issues until a * better fix is found - assuming there is one...
@@ -426,6 +428,7 @@ nouveau_drm_remove(struct pci_dev *pdev)struct nouveau_drm *drm =nouveau_drm (dev);struct nouveau_object *device; + dev->irq_enabled = false; device = drm->client.base.device;drm_put_dev (dev);
drivers/gpu/drm/radeon/atombios_crtc.c +15 -1
@@ -1661,6 +1661,20 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc)return ATOM_PPLL1 ;DRM_ERROR ("unable to allocate a PPLL\n" );return ATOM_PPLL_INVALID ; + }else if (ASIC_IS_DCE41 (rdev)) { +/* Don't share PLLs on DCE4.1 chips */ +if (ENCODER_MODE_IS_DP (atombios_get_encoder_mode (radeon_crtc->encoder))) { +if (rdev->clock.dp_extclk) +/* skip PPLL programming if using ext clock */ +return ATOM_PPLL_INVALID ; + } + pll_in_use =radeon_get_pll_use_mask (crtc); +if (!(pll_in_use & (1 <<ATOM_PPLL1 ))) +return ATOM_PPLL1 ; +if (!(pll_in_use & (1 <<ATOM_PPLL2 ))) +return ATOM_PPLL2 ; +DRM_ERROR ("unable to allocate a PPLL\n" ); +return ATOM_PPLL_INVALID ; }else if (ASIC_IS_DCE4 (rdev)) {/* in DP mode, the DP ref clock can come from PPLL, DCPLL, or ext clock, * depending on the asic:
@@ -1688,7 +1702,7 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc)if (pll !=ATOM_PPLL_INVALID )return pll; } - }else if (!ASIC_IS_DCE41 (rdev)) {/* Don't share PLLs on DCE4.1 chips */ + }else {/* use the same PPLL for all monitors with the same clock */ pll =radeon_get_shared_nondp_ppll (crtc);if (pll !=ATOM_PPLL_INVALID )
drivers/gpu/drm/radeon/radeon_atpx_handler.c +2 -1
@@ -215,7 +215,8 @@ static int radeon_atpx_verify_interface(struct radeon_atpx *atpx)memcpy (&output, info->buffer.pointer, size);/* TODO: check version? */ -printk ("ATPX version %u\n" , output.version); +printk ("ATPX version %u, functions 0x%08x\n" , + output.version, output.function_bits);radeon_atpx_parse_functions (&atpx->functions, output.function_bits);
drivers/gpu/drm/radeon/radeon_kms.c +6 -0
@@ -485,6 +485,10 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)radeon_vm_init (rdev, &fpriv->vm); + r =radeon_bo_reserve (rdev->ring_tmp_bo.bo, false); +if (r) +return r; +/* map the ib pool buffer read only into * virtual address space */ bo_va = radeon_vm_bo_add(rdev, &fpriv->vm,
@@ -492,6 +496,8 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) r =radeon_vm_bo_set_addr (rdev, bo_va,RADEON_VA_IB_OFFSET ,RADEON_VM_PAGE_READABLE |RADEON_VM_PAGE_SNOOPED ); + +radeon_bo_unreserve (rdev->ring_tmp_bo.bo);if (r) {radeon_vm_fini (rdev, &fpriv->vm);kfree (fpriv);
drivers/hwmon/max1668.c +1 -1
@@ -243,7 +243,7 @@ static ssize_t set_temp_min(struct device *dev, data->temp_min[index] =clamp_val (temp/1000 ,-128 ,127 );if (i2c_smbus_write_byte_data (client,MAX1668_REG_LIML_WR (index), - data->temp_max[index])) + data->temp_min[index])) count = -EIO ;mutex_unlock (&data->update_lock);
drivers/iio/gyro/Kconfig +1 -1
@@ -50,7 +50,7 @@ config IIO_ST_GYRO_3AXIS select IIO_ST_GYRO_BUFFER if (IIO_TRIGGERED_BUFFER) help Say yes here to build support for STMicroelectronics gyroscopes: - L3G4200D, LSM330DL, L3GD20, L3GD20H, LSM330DLC, L3G4IS, LSM330. + L3G4200D, LSM330DL, L3GD20, LSM330DLC, L3G4IS, LSM330. This driver can also be built as a module. If so, will be created these modules:
drivers/iio/gyro/st_gyro.h +0 -1
@@ -19,7 +19,6 @@#define LSM330DL_GYRO_DEV_NAME "lsm330dl_gyro"#define LSM330DLC_GYRO_DEV_NAME "lsm330dlc_gyro"#define L3GD20_GYRO_DEV_NAME "l3gd20" -#define L3GD20H_GYRO_DEV_NAME "l3gd20h"#define L3G4IS_GYRO_DEV_NAME "l3g4is_ui"#define LSM330_GYRO_DEV_NAME "lsm330_gyro"
drivers/iio/gyro/st_gyro_core.c +4 -5
@@ -162,11 +162,10 @@ static const struct st_sensors st_gyro_sensors[] = { .wai = ST_GYRO_2_WAI_EXP, .sensors_supported = { [0] = L3GD20_GYRO_DEV_NAME, - [1] = L3GD20H_GYRO_DEV_NAME, - [2] = LSM330D_GYRO_DEV_NAME, - [3] = LSM330DLC_GYRO_DEV_NAME, - [4] = L3G4IS_GYRO_DEV_NAME, - [5] = LSM330_GYRO_DEV_NAME, + [1] = LSM330D_GYRO_DEV_NAME, + [2] = LSM330DLC_GYRO_DEV_NAME, + [3] = L3G4IS_GYRO_DEV_NAME, + [4] = LSM330_GYRO_DEV_NAME, }, .ch = (struct iio_chan_spec *)st_gyro_16bit_channels, .odr = {
drivers/iio/gyro/st_gyro_i2c.c +0 -1
@@ -61,7 +61,6 @@ static const struct i2c_device_id st_gyro_id_table[] = { { LSM330DL_GYRO_DEV_NAME }, { LSM330DLC_GYRO_DEV_NAME }, { L3GD20_GYRO_DEV_NAME }, - { L3GD20H_GYRO_DEV_NAME }, { L3G4IS_GYRO_DEV_NAME }, { LSM330_GYRO_DEV_NAME }, {},
drivers/iio/gyro/st_gyro_spi.c +0 -1
@@ -60,7 +60,6 @@ static const struct spi_device_id st_gyro_id_table[] = { { LSM330DL_GYRO_DEV_NAME }, { LSM330DLC_GYRO_DEV_NAME }, { L3GD20_GYRO_DEV_NAME }, - { L3GD20H_GYRO_DEV_NAME }, { L3G4IS_GYRO_DEV_NAME }, { LSM330_GYRO_DEV_NAME }, {},
drivers/input/misc/arizona-haptics.c +4 -7
@@ -77,16 +77,14 @@ static void arizona_haptics_work(struct work_struct *work)return ; } +mutex_unlock (dapm_mutex); + ret =snd_soc_dapm_sync (arizona->dapm);if (ret !=0 ) {dev_err (arizona->dev,"Failed to sync DAPM: %d\n" , ret); -mutex_unlock (dapm_mutex);return ; } - -mutex_unlock (dapm_mutex); - }else {/* This disable sequence will be a noop if already enabled */ mutex_lock_nested (dapm_mutex,SND_SOC_DAPM_CLASS_RUNTIME );
@@ -99,16 +97,15 @@ static void arizona_haptics_work(struct work_struct *work)return ; } +mutex_unlock (dapm_mutex); + ret =snd_soc_dapm_sync (arizona->dapm);if (ret !=0 ) {dev_err (arizona->dev,"Failed to sync DAPM: %d\n" , ret); -mutex_unlock (dapm_mutex);return ; } -mutex_unlock (dapm_mutex); - ret = regmap_update_bits(arizona->regmap, ARIZONA_HAPTICS_CONTROL_1, ARIZONA_HAP_CTRL_MASK,
drivers/irqchip/irq-metag-ext.c +1 -1
@@ -515,7 +515,7 @@ static int meta_intc_set_affinity(struct irq_data *data,* one cpu (the interrupt code doesn't support it), so we just * pick the first cpu we find in 'cpumask'. */ - cpu =cpumask_any (cpumask); + cpu =cpumask_any_and (cpumask, cpu_online_mask); thread = cpu_2_hwthread_id[cpu];metag_out32 (TBI_TRIG_VEC (TBID_SIGNUM_TR2 (thread)), vec_addr);
drivers/irqchip/irq-metag.c +1 -1
@@ -201,7 +201,7 @@ static int metag_internal_irq_set_affinity(struct irq_data *data,* one cpu (the interrupt code doesn't support it), so we just * pick the first cpu we find in 'cpumask'. */ - cpu =cpumask_any (cpumask); + cpu =cpumask_any_and (cpumask, cpu_online_mask); thread = cpu_2_hwthread_id[cpu]; metag_out32(TBI_TRIG_VEC(TBID_SIGNUM_TR1(thread)),
drivers/md/dm-mpath.c +5 -2
@@ -1608,8 +1608,11 @@ static int multipath_ioctl(struct dm_target *ti, unsigned int cmd,/* * Only pass ioctls through if the device sizes match exactly. */ -if (!r && ti->len !=i_size_read (bdev->bd_inode) >>SECTOR_SHIFT ) - r =scsi_verify_blk_ioctl (NULL , cmd); +if (!bdev || ti->len !=i_size_read (bdev->bd_inode) >>SECTOR_SHIFT ) { +int err =scsi_verify_blk_ioctl (NULL , cmd); +if (err) + r = err; + }if (r == -ENOTCONN && !fatal_signal_pending (current))queue_work (kmultipathd, &m->process_queued_ios);
drivers/md/dm-thin-metadata.c +17 -0
@@ -1489,6 +1489,23 @@ bool dm_thin_changed_this_transaction(struct dm_thin_device *td)return r; } +bool dm_pool_changed_this_transaction (struct dm_pool_metadata *pmd) +{ +bool r = false; +struct dm_thin_device *td, *tmp; + +down_read (&pmd->root_lock); +list_for_each_entry_safe (td, tmp, &pmd->thin_devices, list) { +if (td->changed) { + r = td->changed; +break ; + } + } +up_read (&pmd->root_lock); + +return r; +} +bool dm_thin_aborted_changes (struct dm_thin_device *td) {bool r;
drivers/md/dm-thin-metadata.h +2 -0
@@ -161,6 +161,8 @@ int dm_thin_remove_block(struct dm_thin_device *td, dm_block_t block);*/ bool dm_thin_changed_this_transaction (struct dm_thin_device *td); +bool dm_pool_changed_this_transaction (struct dm_pool_metadata *pmd); +bool dm_thin_aborted_changes (struct dm_thin_device *td); int dm_thin_get_highest_mapped_block(struct dm_thin_device *td,
drivers/md/dm-thin.c +6 -2
@@ -1344,7 +1344,8 @@ static void process_deferred_bios(struct pool *pool)bio_list_init (&pool->deferred_flush_bios);spin_unlock_irqrestore (&pool->lock, flags); -if (bio_list_empty (&bios) && !need_commit_due_to_time (pool)) +if (bio_list_empty (&bios) && + !(dm_pool_changed_this_transaction (pool->pmd) &&need_commit_due_to_time (pool)))return ;if (commit_or_fallback (pool)) {
@@ -2783,6 +2784,7 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv)if (get_pool_mode (tc->pool) ==PM_FAIL ) { ti->error ="Couldn't open thin device, Pool is in fail mode" ; + r = -EINVAL ; goto bad_thin_open; }
@@ -2794,7 +2796,7 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv) r =dm_set_target_max_io_len (ti, tc->pool->sectors_per_block);if (r) - goto bad_thin_open; + goto bad_target_max_io_len; ti->num_flush_bios =1 ; ti->flush_supported = true;
@@ -2815,6 +2817,8 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv)return 0 ; +bad_target_max_io_len: +dm_pool_close_thin_device (tc->td); bad_thin_open:__pool_dec (tc->pool); bad_pool_lookup:
drivers/misc/mei/client.c +3 -1
@@ -664,7 +664,6 @@ int mei_cl_read_start(struct mei_cl *cl, size_t length) goto err; cb->fop_type =MEI_FOP_READ ; - cl->read_cb = cb;if (dev->hbuf_is_ready) { dev->hbuf_is_ready = false;if (mei_hbm_cl_flow_control_req (dev, cl)) {
@@ -675,6 +674,9 @@ int mei_cl_read_start(struct mei_cl *cl, size_t length) }else {list_add_tail (&cb->list, &dev->ctrl_wr_list.list); } + + cl->read_cb = cb; +return rets; err:mei_io_cb_free (cb);
drivers/net/bonding/bond_3ad.c +2 -4
@@ -1854,8 +1854,6 @@ void bond_3ad_initiate_agg_selection(struct bonding *bond, int timeout)BOND_AD_INFO (bond).agg_select_timer = timeout; } -static u16 aggregator_identifier; -/** * bond_3ad_initialize - initialize a bond's 802.3ad parameters and structures * @bond: bonding struct to work on
@@ -1869,7 +1867,7 @@ void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution)if (MAC_ADDRESS_COMPARE (&(BOND_AD_INFO (bond).system.sys_mac_addr), bond->dev->dev_addr)) { - aggregator_identifier =0 ; +BOND_AD_INFO (bond).aggregator_identifier =0 ;BOND_AD_INFO (bond).system.sys_priority =0xFFFF ;BOND_AD_INFO (bond).system.sys_mac_addr = *((struct mac_addr *)bond->dev->dev_addr);
@@ -1940,7 +1938,7 @@ int bond_3ad_bind_slave(struct slave *slave)ad_initialize_agg (aggregator); aggregator->aggregator_mac_address = *((struct mac_addr *)bond->dev->dev_addr); - aggregator->aggregator_identifier = (++aggregator_identifier); + aggregator->aggregator_identifier = ++BOND_AD_INFO (bond).aggregator_identifier; aggregator->slave = slave; aggregator->is_active =0 ; aggregator->num_of_ports =0 ;
drivers/net/bonding/bond_3ad.h +1 -0
@@ -253,6 +253,7 @@ struct ad_system {struct ad_bond_info {struct ad_system system;/* 802.3ad system structure */ u32 agg_select_timer;// Timer to select aggregator after all adapter's hand shakes +u16 aggregator_identifier; };struct ad_slave_info {
drivers/net/can/dev.c +3 -12
@@ -324,19 +324,10 @@ void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev, }if (!priv->echo_skb[idx]) { -struct sock *srcsk = skb->sk; -if (atomic_read (&skb->users) !=1 ) { -struct sk_buff *old_skb = skb; - - skb =skb_clone (old_skb,GFP_ATOMIC ); -kfree_skb (old_skb); -if (!skb) -return ; - }else -skb_orphan (skb); - - skb->sk = srcsk; + skb =can_create_echo_skb (skb); +if (!skb) +return ;/* make settings for echo to reduce code in irq context */ skb->protocol =htons (ETH_P_CAN );
drivers/net/can/janz-ican3.c +4 -14
@@ -19,6 +19,7 @@#include <linux/netdevice.h> #include <linux/can.h> #include <linux/can/dev.h> +#include <linux/can/skb.h> #include <linux/can/error.h> #include <linux/mfd/janz.h>
@@ -1134,20 +1135,9 @@ static void ican3_handle_message(struct ican3_dev *mod, struct ican3_msg *msg)*/ static void ican3_put_echo_skb (struct ican3_dev *mod,struct sk_buff *skb) { -struct sock *srcsk = skb->sk; - -if (atomic_read (&skb->users) !=1 ) { -struct sk_buff *old_skb = skb; - - skb =skb_clone (old_skb,GFP_ATOMIC ); -kfree_skb (old_skb); -if (!skb) -return ; - }else { -skb_orphan (skb); - } - - skb->sk = srcsk; + skb =can_create_echo_skb (skb); +if (!skb) +return ;/* save this skb for tx interrupt echo handling */ skb_queue_tail (&mod->echoq, skb);
drivers/net/can/usb/kvaser_usb.c +2 -0
@@ -474,6 +474,8 @@ static int kvaser_usb_get_card_info(struct kvaser_usb *dev)return err; dev->nchannels = msg.u.cardinfo.nchannels; +if (dev->nchannels >MAX_NET_DEVICES ) +return -EINVAL ;return 0 ; }
drivers/net/can/vcan.c +4 -5
@@ -46,6 +46,7 @@#include <linux/if_ether.h> #include <linux/can.h> #include <linux/can/dev.h> +#include <linux/can/skb.h> #include <linux/slab.h> #include <net/rtnetlink.h>
@@ -109,25 +110,23 @@ static netdev_tx_t vcan_tx(struct sk_buff *skb, struct net_device *dev) stats->rx_packets++; stats->rx_bytes += cfd->len; } -kfree_skb (skb); +consume_skb (skb);return NETDEV_TX_OK ; }/* perform standard echo handling for CAN network interfaces */ if (loop) { -struct sock *srcsk = skb->sk; - skb =skb_share_check (skb,GFP_ATOMIC ); + skb =can_create_echo_skb (skb);if (!skb)return NETDEV_TX_OK ;/* receive with packet counting */ - skb->sk = srcsk;vcan_rx (skb, dev); }else {/* no looped packets => no counting */ -kfree_skb (skb); +consume_skb (skb); }return NETDEV_TX_OK ; }
drivers/net/ethernet/broadcom/tg3.c +2 -2
@@ -13777,12 +13777,12 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu)tg3_netif_stop (tp); +tg3_set_mtu (dev, tp, new_mtu); +tg3_full_lock (tp,1 );tg3_halt (tp,RESET_KIND_SHUTDOWN ,1 ); -tg3_set_mtu (dev, tp, new_mtu); -/* Reset PHY, otherwise the read DMA engine will be in a mode that * breaks all requests to 256 bytes. */
drivers/net/usb/asix_devices.c +2 -1
@@ -915,7 +915,8 @@ static const struct driver_info ax88178_info = { .status = asix_status, .link_reset = ax88178_link_reset, .reset = ax88178_reset, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR, + .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR | + FLAG_MULTI_PACKET, .rx_fixup = asix_rx_fixup_common, .tx_fixup = asix_tx_fixup, };
drivers/net/usb/ax88179_178a.c +4 -0
@@ -1109,6 +1109,10 @@ static int ax88179_rx_fixup(struct usbnet *dev, struct sk_buff *skb)u16 hdr_off;u32 *pkt_hdr; +/* This check is no longer done by usbnet */ +if (skb->len < dev->net->hard_header_len) +return 0 ; +skb_trim (skb, skb->len -4 );memcpy (&rx_hdr,skb_tail_pointer (skb),4 );le32_to_cpus (&rx_hdr);
drivers/net/usb/gl620a.c +4 -0
@@ -86,6 +86,10 @@ static int genelink_rx_fixup(struct usbnet *dev, struct sk_buff *skb)u32 size;u32 count; +/* This check is no longer done by usbnet */ +if (skb->len < dev->net->hard_header_len) +return 0 ; + header = (struct gl_header *) skb->data;// get the packet count of the received skb
drivers/net/usb/mcs7830.c +3 -2
@@ -529,8 +529,9 @@ static int mcs7830_rx_fixup(struct usbnet *dev, struct sk_buff *skb) {u8 status; -if (skb->len ==0 ) { -dev_err (&dev->udev->dev,"unexpected empty rx frame\n" ); +/* This check is no longer done by usbnet */ +if (skb->len < dev->net->hard_header_len) { +dev_err (&dev->udev->dev,"unexpected tiny rx frame\n" );return 0 ; }
drivers/net/usb/net1080.c +4 -0
@@ -366,6 +366,10 @@ static int net1080_rx_fixup(struct usbnet *dev, struct sk_buff *skb)struct nc_trailer *trailer;u16 hdr_len, packet_len; +/* This check is no longer done by usbnet */ +if (skb->len < dev->net->hard_header_len) +return 0 ; +if (!(skb->len &0x01 )) { netdev_dbg(dev->net, "rx framesize %d range %d..%d mtu %d\n", skb->len, dev->net->hard_header_len, dev->hard_mtu,
drivers/net/usb/qmi_wwan.c +5 -4
@@ -80,10 +80,10 @@ static int qmi_wwan_rx_fixup(struct usbnet *dev, struct sk_buff *skb) {__be16 proto; -/* usbnet rx_complete guarantees that skb->len is at least -* hard_header_len, so we can inspect the dest address without -* checking skb->len -*/ +/* This check is no longer done by usbnet */ +if (skb->len < dev->net->hard_header_len) +return 0 ; +switch (skb->data[0 ] &0xf0 ) {case 0x40 : proto =htons (ETH_P_IP );
@@ -709,6 +709,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */ {QMI_FIXED_INTF(0x1199, 0x68a2, 19)}, /* Sierra Wireless MC7710 in QMI mode */ {QMI_FIXED_INTF(0x1199, 0x901c, 8)}, /* Sierra Wireless EM7700 */ + {QMI_FIXED_INTF(0x1199, 0x9051, 8)}, /* Netgear AirCard 340U */ {QMI_FIXED_INTF(0x1bbb, 0x011e, 4)}, /* Telekom Speedstick LTE II (Alcatel One Touch L100V LTE) */ {QMI_FIXED_INTF(0x2357, 0x0201, 4)}, /* TP-LINK HSUPA Modem MA180 */ {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */
drivers/net/usb/rndis_host.c +4 -0
@@ -494,6 +494,10 @@ EXPORT_SYMBOL_GPL(rndis_unbind);*/ int rndis_rx_fixup (struct usbnet *dev,struct sk_buff *skb) { +/* This check is no longer done by usbnet */ +if (skb->len < dev->net->hard_header_len) +return 0 ; +/* peripheral may have batched packets to us... */ while (likely (skb->len)) {struct rndis_data_hdr *hdr = (void *)skb->data;
drivers/net/usb/smsc75xx.c +4 -0
@@ -2108,6 +2108,10 @@ static void smsc75xx_rx_csum_offload(struct usbnet *dev, struct sk_buff *skb,static int smsc75xx_rx_fixup (struct usbnet *dev,struct sk_buff *skb) { +/* This check is no longer done by usbnet */ +if (skb->len < dev->net->hard_header_len) +return 0 ; +while (skb->len >0 ) {u32 rx_cmd_a, rx_cmd_b, align_count, size;struct sk_buff *ax_skb;
drivers/net/usb/smsc95xx.c +4 -0
@@ -1725,6 +1725,10 @@ static void smsc95xx_rx_csum_offload(struct sk_buff *skb)static int smsc95xx_rx_fixup (struct usbnet *dev,struct sk_buff *skb) { +/* This check is no longer done by usbnet */ +if (skb->len < dev->net->hard_header_len) +return 0 ; +while (skb->len >0 ) {u32 header, align_count;struct sk_buff *ax_skb;
drivers/net/usb/usbnet.c +10 -15
@@ -517,17 +517,19 @@ static inline void rx_process (struct usbnet *dev, struct sk_buff *skb) }// else network stack removes extra byte if we forced a short packet -if (skb->len) { -/* all data was already cloned from skb inside the driver */ -if (dev->driver_info->flags &FLAG_MULTI_PACKET ) -dev_kfree_skb_any (skb); -else -usbnet_skb_return (dev, skb); +/* all data was already cloned from skb inside the driver */ +if (dev->driver_info->flags &FLAG_MULTI_PACKET ) + goto done; + +if (skb->len <ETH_HLEN ) { + dev->net->stats.rx_errors++; + dev->net->stats.rx_length_errors++; +netif_dbg (dev, rx_err, dev->net,"rx length %d\n" , skb->len); + }else { +usbnet_skb_return (dev, skb);return ; } -netif_dbg (dev, rx_err, dev->net,"drop\n" ); - dev->net->stats.rx_errors++; done:skb_queue_tail (&dev->done, skb); }
@@ -549,13 +551,6 @@ static void rx_complete (struct urb *urb)switch (urb_status) {/* success */ case 0 : -if (skb->len < dev->net->hard_header_len) { - state = rx_cleanup; - dev->net->stats.rx_errors++; - dev->net->stats.rx_length_errors++; -netif_dbg (dev, rx_err, dev->net, -"rx length %d\n" , skb->len); - }break ;/* stalls need manual reset. this is rare ... except that
drivers/net/wireless/rtl818x/rtl8187/rtl8187.h +8 -2
@@ -15,6 +15,8 @@#ifndef RTL8187_H #define RTL8187_H +#include <linux/cache.h> +#include "rtl818x.h" #include "leds.h"
@@ -139,7 +141,10 @@ struct rtl8187_priv {u8 aifsn[4 ];u8 rfkill_mask;struct { -__le64 buf; +union { +__le64 buf; +u8 dummy1[L1_CACHE_BYTES ]; + }____cacheline_aligned ;struct sk_buff_head queue; } b_tx_status;/* This queue is used by both -b and non-b devices */ struct mutex io_mutex;
@@ -147,7 +152,8 @@ struct rtl8187_priv {u8 bits8;__le16 bits16;__le32 bits32; - } *io_dmabuf; +u8 dummy2[L1_CACHE_BYTES ]; + } *io_dmabuf____cacheline_aligned ;bool rfkill_off;u16 seqno; };
drivers/net/wireless/rtlwifi/ps.c +1 -1
@@ -48,7 +48,7 @@ bool rtl_ps_enable_nic(struct ieee80211_hw *hw)/*<2> Enable Adapter */ if (rtlpriv->cfg->ops->hw_init (hw)) -return 1 ; +return false;RT_CLEAR_PS_LEVEL (ppsc,RT_RF_OFF_LEVL_HALT_NIC );/*<3> Enable Interrupt */
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c +16 -2
@@ -937,14 +937,26 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw)bool is92c;int err;u8 tmp_u1b; +unsigned long flags; rtlpci->being_init_adapter = true; + +/* Since this function can take a very long time (up to 350 ms) +* and can be called with irqs disabled, reenable the irqs +* to let the other devices continue being serviced. +* +* It is safe doing so since our own interrupts will only be enabled +* in a subsequent step. +*/ +local_save_flags (flags); +local_irq_enable (); + rtlpriv->intf_ops->disable_aspm (hw); rtstatus =_rtl92ce_init_mac (hw);if (!rtstatus) {RT_TRACE (rtlpriv,COMP_ERR ,DBG_EMERG ,"Init MAC failed\n" ); err =1 ; -return err; + goto exit; } err =rtl92c_download_fw (hw);
@@ -952,7 +964,7 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw)RT_TRACE (rtlpriv,COMP_ERR ,DBG_WARNING ,"Failed to download FW. Init HW without FW now..\n" ); err =1 ; -return err; + goto exit; } rtlhal->last_hmeboxnum =0 ;
@@ -1032,6 +1044,8 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw)RT_TRACE (rtlpriv,COMP_INIT ,DBG_TRACE ,"under 1.5V\n" ); }rtl92c_dm_init (hw); +exit: +local_irq_restore (flags); rtlpci->being_init_adapter = false;return err; }
drivers/pci/pci.c +10 -0
@@ -1119,6 +1119,8 @@ EXPORT_SYMBOL_GPL(pci_load_and_free_saved_state);static int do_pci_enable_device (struct pci_dev *dev,int bars) {int err; +u16 cmd; +u8 pin; err =pci_set_power_state (dev,PCI_D0 );if (err <0 && err != -EIO )
@@ -1128,6 +1130,14 @@ static int do_pci_enable_device(struct pci_dev *dev, int bars)return err;pci_fixup_device (pci_fixup_enable, dev); +pci_read_config_byte (dev,PCI_INTERRUPT_PIN , &pin); +if (pin) { +pci_read_config_word (dev,PCI_COMMAND , &cmd); +if (cmd &PCI_COMMAND_INTX_DISABLE ) +pci_write_config_word (dev,PCI_COMMAND , + cmd & ~PCI_COMMAND_INTX_DISABLE ); + } +return 0 ; }
drivers/scsi/qla2xxx/qla_target.c +2 -1
@@ -3339,7 +3339,8 @@ restart:ql_dbg (ql_dbg_tgt_mgt, vha,0xf02c ,"SRR cmd %p (se_cmd %p, tag %d, op %x), " "sg_cnt=%d, offset=%d" , cmd, &cmd->se_cmd, cmd->tag, - se_cmd->t_task_cdb[0 ], cmd->sg_cnt, cmd->offset); + se_cmd->t_task_cdb ? se_cmd->t_task_cdb[0 ] :0 , + cmd->sg_cnt, cmd->offset);qlt_handle_srr (vha, sctio, imm);
drivers/staging/android/binder.c +1 -2
@@ -2902,7 +2902,7 @@ static int binder_node_release(struct binder_node *node, int refs) refs++;if (!ref->death) - goto out; +continue ; death++;
@@ -2915,7 +2915,6 @@ static int binder_node_release(struct binder_node *node, int refs)BUG (); } -out:binder_debug (BINDER_DEBUG_DEAD_BINDER ,"node %d now dead, refs %d, death %d\n" , node->debug_id, refs, death);
drivers/usb/chipidea/udc.c +2 -2
@@ -103,7 +103,7 @@ static int hw_ep_flush(struct ci13xxx *ci, int num, int dir)do {/* flush any pending transfer */ -hw_write (ci,OP_ENDPTFLUSH ,BIT (n),BIT (n)); +hw_write (ci,OP_ENDPTFLUSH , ~0 ,BIT (n));while (hw_read (ci,OP_ENDPTFLUSH ,BIT (n)))cpu_relax (); }while (hw_read (ci,OP_ENDPTSTAT ,BIT (n)));
@@ -203,7 +203,7 @@ static int hw_ep_prime(struct ci13xxx *ci, int num, int dir, int is_ctrl)if (is_ctrl && dir ==RX &&hw_read (ci,OP_ENDPTSETUPSTAT ,BIT (num)))return -EAGAIN ; -hw_write (ci,OP_ENDPTPRIME ,BIT (n),BIT (n)); +hw_write (ci,OP_ENDPTPRIME , ~0 ,BIT (n));while (hw_read (ci,OP_ENDPTPRIME ,BIT (n)))cpu_relax ();
drivers/usb/gadget/bcm63xx_udc.c +32 -26
118 lines not on this page · raw message
drivers/usb/host/ehci-hcd.c +10 -3
@@ -686,8 +686,15 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)struct ehci_hcd *ehci =hcd_to_ehci (hcd);u32 status, masked_status, pcd_status =0 , cmd;int bh; +unsigned long flags; -spin_lock (&ehci->lock); +/* +* For threadirqs option we use spin_lock_irqsave() variant to prevent +* deadlock with ehci hrtimer callback, because hrtimer callbacks run +* in interrupt context even when threadirqs is specified. We can go +* back to spin_lock() variant when hrtimer callbacks become threaded. +*/ +spin_lock_irqsave (&ehci->lock, flags); status =ehci_readl (ehci, &ehci->regs->status);
@@ -705,7 +712,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)/* Shared IRQ? */ if (!masked_status ||unlikely (ehci->rh_state ==EHCI_RH_HALTED )) { -spin_unlock (&ehci->lock); +spin_unlock_irqrestore (&ehci->lock, flags);return IRQ_NONE ; }
@@ -823,7 +830,7 @@ dead:if (bh)ehci_work (ehci); -spin_unlock (&ehci->lock); +spin_unlock_irqrestore (&ehci->lock, flags);if (pcd_status)usb_hcd_poll_rh_status (hcd);return IRQ_HANDLED ;
drivers/usb/serial/ftdi_sio.c +2 -0
@@ -910,6 +910,8 @@ static struct usb_device_id id_table_combined [] = {/* Crucible Devices */ { USB_DEVICE(FTDI_VID, FTDI_CT_COMET_PID) }, { USB_DEVICE(FTDI_VID, FTDI_Z3X_PID) }, +/* Cressi Devices */ + { USB_DEVICE(FTDI_VID, FTDI_CRESSI_PID) }, { }, /* Optional parameter entry */ { } /* Terminating entry */ };
drivers/usb/serial/ftdi_sio_ids.h +6 -0
@@ -1320,3 +1320,9 @@* Manufacturer: Smart GSM Team */ #define FTDI_Z3X_PID 0x0011 + +/* +* Product: Cressi PC Interface +* Manufacturer: Cressi +*/ +#define FTDI_CRESSI_PID 0x87d0
drivers/usb/serial/option.c +2 -1
@@ -1526,7 +1526,8 @@ static const struct usb_device_id option_ids[] = {/* Cinterion */ { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_E) }, { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_P) }, - { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8) }, + { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8), + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AHXX) }, { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PLXX), .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
fs/attr.c +0 -5
@@ -182,11 +182,6 @@ int notify_change(struct dentry * dentry, struct iattr * attr)return -EPERM ; } -if ((ia_valid &ATTR_SIZE ) &&IS_I_VERSION (inode)) { -if (attr->ia_size != inode->i_size) -inode_inc_iversion (inode); - } -if ((ia_valid &ATTR_MODE )) {umode_t amode = attr->ia_mode;/* Flag setting protected by i_mutex */
fs/btrfs/inode.c +6 -2
@@ -4527,8 +4527,12 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr)* these flags set. For all other operations the VFS set these flags * explicitly if it wants a timestamp update. */ -if (newsize != oldsize && (!(mask & (ATTR_CTIME |ATTR_MTIME )))) - inode->i_ctime = inode->i_mtime =current_fs_time (inode->i_sb); +if (newsize != oldsize) { +inode_inc_iversion (inode); +if (!(mask & (ATTR_CTIME |ATTR_MTIME ))) + inode->i_ctime = inode->i_mtime = +current_fs_time (inode->i_sb); + }if (newsize > oldsize) {truncate_pagecache (inode, oldsize, newsize);
fs/cifs/file.c +34 -3
@@ -2353,7 +2353,7 @@ cifs_iovec_write(struct file *file, const struct iovec *iov, unsigned long nr_segs, loff_t *poffset) { unsigned long nr_pages, i; -size_t copied, len, cur_len; +size_t bytes, copied, len, cur_len;ssize_t total_written =0 ;loff_t offset;struct iov_iter it;
@@ -2408,14 +2408,45 @@ cifs_iovec_write(struct file *file, const struct iovec *iov, save_len = cur_len;for (i =0 ; i < nr_pages; i++) { - copied = min_t(const size_t, cur_len, PAGE_SIZE); + bytes = min_t(const size_t, cur_len, PAGE_SIZE); copied =iov_iter_copy_from_user (wdata->pages[i], &it, -0 , copied); +0 , bytes); cur_len -= copied;iov_iter_advance (&it, copied); +/* +* If we didn't copy as much as we expected, then that +* may mean we trod into an unmapped area. Stop copying +* at that point. On the next pass through the big +* loop, we'll likely end up getting a zero-length +* write and bailing out of it. +*/ +if (copied < bytes) +break ; } cur_len = save_len - cur_len; +/* +* If we have no data to send, then that probably means that +* the copy above failed altogether. That's most likely because +* the address in the iovec was bogus. Set the rc to -EFAULT, +* free anything we allocated and bail out. +*/ +if (!cur_len) { +for (i =0 ; i < nr_pages; i++) +put_page (wdata->pages[i]); +kfree (wdata); + rc = -EFAULT ; +break ; + } + +/* +* i + 1 now represents the number of pages we actually used in +* the copy phase above. Bring nr_pages down to that, and free +* any pages that we didn't use. +*/ +for ( ; nr_pages > i +1 ; nr_pages--) +put_page (wdata->pages[nr_pages -1 ]); + wdata->sync_mode =WB_SYNC_ALL ; wdata->nr_pages = nr_pages; wdata->offset = (__u64 )offset;
fs/cifs/smb2glob.h +3 -0
@@ -55,4 +55,7 @@#define SMB2_NTLMV2_SESSKEY_SIZE (16)#define SMB2_HMACSHA256_SIZE (32) +/* Maximum buffer size value we can send with 1 credit */ +#define SMB2_MAX_BUFFER_SIZE 65536 +#endif /* _SMB2_GLOB_H */
fs/cifs/smb2ops.c +4 -10
@@ -181,11 +181,8 @@ smb2_negotiate_wsize(struct cifs_tcon *tcon, struct smb_vol *volume_info)/* start with specified wsize, or default */ wsize = volume_info->wsize ? volume_info->wsize :CIFS_DEFAULT_IOSIZE ; wsize = min_t(unsigned int, wsize, server->max_write); -/* -* limit write size to 2 ** 16, because we don't support multicredit -* requests now. -*/ - wsize = min_t(unsigned int, wsize, 2 << 15); +/* set it to the maximum buffer size value we can send with 1 credit */ + wsize = min_t(unsigned int, wsize, SMB2_MAX_BUFFER_SIZE);return wsize; }
@@ -199,11 +196,8 @@ smb2_negotiate_rsize(struct cifs_tcon *tcon, struct smb_vol *volume_info)/* start with specified rsize, or default */ rsize = volume_info->rsize ? volume_info->rsize :CIFS_DEFAULT_IOSIZE ; rsize = min_t(unsigned int, rsize, server->max_read); -/* -* limit write size to 2 ** 16, because we don't support multicredit -* requests now. -*/ - rsize = min_t(unsigned int, rsize, 2 << 15); +/* set it to the maximum buffer size value we can send with 1 credit */ + rsize = min_t(unsigned int, rsize, SMB2_MAX_BUFFER_SIZE);return rsize; }
fs/cifs/smb2pdu.c +3 -0
@@ -408,6 +408,9 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses) server->dialect =le16_to_cpu (rsp->DialectRevision); server->maxBuf =le32_to_cpu (rsp->MaxTransactSize); +/* set it to the maximum buffer size value we can send with 1 credit */ + server->maxBuf = min_t(unsigned int, le32_to_cpu(rsp->MaxTransactSize), +SMB2_MAX_BUFFER_SIZE ); server->max_read =le32_to_cpu (rsp->MaxReadSize); server->max_write =le32_to_cpu (rsp->MaxWriteSize);/* BB Do we need to validate the SecurityMode? */
fs/ext4/ext4.h +2 -0
@@ -774,6 +774,8 @@ do { \if (EXT4_FITS_IN_INODE (raw_inode, einode, xtime)) \ (einode)->xtime.tv_sec = \ (signed )le32_to_cpu ((raw_inode)->xtime); \ +else \ + (einode)->xtime.tv_sec =0 ; \ if (EXT4_FITS_IN_INODE(raw_inode, einode, xtime ## _extra)) \ext4_decode_extra_time (&(einode)->xtime, \ raw_inode->xtime ## _extra); \
fs/ext4/inode.c +4 -0
@@ -4704,6 +4704,10 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)if (attr->ia_size > sbi->s_bitmap_maxbytes)return -EFBIG ; } + +if (IS_I_VERSION (inode) && attr->ia_size != inode->i_size) +inode_inc_iversion (inode); +if (S_ISREG (inode->i_mode) && (attr->ia_size < inode->i_size)) {if (ext4_should_order_data (inode)) {
fs/ext4/ioctl.c +2 -1
@@ -145,7 +145,7 @@ static long swap_inode_boot_loader(struct super_block *sb, handle =ext4_journal_start (inode_bl,EXT4_HT_MOVE_EXTENTS ,2 );if (IS_ERR (handle)) { err = -EINVAL ; - goto swap_boot_out; + goto journal_err_out; }/* Protect extent tree against block allocations via delalloc */
@@ -203,6 +203,7 @@ static long swap_inode_boot_loader(struct super_block *sb,ext4_double_up_write_data_sem (inode, inode_bl); +journal_err_out:ext4_inode_resume_unlocked_dio (inode);ext4_inode_resume_unlocked_dio (inode_bl);
fs/ext4/resize.c +21 -13
@@ -238,6 +238,7 @@ static int ext4_alloc_group_tables(struct super_block *sb,ext4_group_t group;ext4_group_t last_group;unsigned overhead; +__u16 uninit_mask = (flexbg_size >1 ) ? ~EXT4_BG_BLOCK_UNINIT : ~0 ;BUG_ON (flex_gd->count ==0 || group_data ==NULL );
@@ -261,7 +262,7 @@ next_group: src_group++;for (; src_group <= last_group; src_group++) { overhead =ext4_group_overhead_blocks (sb, src_group); -if (overhead !=0 ) +if (overhead ==0 ) last_blk += group_data[src_group - group].blocks_count;else break ;
@@ -275,8 +276,7 @@ next_group: group =ext4_get_group_number (sb, start_blk -1 ); group -= group_data[0 ].group; group_data[group].free_blocks_count--; -if (flexbg_size >1 ) - flex_gd->bg_flags[group] &= ~EXT4_BG_BLOCK_UNINIT ; + flex_gd->bg_flags[group] &= uninit_mask; }/* Allocate inode bitmaps */
@@ -287,22 +287,30 @@ next_group: group =ext4_get_group_number (sb, start_blk -1 ); group -= group_data[0 ].group; group_data[group].free_blocks_count--; -if (flexbg_size >1 ) - flex_gd->bg_flags[group] &= ~EXT4_BG_BLOCK_UNINIT ; + flex_gd->bg_flags[group] &= uninit_mask; }/* Allocate inode tables */ for (; it_index < flex_gd->count; it_index++) { -if (start_blk +EXT4_SB (sb)->s_itb_per_group > last_blk) +unsigned int itb =EXT4_SB (sb)->s_itb_per_group; +ext4_fsblk_t next_group_start; + +if (start_blk + itb > last_blk) goto next_group; group_data[it_index].inode_table = start_blk; - group =ext4_get_group_number (sb, start_blk -1 ); + group =ext4_get_group_number (sb, start_blk); + next_group_start =ext4_group_first_block_no (sb, group +1 ); group -= group_data[0 ].group; - group_data[group].free_blocks_count -= -EXT4_SB (sb)->s_itb_per_group; -if (flexbg_size >1 ) - flex_gd->bg_flags[group] &= ~EXT4_BG_BLOCK_UNINIT ; +if (start_blk + itb > next_group_start) { + flex_gd->bg_flags[group +1 ] &= uninit_mask; + overhead = start_blk + itb - next_group_start; + group_data[group +1 ].free_blocks_count -= overhead; + itb -= overhead; + } + + group_data[group].free_blocks_count -= itb; + flex_gd->bg_flags[group] &= uninit_mask; start_blk +=EXT4_SB (sb)->s_itb_per_group; }
@@ -396,7 +404,7 @@ static int set_flexbg_block_bitmap(struct super_block *sb, handle_t *handle, start =ext4_group_first_block_no (sb, group); group -= flex_gd->groups[0 ].group; - count2 = sb->s_blocksize *8 - (block - start); + count2 =EXT4_BLOCKS_PER_GROUP (sb) - (block - start);if (count2 > count) count2 = count;
@@ -615,7 +623,7 @@ handle_ib:if (err) goto out; count = group_table_count[j]; - start = group_data[i].block_bitmap; + start = (&group_data[i].block_bitmap)[j]; block = start; }
fs/ext4/super.c +13 -7
@@ -3592,16 +3592,22 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)for (i =0 ; i <4 ; i++) sbi->s_hash_seed[i] =le32_to_cpu (es->s_hash_seed[i]); sbi->s_def_hash_version = es->s_def_hash_version; - i =le32_to_cpu (es->s_flags); -if (i &EXT2_FLAGS_UNSIGNED_HASH ) - sbi->s_hash_unsigned =3 ; -else if ((i &EXT2_FLAGS_SIGNED_HASH ) ==0 ) { +if (EXT4_HAS_COMPAT_FEATURE (sb,EXT4_FEATURE_COMPAT_DIR_INDEX )) { + i =le32_to_cpu (es->s_flags); +if (i &EXT2_FLAGS_UNSIGNED_HASH ) + sbi->s_hash_unsigned =3 ; +else if ((i &EXT2_FLAGS_SIGNED_HASH ) ==0 ) {#ifdef __CHAR_UNSIGNED__ - es->s_flags |=cpu_to_le32 (EXT2_FLAGS_UNSIGNED_HASH ); - sbi->s_hash_unsigned =3 ; +if (!(sb->s_flags &MS_RDONLY )) + es->s_flags |= +cpu_to_le32 (EXT2_FLAGS_UNSIGNED_HASH ); + sbi->s_hash_unsigned =3 ;#else - es->s_flags |=cpu_to_le32 (EXT2_FLAGS_SIGNED_HASH ); +if (!(sb->s_flags &MS_RDONLY )) + es->s_flags |= +cpu_to_le32 (EXT2_FLAGS_SIGNED_HASH );#endif + } }/* Handle clustersize */
fs/quota/dquot.c +11 -3
@@ -581,9 +581,17 @@ int dquot_scan_active(struct super_block *sb,dqstats_inc (DQST_LOOKUPS );dqput (old_dquot); old_dquot = dquot; - ret =fn (dquot, priv); -if (ret <0 ) - goto out; +/* +* ->release_dquot() can be racing with us. Our reference +* protects us from new calls to it so just wait for any +* outstanding call and recheck the DQ_ACTIVE_B after that. +*/ +wait_on_dquot (dquot); +if (test_bit (DQ_ACTIVE_B , &dquot->dq_flags)) { + ret =fn (dquot, priv); +if (ret <0 ) + goto out; + }spin_lock (&dq_list_lock);/* We are safe to continue now because our dquot could not * be moved out of the inuse list while we hold the reference */
include/linux/can/skb.h +38 -0
@@ -11,7 +11,9 @@#define CAN_SKB_H #include <linux/types.h> +#include <linux/skbuff.h> #include <linux/can.h> +#include <net/sock.h> /* * The struct can_skb_priv is used to transport additional information along
@@ -42,4 +44,40 @@ static inline void can_skb_reserve(struct sk_buff *skb)skb_reserve (skb,sizeof (struct can_skb_priv )); } +static inline void can_skb_destructor (struct sk_buff *skb) +{ +sock_put (skb->sk); +} + +static inline void can_skb_set_owner (struct sk_buff *skb,struct sock *sk) +{ +if (sk) { +sock_hold (sk); + skb->destructor = can_skb_destructor; + skb->sk = sk; + } +} + +/* +* returns an unshared skb owned by the original sock to be echo'ed back +*/ +static inline struct sk_buff *can_create_echo_skb (struct sk_buff *skb) +{ +if (skb_shared (skb)) { +struct sk_buff *nskb =skb_clone (skb,GFP_ATOMIC ); + +if (likely (nskb)) { +can_skb_set_owner (nskb, skb->sk); +consume_skb (skb); +return nskb; + }else { +kfree_skb (skb); +return NULL ; + } + } + +/* we can assume to have an unshared skb with proper owner */ +return skb; +} +#endif /* CAN_SKB_H */
include/linux/ipc_namespace.h +0 -2
@@ -119,9 +119,7 @@ extern int mq_init_ns(struct ipc_namespace *ns);* the new maximum will handle anyone else. I may have to revisit this * in the future. */ -#define MIN_QUEUESMAX 1#define DFLT_QUEUESMAX 256 -#define HARD_QUEUESMAX 1024#define MIN_MSGMAX 1#define DFLT_MSG 10U#define DFLT_MSGMAX 10
include/linux/netdevice.h +6 -1
@@ -2761,7 +2761,12 @@ void netdev_change_features(struct net_device *dev);void netif_stacked_transfer_operstate (const struct net_device *rootdev,struct net_device *dev); -netdev_features_t netif_skb_features (struct sk_buff *skb); +netdev_features_t netif_skb_dev_features (struct sk_buff *skb, +const struct net_device *dev); +static inline netdev_features_t netif_skb_features (struct sk_buff *skb) +{ +return netif_skb_dev_features (skb, skb->dev); +}static inline bool net_gso_ok (netdev_features_t features,int gso_type) {
include/linux/skbuff.h +19 -0
@@ -2488,6 +2488,8 @@ extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb,extern struct sk_buff *skb_segment (struct sk_buff *skb,netdev_features_t features); +unsigned int skb_gso_transport_seglen (const struct sk_buff *skb); +static inline void *skb_header_pointer (const struct sk_buff *skb,int offset,int len,void *buffer) {
@@ -2911,5 +2913,22 @@ static inline bool skb_head_is_locked(const struct sk_buff *skb) {return !skb->head_frag ||skb_cloned (skb); } + +/** +* skb_gso_network_seglen - Return length of individual segments of a gso packet +* +* @skb: GSO skb +* +* skb_gso_network_seglen is used to determine the real size of the +* individual segments, including Layer3 (IP, IPv6) and L4 headers (TCP/UDP). +* +* The MAC/L2 header is not accounted for. +*/ +static inline unsigned int skb_gso_network_seglen (const struct sk_buff *skb) +{ +unsigned int hdr_len =skb_transport_header (skb) - +skb_network_header (skb); +return hdr_len +skb_gso_transport_seglen (skb); +}#endif /* __KERNEL__ */ #endif /* _LINUX_SKBUFF_H */
ipc/mq_sysctl.c +12 -6
@@ -22,6 +22,16 @@ static void *get_mq(ctl_table *table)return which; } +static int proc_mq_dointvec (ctl_table *table,int write, +void __user *buffer,size_t *lenp,loff_t *ppos) +{ +struct ctl_table mq_table; +memcpy (&mq_table, table,sizeof (mq_table)); + mq_table.data =get_mq (table); + +return proc_dointvec (&mq_table, write, buffer, lenp, ppos); +} +static int proc_mq_dointvec_minmax (ctl_table *table,int write,void __user *buffer,size_t *lenp,loff_t *ppos) {
@@ -33,12 +43,10 @@ static int proc_mq_dointvec_minmax(ctl_table *table, int write, lenp, ppos); }#else +#define proc_mq_dointvec NULL#define proc_mq_dointvec_minmax NULL#endif -static int msg_queues_limit_min =MIN_QUEUESMAX ; -static int msg_queues_limit_max =HARD_QUEUESMAX ; -static int msg_max_limit_min =MIN_MSGMAX ;static int msg_max_limit_max =HARD_MSGMAX ;
@@ -51,9 +59,7 @@ static ctl_table mq_sysctls[] = { .data = &init_ipc_ns.mq_queues_max, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_mq_dointvec_minmax, - .extra1 = &msg_queues_limit_min, - .extra2 = &msg_queues_limit_max, + .proc_handler = proc_mq_dointvec, }, { .procname = "msg_max",
ipc/mqueue.c +3 -3
@@ -433,9 +433,9 @@ static int mqueue_create(struct inode *dir, struct dentry *dentry, error = -EACCES ; goto out_unlock; } -if (ipc_ns->mq_queues_count >=HARD_QUEUESMAX || - (ipc_ns->mq_queues_count >= ipc_ns->mq_queues_max && - !capable (CAP_SYS_RESOURCE ))) { + +if (ipc_ns->mq_queues_count >= ipc_ns->mq_queues_max && + !capable (CAP_SYS_RESOURCE )) { error = -ENOSPC ; goto out_unlock; }
kernel/events/core.c +6 -6
@@ -7421,14 +7421,14 @@ static void perf_pmu_rotate_stop(struct pmu *pmu)static void __perf_event_exit_context (void *__info) {struct perf_event_context *ctx = __info; -struct perf_event *event, *tmp; +struct perf_event *event;perf_pmu_rotate_stop (ctx->pmu); -list_for_each_entry_safe (event, tmp, &ctx->pinned_groups, group_entry) -__perf_remove_from_context (event); -list_for_each_entry_safe (event, tmp, &ctx->flexible_groups, group_entry) +rcu_read_lock (); +list_for_each_entry_rcu (event, &ctx->event_list, event_entry)__perf_remove_from_context (event); +rcu_read_unlock (); }static void perf_event_exit_cpu_context (int cpu)
@@ -7452,11 +7452,11 @@ static void perf_event_exit_cpu(int cpu) {struct swevent_htable *swhash = &per_cpu (swevent_htable, cpu); +perf_event_exit_cpu_context (cpu); +mutex_lock (&swhash->hlist_mutex);swevent_hlist_release (swhash);mutex_unlock (&swhash->hlist_mutex); - -perf_event_exit_cpu_context (cpu); }#else static inline void perf_event_exit_cpu (int cpu) { }
kernel/workqueue.c +7 -0
@@ -1823,6 +1823,12 @@ static void destroy_worker(struct worker *worker)if (worker->flags &WORKER_IDLE ) pool->nr_idle--; +/* +* Once WORKER_DIE is set, the kworker may destroy itself at any +* point. Pin to ensure the task stays until we're done with it. +*/ +get_task_struct (worker->task); +list_del_init (&worker->entry); worker->flags |=WORKER_DIE ;
@@ -1831,6 +1837,7 @@ static void destroy_worker(struct worker *worker)spin_unlock_irq (&pool->lock);kthread_stop (worker->task); +put_task_struct (worker->task);kfree (worker);spin_lock_irq (&pool->lock);
mm/memcontrol.c +2 -2
@@ -1220,7 +1220,7 @@ struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *root,if (dead_count == iter->last_dead_count) {smp_rmb (); last_visited = iter->last_visited; -if (last_visited && +if (last_visited && last_visited != root && !css_tryget (&last_visited->css)) last_visited =NULL ; }
@@ -1229,7 +1229,7 @@ struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *root, memcg =__mem_cgroup_iter_next (root, last_visited);if (reclaim) { -if (last_visited) +if (last_visited && last_visited != root)css_put (&last_visited->css); iter->last_visited = memcg;
net/9p/trans_virtio.c +4 -1
@@ -340,7 +340,10 @@ static int p9_get_mapped_pages(struct virtio_chan *chan,int count = nr_pages;while (nr_pages) { s =rest_of_page (data); - pages[index++] =kmap_to_page (data); +if (is_vmalloc_addr (data)) + pages[index++] =vmalloc_to_page (data); +else + pages[index++] =kmap_to_page (data); data += s; nr_pages--; }
net/can/af_can.c +2 -1
@@ -57,6 +57,7 @@#include <linux/skbuff.h> #include <linux/can.h> #include <linux/can/core.h> +#include <linux/can/skb.h> #include <linux/ratelimit.h> #include <net/net_namespace.h> #include <net/sock.h>
@@ -290,7 +291,7 @@ int can_send(struct sk_buff *skb, int loop)return -ENOMEM ; } - newskb->sk = skb->sk; +can_skb_set_owner (newskb, skb->sk); newskb->ip_summed =CHECKSUM_UNNECESSARY ; newskb->pkt_type =PACKET_BROADCAST ; }
net/can/bcm.c +2 -2
@@ -268,7 +268,7 @@ static void bcm_can_tx(struct bcm_op *op)/* send with loopback */ skb->dev = dev; - skb->sk = op->sk; +can_skb_set_owner (skb, op->sk);can_send (skb,1 );/* update statistics */
@@ -1223,7 +1223,7 @@ static int bcm_tx_send(struct msghdr *msg, int ifindex, struct sock *sk)can_skb_prv (skb)->ifindex = dev->ifindex; skb->dev = dev; - skb->sk = sk; +can_skb_set_owner (skb, sk); err =can_send (skb,1 );/* send with loopback */ dev_put (dev);
net/core/dev.c +16 -11
@@ -2374,7 +2374,7 @@ EXPORT_SYMBOL(netdev_rx_csum_fault);* 2. No high memory really exists on this machine. */ -static int illegal_highdma (struct net_device *dev,struct sk_buff *skb) +static int illegal_highdma (const struct net_device *dev,struct sk_buff *skb) {#ifdef CONFIG_HIGHMEM int i;
@@ -2454,46 +2454,51 @@ static int dev_gso_segment(struct sk_buff *skb, netdev_features_t features) }static netdev_features_t harmonize_features (struct sk_buff *skb, -__be16 protocol,netdev_features_t features) +__be16 protocol, +const struct net_device *dev, +netdev_features_t features) {if (skb->ip_summed !=CHECKSUM_NONE && !can_checksum_protocol (features, protocol)) { features &= ~NETIF_F_ALL_CSUM ; - }else if (illegal_highdma (skb->dev, skb)) { + }else if (illegal_highdma (dev, skb)) { features &= ~NETIF_F_SG ; }return features; } -netdev_features_t netif_skb_features (struct sk_buff *skb) +netdev_features_t netif_skb_dev_features (struct sk_buff *skb, +const struct net_device *dev) {__be16 protocol = skb->protocol; -netdev_features_t features = skb->dev->features; +netdev_features_t features = dev->features; -if (skb_shinfo (skb)->gso_segs > skb->dev->gso_max_segs) +if (skb_shinfo (skb)->gso_segs > dev->gso_max_segs) features &= ~NETIF_F_GSO_MASK ;if (protocol ==htons (ETH_P_8021Q ) || protocol ==htons (ETH_P_8021AD )) {struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data; protocol = veh->h_vlan_encapsulated_proto; }else if (!vlan_tx_tag_present (skb)) { -return harmonize_features (skb, protocol, features); +return harmonize_features (skb, protocol, dev, features); } - features &= (skb->dev->vlan_features |NETIF_F_HW_VLAN_CTAG_TX | + features &= (dev->vlan_features |NETIF_F_HW_VLAN_CTAG_TX |NETIF_F_HW_VLAN_STAG_TX );if (protocol !=htons (ETH_P_8021Q ) && protocol !=htons (ETH_P_8021AD )) { -return harmonize_features (skb, protocol, features); +return harmonize_features (skb, protocol, dev, features); }else { features &=NETIF_F_SG |NETIF_F_HIGHDMA |NETIF_F_FRAGLIST |NETIF_F_GEN_CSUM |NETIF_F_HW_VLAN_CTAG_TX |NETIF_F_HW_VLAN_STAG_TX ; -return harmonize_features (skb, protocol, features); +return harmonize_features (skb, protocol, dev, features); } + +return harmonize_features (skb, protocol, dev, features); } -EXPORT_SYMBOL (netif_skb_features); +EXPORT_SYMBOL (netif_skb_dev_features);/* * Returns true if either:
net/core/fib_rules.c +7 -0
@@ -720,6 +720,13 @@ static int fib_rules_event(struct notifier_block *this, unsigned long event,attach_rules (&ops->rules_list, dev);break ; +case NETDEV_CHANGENAME : +list_for_each_entry (ops, &net->rules_ops, list) { +detach_rules (&ops->rules_list, dev); +attach_rules (&ops->rules_list, dev); + } +break ; +case NETDEV_UNREGISTER :list_for_each_entry (ops, &net->rules_ops, list)detach_rules (&ops->rules_list, dev);
net/core/netpoll.c +3 -1
@@ -948,6 +948,7 @@ int netpoll_parse_options(struct netpoll *np, char *opt) {char *cur=opt, *delim;int ipv6; +bool ipversion_set = false;if (*cur !='@' ) {if ((delim =strchr (cur,'@' )) ==NULL )
@@ -960,6 +961,7 @@ int netpoll_parse_options(struct netpoll *np, char *opt) cur++;if (*cur !='/' ) { + ipversion_set = true;if ((delim =strchr (cur,'/' )) ==NULL ) goto parse_failed; *delim =0 ;
@@ -1002,7 +1004,7 @@ int netpoll_parse_options(struct netpoll *np, char *opt) ipv6 =netpoll_parse_ip_addr (cur, &np->remote_ip);if (ipv6 <0 ) goto parse_failed; -else if (np->ipv6 != (bool )ipv6) +else if (ipversion_set && np->ipv6 != (bool )ipv6) goto parse_failed;else np->ipv6 = (bool )ipv6;
net/core/skbuff.c +25 -0
@@ -47,6 +47,8 @@#include <linux/in.h> #include <linux/inet.h> #include <linux/slab.h> +#include <linux/tcp.h> +#include <linux/udp.h> #include <linux/netdevice.h> #ifdef CONFIG_NET_CLS_ACT #include <net/pkt_sched.h>
@@ -3471,3 +3473,26 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,return true; }EXPORT_SYMBOL (skb_try_coalesce); + +/** +* skb_gso_transport_seglen - Return length of individual segments of a gso packet +* +* @skb: GSO skb +* +* skb_gso_transport_seglen is used to determine the real size of the +* individual segments, including Layer4 headers (TCP/UDP). +* +* The MAC/L2 or network (IP, IPv6) headers are not accounted for. +*/ +unsigned int skb_gso_transport_seglen (const struct sk_buff *skb) +{ +const struct skb_shared_info *shinfo =skb_shinfo (skb); +unsigned int hdr_len; + +if (likely (shinfo->gso_type & (SKB_GSO_TCPV4 |SKB_GSO_TCPV6 ))) + hdr_len =tcp_hdrlen (skb); +else + hdr_len =sizeof (struct udphdr ); +return hdr_len + shinfo->gso_size; +} +EXPORT_SYMBOL_GPL (skb_gso_transport_seglen);
net/core/sock.c +1 -1
@@ -1814,7 +1814,7 @@ bool sk_page_frag_refill(struct sock *sk, struct page_frag *pfrag)gfp_t gfp = sk->sk_allocation;if (order) - gfp |= __GFP_COMP | __GFP_NOWARN; + gfp |= __GFP_COMP | __GFP_NOWARN | __GFP_NORETRY; pfrag->page =alloc_pages (gfp, order);if (likely (pfrag->page)) { pfrag->offset =0 ;
net/ieee802154/6lowpan.c +20 -0
@@ -1173,7 +1173,27 @@ static struct header_ops lowpan_header_ops = { .create = lowpan_header_create, }; +static struct lock_class_key lowpan_tx_busylock; +static struct lock_class_key lowpan_netdev_xmit_lock_key; + +static void lowpan_set_lockdep_class_one (struct net_device *dev, +struct netdev_queue *txq, +void *_unused) +{ +lockdep_set_class (&txq->_xmit_lock, + &lowpan_netdev_xmit_lock_key); +} + + +static int lowpan_dev_init (struct net_device *dev) +{ +netdev_for_each_tx_queue (dev, lowpan_set_lockdep_class_one,NULL ); + dev->qdisc_tx_busylock = &lowpan_tx_busylock; +return 0 ; +} +static const struct net_device_ops lowpan_netdev_ops = { + .ndo_init = lowpan_dev_init, .ndo_start_xmit = lowpan_xmit, .ndo_set_mac_address = lowpan_set_address, };
net/ipv4/devinet.c +2 -1
@@ -1433,7 +1433,8 @@ static size_t inet_nlmsg_size(void) +nla_total_size (4 )/* IFA_ADDRESS */ +nla_total_size (4 )/* IFA_LOCAL */ +nla_total_size (4 )/* IFA_BROADCAST */ - +nla_total_size (IFNAMSIZ );/* IFA_LABEL */ + +nla_total_size (IFNAMSIZ )/* IFA_LABEL */ + +nla_total_size (sizeof (struct ifa_cacheinfo ));/* IFA_CACHEINFO */ }static inline u32 cstamp_delta (unsigned long cstamp)
net/ipv4/ip_forward.c +69 -2
89 lines not on this page · raw message
net/ipv4/route.c +2 -2
@@ -1544,6 +1544,7 @@ static int __mkroute_input(struct sk_buff *skb, rth->rt_gateway =0 ; rth->rt_uses_gateway =0 ;INIT_LIST_HEAD (&rth->rt_uncached); +RT_CACHE_STAT_INC (in_slow_tot); rth->dst.input = ip_forward; rth->dst.output = ip_output;
@@ -1645,8 +1646,6 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,if (err !=0 ) goto no_route; -RT_CACHE_STAT_INC (in_slow_tot); -if (res.type ==RTN_BROADCAST ) goto brd_input;
@@ -1715,6 +1714,7 @@ local_input: rth->rt_gateway =0 ; rth->rt_uses_gateway =0 ;INIT_LIST_HEAD (&rth->rt_uncached); +RT_CACHE_STAT_INC (in_slow_tot);if (res.type ==RTN_UNREACHABLE ) { rth->dst.input= ip_error; rth->dst.error= -err;
net/ipv4/tcp_output.c +11 -2
@@ -686,7 +686,8 @@ static void tcp_tsq_handler(struct sock *sk)if ((1 << sk->sk_state) & (TCPF_ESTABLISHED |TCPF_FIN_WAIT1 |TCPF_CLOSING |TCPF_CLOSE_WAIT |TCPF_LAST_ACK )) -tcp_write_xmit (sk,tcp_current_mss (sk),0 ,0 ,GFP_ATOMIC ); +tcp_write_xmit (sk,tcp_current_mss (sk),tcp_sk (sk)->nonagle, +0 ,GFP_ATOMIC ); }/* * One tasklest per cpu tries to send more skbs.
@@ -1875,7 +1876,15 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,if (atomic_read (&sk->sk_wmem_alloc) > limit) {set_bit (TSQ_THROTTLED , &tp->tsq_flags); -break ; +/* It is possible TX completion already happened +* before we set TSQ_THROTTLED, so we must +* test again the condition. +* We abuse smp_mb__after_clear_bit() because +* there is no smp_mb__after_set_bit() yet +*/ +smp_mb__after_clear_bit (); +if (atomic_read (&sk->sk_wmem_alloc) > limit) +break ; } limit = mss_now;
net/ipv6/ip6_output.c +15 -2
@@ -345,6 +345,20 @@ static inline int ip6_forward_finish(struct sk_buff *skb)return dst_output (skb); } +static bool ip6_pkt_too_big (const struct sk_buff *skb,unsigned int mtu) +{ +if (skb->len <= mtu || skb->local_df) +return false; + +if (IP6CB (skb)->frag_max_size &&IP6CB (skb)->frag_max_size > mtu) +return true; + +if (skb_is_gso (skb) &&skb_gso_network_seglen (skb) <= mtu) +return false; + +return true; +} +int ip6_forward (struct sk_buff *skb) {struct dst_entry *dst =skb_dst (skb);
@@ -467,8 +481,7 @@ int ip6_forward(struct sk_buff *skb)if (mtu <IPV6_MIN_MTU ) mtu =IPV6_MIN_MTU ; -if ((!skb->local_df && skb->len > mtu && !skb_is_gso (skb)) || - (IP6CB (skb)->frag_max_size &&IP6CB (skb)->frag_max_size > mtu)) { +if (ip6_pkt_too_big (skb, mtu)) {/* Again, force OUTPUT device used as source address */ skb->dev = dst->dev;icmpv6_send (skb,ICMPV6_PKT_TOOBIG ,0 , mtu);
net/sctp/socket.c +32 -9
65 lines not on this page · raw message
net/sunrpc/xprtsock.c +5 -1
@@ -502,6 +502,7 @@ static int xs_nospace(struct rpc_task *task)struct rpc_rqst *req = task->tk_rqstp;struct rpc_xprt *xprt = req->rq_xprt; struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); +struct sock *sk = transport->inet;int ret = -EAGAIN ; dprintk("RPC: %5u xmit incomplete (%u left of %u)\n",
@@ -519,7 +520,7 @@ static int xs_nospace(struct rpc_task *task)* window size */ set_bit (SOCK_NOSPACE , &transport->sock->flags); - transport->inet->sk_write_pending++; + sk->sk_write_pending++;/* ...and wait for more buffer space */ xprt_wait_for_buffer_space (task, xs_nospace_callback); }
@@ -529,6 +530,9 @@ static int xs_nospace(struct rpc_task *task) }spin_unlock_bh (&xprt->transport_lock); + +/* Race breaker in case memory is freed before above code is called */ + sk->sk_write_space (sk);return ret; }
security/selinux/ss/policydb.c +4 -4
@@ -3258,10 +3258,10 @@ static int filename_write_helper(void *key, void *data, void *ptr)if (rc)return rc; - buf[0 ] = ft->stype; - buf[1 ] = ft->ttype; - buf[2 ] = ft->tclass; - buf[3 ] = otype->otype; + buf[0 ] =cpu_to_le32 (ft->stype); + buf[1 ] =cpu_to_le32 (ft->ttype); + buf[2 ] =cpu_to_le32 (ft->tclass); + buf[3 ] =cpu_to_le32 (otype->otype); rc =put_entry (buf,sizeof (u32),4 , fp);if (rc)
sound/pci/hda/patch_ca0132.c +7 -61
104 lines not on this page · raw message
sound/pci/hda/patch_sigmatel.c +33 -0
@@ -83,6 +83,7 @@ enum {STAC_DELL_M6_BOTH ,STAC_DELL_EQ ,STAC_ALIENWARE_M17X , +STAC_92HD89XX_HP_FRONT_JACK , STAC_92HD73XX_MODELS };
@@ -97,6 +98,7 @@ enum {STAC_92HD83XXX_HP_LED ,STAC_92HD83XXX_HP_INV_LED ,STAC_92HD83XXX_HP_MIC_LED , +STAC_HP_LED_GPIO10 ,STAC_92HD83XXX_HEADSET_JACK ,STAC_92HD83XXX_HP , STAC_HP_ENVY_BASS,
@@ -1775,6 +1777,12 @@ static const struct hda_pintbl intel_dg45id_pin_configs[] = { {} }; +static const struct hda_pintbl stac92hd89xx_hp_front_jack_pin_configs[] = { + {0x0a ,0x02214030 }, + {0x0b ,0x02A19010 }, + {} +}; +static void stac92hd73xx_fixup_ref (struct hda_codec *codec,const struct hda_fixup *fix,int action) {
@@ -1893,6 +1901,10 @@ static const struct hda_fixup stac92hd73xx_fixups[] = { [STAC_92HD73XX_NO_JD ] = { .type =HDA_FIXUP_FUNC , .v.func = stac92hd73xx_fixup_no_jd, + }, + [STAC_92HD89XX_HP_FRONT_JACK ] = { + .type =HDA_FIXUP_PINS , + .v.pins = stac92hd89xx_hp_front_jack_pin_configs, } };
@@ -1953,6 +1965,8 @@ static const struct snd_pci_quirk stac92hd73xx_fixup_tbl[] = { "Alienware M17x", STAC_ALIENWARE_M17X), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0490, "Alienware M17x R3", STAC_DELL_EQ), + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2b17, + "unknown HP", STAC_92HD89XX_HP_FRONT_JACK), {}/* terminator */ };
@@ -2094,6 +2108,17 @@ static void stac92hd83xxx_fixup_hp_mic_led(struct hda_codec *codec, spec->mic_mute_led_gpio =0x08 ;/* GPIO3 */ } +static void stac92hd83xxx_fixup_hp_led_gpio10 (struct hda_codec *codec, +const struct hda_fixup *fix,int action) +{ +struct sigmatel_spec *spec = codec->spec; + +if (action ==HDA_FIXUP_ACT_PRE_PROBE ) { + spec->gpio_led =0x10 ;/* GPIO4 */ + spec->default_polarity =0 ; + } +} +static void stac92hd83xxx_fixup_headset_jack (struct hda_codec *codec,const struct hda_fixup *fix,int action) {
@@ -2160,6 +2185,12 @@ static const struct hda_fixup stac92hd83xxx_fixups[] = { .chained = true, .chain_id = STAC_92HD83XXX_HP,
Lines of this file are not shown. View the raw message.
sound/soc/codecs/sta32x.c +38 -38
76 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.