Linux 3.6.8
Greg KH
maintainerI'm announcing the release of the 3.6.8 kernel.
All users of the 3.6 kernel series must upgrade.
The updated 3.6.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.6.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/cgroups/memory.txt | 4 + Makefile | 2 arch/arm/boot/dts/tegra30.dtsi | 4 - arch/arm/mach-at91/at91sam9g45_devices.c | 12 ++-- arch/arm/mach-imx/ehci-imx25.c | 2 arch/arm/mach-imx/ehci-imx35.c | 2 arch/arm/plat-omap/include/plat/omap-serial.h | 4 - arch/m68k/include/asm/signal.h | 6 +- arch/s390/include/asm/compat.h | 2 arch/s390/include/asm/ptrace.h | 4 - arch/s390/kernel/compat_signal.c | 14 ++++- arch/s390/kernel/signal.c | 14 ++++- arch/s390/mm/gup.c | 2 arch/x86/kvm/vmx.c | 11 ++-- crypto/cryptd.c | 11 +++- drivers/acpi/video.c | 11 ++-- drivers/ata/libata-acpi.c | 11 +++- drivers/gpu/drm/i915/intel_sdvo.c | 22 +++++++- drivers/gpu/drm/radeon/atombios_encoders.c | 2 drivers/gpu/drm/ttm/ttm_page_alloc.c | 5 + drivers/i2c/muxes/i2c-mux-pinctrl.c | 2 drivers/iommu/intel-iommu.c | 4 - drivers/net/ethernet/broadcom/Kconfig | 1 drivers/net/ethernet/broadcom/tg3.c | 9 --- drivers/net/ethernet/realtek/r8169.c | 7 ++ drivers/net/wireless/iwlwifi/pcie/rx.c | 23 ++++++++ drivers/pci/pci-driver.c | 12 ---- drivers/pci/pci-sysfs.c | 34 ------------- drivers/pci/pci.c | 32 ++++++++++++ drivers/pci/pci.h | 2 drivers/pci/proc.c | 8 +++ drivers/regulator/core.c | 2 drivers/scsi/isci/host.c | 10 ++- drivers/staging/android/android_alarm.h | 4 - drivers/tty/serial/omap-serial.c | 12 ++-- drivers/usb/serial/keyspan.c | 3 - drivers/usb/serial/option.c | 9 +++ drivers/usb/serial/usb_wwan.c | 10 +-- drivers/virtio/virtio.c | 4 + drivers/xen/events.c | 2 fs/cifs/cifsacl.c | 49 +++++++------------ fs/cifs/dir.c | 11 +++- fs/ext4/ext4.h | 3 - fs/ext4/ext4_jbd2.c | 8 --- fs/ext4/resize.c | 2 fs/ext4/super.c | 7 +- fs/gfs2/file.c | 12 +--- fs/gfs2/super.c | 3 - fs/notify/fanotify/fanotify.c | 1 fs/pstore/platform.c | 3 - fs/reiserfs/inode.c | 10 ++- fs/reiserfs/stree.c | 4 + fs/reiserfs/super.c | 60 +++++++++++++++++------ fs/ubifs/find.c | 12 +++- fs/ubifs/lprops.c | 6 ++ fs/ubifs/ubifs.h | 3 + fs/xfs/xfs_buf.c | 14 ++++- include/linux/mmzone.h | 2 include/linux/ptp_clock_kernel.h | 3 - kernel/module.c | 27 ++++++---- mm/memcontrol.c | 67 +++++++++++++++++++------- mm/mmzone.c | 6 -- mm/page_alloc.c | 2 mm/shmem.c | 18 +++++- mm/vmscan.c | 2 net/bluetooth/mgmt.c | 11 ++-- net/core/dev.c | 4 + net/core/dev_addr_lists.c | 3 - net/ipv4/ip_sockglue.c | 35 ++++++++----- net/ipv4/ip_vti.c | 5 + net/ipv4/netfilter/nf_nat_standalone.c | 6 +- net/ipv4/tcp.c | 4 - net/ipv4/tcp_metrics.c | 12 +++- net/ipv4/tcp_output.c | 4 + net/ipv6/ipv6_sockglue.c | 1 net/mac80211/ieee80211_i.h | 2 net/mac80211/sta_info.c | 11 +++- net/mac80211/status.c | 9 +++ net/mac80211/tx.c | 9 ++- net/mac80211/util.c | 2 net/netfilter/nf_conntrack_h323_main.c | 3 - net/netfilter/xt_TEE.c | 1 net/nfc/llcp/llcp.c | 4 - net/wireless/reg.c | 5 - security/selinux/netnode.c | 3 - sound/pci/hda/patch_analog.c | 1 sound/pci/hda/patch_cirrus.c | 16 +++--- sound/pci/hda/patch_realtek.c | 27 +++++----- sound/pci/hda/patch_via.c | 25 ++++++--- sound/soc/codecs/cs42l52.c | 3 - sound/soc/codecs/wm8978.c | 2 sound/soc/soc-core.c | 5 + sound/soc/soc-dapm.c | 2 sound/usb/endpoint.c | 13 +++++ sound/usb/endpoint.h | 1 sound/usb/pcm.c | 3 + 96 files changed, 594 insertions(+), 308 deletions(-)
Aaron Lu (1):
libata-acpi: Fix NULL ptr derference in ata_acpi_dev_handle
Alex Deucher (1):
drm/radeon: fix logic error in atombios_encoders.c
Alex Williamson (1):
intel-iommu: Fix lookup in add device
Alexander Stein (1):
ALSA: hda: Cirrus: Fix coefficient index for beep configuration
Andreas Schwab (1):
m68k: fix sigset_t accessor functions
Andrew Vagin (1):
tcp: fix retransmission in repair mode
Arik Nemtsov (1):
mac80211: sync acccess to tx_filtered/ps_tx_buf queues
Artem Bityutskiy (2):
UBIFS: fix mounting problems after power cuts
UBIFS: introduce categorized lprops counter
Benjamin Marzinski (1):
GFS2: Don't call file_accessed() with a shared glock
Bjørn Mork (1):
USB: keyspan: fix typo causing GPF on open
Christoph Fritz (1):
ARM: imx: ehci: fix host power mask bit
Colin Cross (1):
Revert "Staging: Android alarm: IOCTL command encoding fix"
Colin Ian King (1):
pstore: Fix NULL pointer dereference in console writes
Cornelia Huck (1):
virtio: Don't access index after unregister.
Cyril Brulebois (1):
r8169: Fix WoL on RTL8168d/8111d.
Dan Williams (2):
USB: option: add Novatel E362 and Dell Wireless 5800 USB IDs
USB: option: add Alcatel X220/X500D USB IDs
Daniel J Blueman (1):
ALSA: HDA: Fix digital microphone on CS420x
Dave Chinner (1):
xfs: drop buffer io reference when a bad bio is built
Dave Jones (1):
selinux: fix sel_netnode_insert() suspicious rcu dereference
Eric Dumazet (2):
tcp: handle tcp_net_metrics_init() order-5 memory allocation failures
netfilter: xt_TEE: don't use destination address found in header
Eric Millbrandt (1):
ASoC: wm8978: pll incorrectly configured when codec is master
Eric Paris (1):
fanotify: fix missing break
Felipe Balbi (1):
Revert "serial: omap: fix software flow control"
Felix Fietkau (1):
mac80211: call skb_dequeue/ieee80211_free_txskb instead of __skb_queue_purge
Greg Kroah-Hartman (1):
Linux 3.6.8
Guenter Roeck (1):
i2c-mux-pinctrl: Fix probe error path
Hannes Frederic Sowa (1):
ipv6: setsockopt(IPIPPROTO_IPV6, IPV6_MINHOPCOUNT) forgot to set return value
Heiko Carstens (1):
s390/gup: add missing TASK_SIZE check to get_user_pages_fast()
Huang Ying (2):
PCI/PM: Resume device before shutdown
PCI/PM: Fix proc config reg access for D3cold and bridge suspending
Hugh Dickins (3):
tmpfs: fix shmem_getpage_gfp() VM_BUG_ON
memcg: fix hotplugged memory zone oops
tmpfs: change final i_blocks BUG to WARNING
Igor Murzov (1):
ACPI video: Ignore errors after _DOD evaluation.
Jacob Keller (1):
ptp: update adjfreq callback description
Jan Kara (4):
reiserfs: Fix lock ordering during remount
reiserfs: Protect reiserfs_quota_on() with write lock
reiserfs: Move quota calls out of write lock
reiserfs: Protect reiserfs_quota_write() with write lock
Jani Nikula (1):
drm/i915/sdvo: clean up connectors on intel_sdvo_init() failures
Jeff Layton (1):
cifs: fix potential buffer overrun in cifs.idmap handling code
Jeff Skirvin (1):
SCSI: isci: Allow SSP tasks into the task management path.
Jiri Pirko (1):
net: correct check in dev_addr_del()
Johan Hedberg (1):
Bluetooth: Fix having bogus entries in mgmt_read_index_list reply
Johan Hovold (1):
USB: usb_wwan: fix bulk-urb allocation
Johannes Berg (3):
mac80211: don't send null data packet when not associated
iwlwifi: handle DMA mapping failures
wireless: allow 40 MHz on world roaming channels 12/13
Julian Anastasov (1):
netfilter: nf_conntrack: fix rt_gateway checks for H.323 helper
Jussi Kivilinna (1):
crypto: cryptd - disable softirqs in cryptd_queue_worker to prevent data corruption
Kailang Yang (2):
ALSA: hda - Improve HP depop when system enter to S3
ALSA: hda - Add new codec ALC668 and ALC900 (default name ALC1150)
Marek Szyprowski (1):
regulator: fix voltage check in regulator_is_supported_voltage()
Martin Schwidefsky (1):
s390/signal: set correct address space control
Michal Hocko (1):
memcg: oom: fix totalpages calculation for memory.swappiness==0
Michal Schmidt (1):
r8169: use unlimited DMA burst for TX
Misael Lopez Cruz (1):
ASoC: dapm: Use card_list during DAPM shutdown
Mojiong Qiu (1):
xen/events: fix RCU warning, or Call idle notifier after irq_enter()
Mukund Navada (1):
ASoC: core: Double control update err for snd_soc_put_volsw_sx
Nathan Walp (1):
r8169: allow multicast packets on sub-8168f chipset.
Nicolas Royer (1):
ARM: at91/AT91SAM9G45: fix crypto peripherals irq issue due to sparse irq support
Paul Gortmaker (1):
tg3: unconditionally select HWMON support when tg3 is enabled.
Pritesh Raithatha (1):
ARM: dt: tegra: fix length of pad control and mux registers
Rusty Russell (1):
module: fix out-by-one error in kallsyms
Sachin Prabhu (1):
cifs: Do not lookup hashed negative dentry in cifs_atomic_open
Saurabh Mohan (1):
ipv4/ip_vti.c: VTI fix post-decryption forwarding
Szymon Janc (1):
NFC: Use dynamic initialization for rwlocks
Takamori Yamaguchi (1):
mm: bugfix: set current->reclaim_state to NULL while returning from kswapd()
Takashi Iwai (6):
ALSA: hda - Force to reset IEC958 status bits for AD codecs
ALSA: hda - Fix empty DAC filling in patch_via.c
ALSA: hda - Fix invalid connections in VT1802 codec
ALSA: hda - Add a missing quirk entry for iMac 9,1
KVM: x86: Fix invalid secondary exec controls in vmx_cpuid_update()
ALSA: usb-audio: Fix crash at re-preparing the PCM stream
Theodore Ts'o (1):
ext4: fix metadata checksum calculation for the superblock
Tom Herbert (1):
net-rps: Fix brokeness causing OOO packets
Ulrich Weber (1):
netfilter: nf_nat: don't check for port change on ICMP tuples
Wei Yongjun (1):
ASoC: cs42l52: fix the return value of cs42l52_set_fmt()
Xi Wang (1):
ipv4: avoid undefined behavior in do_ip_setsockopt()
Zhao Yakui (1):
ttm: Clear the ttm page allocated from high memory zone correctly
Greg KH
maintainerDocumentation/cgroups/memory.txt +4 -0
@@ -466,6 +466,10 @@ Note: 5.3 swappiness Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. +Please note that unlike the global swappiness, memcg knob set to 0 +really prevents from any swapping even if there is a swap storage +available. This might lead to memcg OOM killer if there are no file +pages to reclaim. Following cgroups' swappiness can't be changed. - root cgroup (uses /proc/sys/vm/swappiness).
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 6 -SUBLEVEL = 7 +SUBLEVEL = 8 EXTRAVERSION = NAME = Terrified Chipmunk
arch/arm/boot/dts/tegra30.dtsi +2 -2
@@ -73,8 +73,8 @@ pinmux: pinmux { compatible = "nvidia,tegra30-pinmux"; - reg = <0x70000868 0xd0 /* Pad control registers */ - 0x70003000 0x3e0>; /* Mux registers */ + reg = <0x70000868 0xd4 /* Pad control registers */ + 0x70003000 0x3e4>; /* Mux registers */ }; serial@70006000 {
arch/arm/mach-at91/at91sam9g45_devices.c +6 -6
@@ -1847,8 +1847,8 @@ static struct resource sha_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91SAM9G45_ID_AESTDESSHA, - .end = AT91SAM9G45_ID_AESTDESSHA, + .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, + .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, .flags = IORESOURCE_IRQ, }, };
@@ -1880,8 +1880,8 @@ static struct resource tdes_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91SAM9G45_ID_AESTDESSHA, - .end = AT91SAM9G45_ID_AESTDESSHA, + .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, + .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, .flags = IORESOURCE_IRQ, }, };
@@ -1916,8 +1916,8 @@ static struct resource aes_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91SAM9G45_ID_AESTDESSHA, - .end = AT91SAM9G45_ID_AESTDESSHA, + .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, + .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, .flags = IORESOURCE_IRQ, }, };
arch/arm/mach-imx/ehci-imx25.c +1 -1
@@ -30,7 +30,7 @@#define MX25_H1_SIC_SHIFT 21#define MX25_H1_SIC_MASK (0x3 << MX25_H1_SIC_SHIFT)#define MX25_H1_PP_BIT (1 << 18) -#define MX25_H1_PM_BIT (1 << 8) +#define MX25_H1_PM_BIT (1 << 16)#define MX25_H1_IPPUE_UP_BIT (1 << 7)#define MX25_H1_IPPUE_DOWN_BIT (1 << 6)#define MX25_H1_TLL_BIT (1 << 5)
arch/arm/mach-imx/ehci-imx35.c +1 -1
@@ -30,7 +30,7 @@#define MX35_H1_SIC_SHIFT 21#define MX35_H1_SIC_MASK (0x3 << MX35_H1_SIC_SHIFT)#define MX35_H1_PP_BIT (1 << 18) -#define MX35_H1_PM_BIT (1 << 8) +#define MX35_H1_PM_BIT (1 << 16)#define MX35_H1_IPPUE_UP_BIT (1 << 7)#define MX35_H1_IPPUE_DOWN_BIT (1 << 6)#define MX35_H1_TLL_BIT (1 << 5)
arch/arm/plat-omap/include/plat/omap-serial.h +2 -2
@@ -42,10 +42,10 @@#define OMAP_UART_WER_MOD_WKUP 0X7F/* Enable XON/XOFF flow control on output */ -#define OMAP_UART_SW_TX 0x8 +#define OMAP_UART_SW_TX 0x04/* Enable XON/XOFF flow control on input */ -#define OMAP_UART_SW_RX 0x2 +#define OMAP_UART_SW_RX 0x04#define OMAP_UART_SYSC_RESET 0X07#define OMAP_UART_TCR_TRIG 0X0F
arch/m68k/include/asm/signal.h +3 -3
@@ -156,7 +156,7 @@ typedef struct sigaltstack {static inline void sigaddset (sigset_t *set,int _sig) { asm ("bfset %0{%1,#1}" - :"+od" (*set) + :"+o" (*set) :"id" ((_sig -1 ) ^31 ) :"cc" ); }
@@ -164,7 +164,7 @@ static inline void sigaddset(sigset_t *set, int _sig)static inline void sigdelset (sigset_t *set,int _sig) { asm ("bfclr %0{%1,#1}" - :"+od" (*set) + :"+o" (*set) :"id" ((_sig -1 ) ^31 ) :"cc" ); }
@@ -180,7 +180,7 @@ static inline int __gen_sigismember(sigset_t *set, int _sig)int ret; asm ("bfextu %1{%2,#1},%0" :"=d" (ret) - :"od" (*set),"id" ((_sig-1 ) ^31 ) + :"o" (*set),"id" ((_sig-1 ) ^31 ) :"cc" );return ret; }
arch/s390/include/asm/compat.h +1 -1
@@ -20,7 +20,7 @@#define PSW32_MASK_CC 0x00003000UL#define PSW32_MASK_PM 0x00000f00UL -#define PSW32_MASK_USER 0x00003F00UL +#define PSW32_MASK_USER 0x0000FF00UL#define PSW32_ADDR_AMODE 0x80000000UL#define PSW32_ADDR_INSN 0x7FFFFFFFUL
arch/s390/include/asm/ptrace.h +2 -2
@@ -238,7 +238,7 @@ typedef struct#define PSW_MASK_EA 0x00000000UL#define PSW_MASK_BA 0x00000000UL -#define PSW_MASK_USER 0x00003F00UL +#define PSW_MASK_USER 0x0000FF00UL#define PSW_ADDR_AMODE 0x80000000UL#define PSW_ADDR_INSN 0x7FFFFFFFUL
@@ -267,7 +267,7 @@ typedef struct#define PSW_MASK_EA 0x0000000100000000UL#define PSW_MASK_BA 0x0000000080000000UL -#define PSW_MASK_USER 0x00003F0180000000UL +#define PSW_MASK_USER 0x0000FF0180000000UL#define PSW_ADDR_AMODE 0x0000000000000000UL#define PSW_ADDR_INSN 0xFFFFFFFFFFFFFFFFUL
arch/s390/kernel/compat_signal.c +12 -2
@@ -309,6 +309,10 @@ static int restore_sigregs32(struct pt_regs *regs,_sigregs32 __user *sregs) regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER ) | (__u64)(regs32.psw.mask &PSW32_MASK_USER ) <<32 | (__u64)(regs32.psw.addr &PSW32_ADDR_AMODE ); +/* Check for invalid user address space control. */ +if ((regs->psw.mask &PSW_MASK_ASC ) >= (psw_kernel_bits &PSW_MASK_ASC )) + regs->psw.mask = (psw_user_bits &PSW_MASK_ASC ) | + (regs->psw.mask & ~PSW_MASK_ASC ); regs->psw.addr = (__u64)(regs32.psw.addr &PSW32_ADDR_INSN );for (i =0 ; i <NUM_GPRS ; i++) regs->gprs[i] = (__u64 ) regs32.gprs[i];
@@ -481,7 +485,10 @@ static int setup_frame32(int sig, struct k_sigaction *ka,/* Set up registers for signal handler */ regs->gprs[15 ] = (__force __u64 ) frame; - regs->psw.mask |=PSW_MASK_BA ;/* force amode 31 */ +/* Force 31 bit amode and default user address space control. */ + regs->psw.mask =PSW_MASK_BA | + (psw_user_bits &PSW_MASK_ASC ) | + (regs->psw.mask & ~PSW_MASK_ASC ); regs->psw.addr = (__force __u64 ) ka->sa.sa_handler; regs->gprs[2 ] =map_signal (sig);
@@ -549,7 +556,10 @@ static int setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info,/* Set up registers for signal handler */ regs->gprs[15 ] = (__force __u64 ) frame; - regs->psw.mask |=PSW_MASK_BA ;/* force amode 31 */ +/* Force 31 bit amode and default user address space control. */ + regs->psw.mask =PSW_MASK_BA | + (psw_user_bits &PSW_MASK_ASC ) | + (regs->psw.mask & ~PSW_MASK_ASC ); regs->psw.addr = (__u64 ) ka->sa.sa_handler; regs->gprs[2 ] =map_signal (sig);
arch/s390/kernel/signal.c +12 -2
@@ -136,6 +136,10 @@ static int restore_sigregs(struct pt_regs *regs, _sigregs __user *sregs)/* Use regs->psw.mask instead of psw_user_bits to preserve PER bit. */ regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER ) | (user_sregs.regs.psw.mask &PSW_MASK_USER ); +/* Check for invalid user address space control. */ +if ((regs->psw.mask &PSW_MASK_ASC ) >= (psw_kernel_bits &PSW_MASK_ASC )) + regs->psw.mask = (psw_user_bits &PSW_MASK_ASC ) | + (regs->psw.mask & ~PSW_MASK_ASC );/* Check for invalid amode */ if (regs->psw.mask &PSW_MASK_EA ) regs->psw.mask |=PSW_MASK_BA ;
@@ -273,7 +277,10 @@ static int setup_frame(int sig, struct k_sigaction *ka,/* Set up registers for signal handler */ regs->gprs[15 ] = (unsigned long ) frame; - regs->psw.mask |=PSW_MASK_EA |PSW_MASK_BA ;/* 64 bit amode */ +/* Force default amode and default user address space control. */ + regs->psw.mask =PSW_MASK_EA |PSW_MASK_BA | + (psw_user_bits &PSW_MASK_ASC ) | + (regs->psw.mask & ~PSW_MASK_ASC ); regs->psw.addr = (unsigned long ) ka->sa.sa_handler |PSW_ADDR_AMODE ; regs->gprs[2 ] =map_signal (sig);
@@ -346,7 +353,10 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,/* Set up registers for signal handler */ regs->gprs[15 ] = (unsigned long ) frame; - regs->psw.mask |=PSW_MASK_EA |PSW_MASK_BA ;/* 64 bit amode */ +/* Force default amode and default user address space control. */ + regs->psw.mask =PSW_MASK_EA |PSW_MASK_BA | + (psw_user_bits &PSW_MASK_ASC ) | + (regs->psw.mask & ~PSW_MASK_ASC ); regs->psw.addr = (unsigned long ) ka->sa.sa_handler |PSW_ADDR_AMODE ; regs->gprs[2 ] =map_signal (sig);
arch/s390/mm/gup.c +1 -1
@@ -183,7 +183,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, addr = start; len = (unsigned long ) nr_pages <<PAGE_SHIFT ; end = start + len; -if (end < start) +if ((end < start) || (end >TASK_SIZE )) goto slow_irqon;/*
arch/x86/kvm/vmx.c +7 -4
@@ -6584,19 +6584,22 @@ static void vmx_cpuid_update(struct kvm_vcpu *vcpu) } } - exec_control =vmcs_read32 (SECONDARY_VM_EXEC_CONTROL );/* Exposing INVPCID only when PCID is exposed */ best =kvm_find_cpuid_entry (vcpu,0x7 ,0 );if (vmx_invpcid_supported () && best && (best->ebx &bit (X86_FEATURE_INVPCID )) &&guest_cpuid_has_pcid (vcpu)) { + exec_control =vmcs_read32 (SECONDARY_VM_EXEC_CONTROL ); exec_control |=SECONDARY_EXEC_ENABLE_INVPCID ;vmcs_write32 (SECONDARY_VM_EXEC_CONTROL , exec_control); }else { - exec_control &= ~SECONDARY_EXEC_ENABLE_INVPCID ; -vmcs_write32 (SECONDARY_VM_EXEC_CONTROL , - exec_control); +if (cpu_has_secondary_exec_ctrls ()) { + exec_control =vmcs_read32 (SECONDARY_VM_EXEC_CONTROL ); + exec_control &= ~SECONDARY_EXEC_ENABLE_INVPCID ; +vmcs_write32 (SECONDARY_VM_EXEC_CONTROL , + exec_control); + }if (best) best->ebx &= ~bit (X86_FEATURE_INVPCID ); }
crypto/cryptd.c +8 -3
@@ -137,13 +137,18 @@ static void cryptd_queue_worker(struct work_struct *work)struct crypto_async_request *req, *backlog; cpu_queue = container_of(work, struct cryptd_cpu_queue, work); -/* Only handle one request at a time to avoid hogging crypto -* workqueue. preempt_disable/enable is used to prevent -* being preempted by cryptd_enqueue_request() */ +/* +* Only handle one request at a time to avoid hogging crypto workqueue. +* preempt_disable/enable is used to prevent being preempted by +* cryptd_enqueue_request(). local_bh_disable/enable is used to prevent +* cryptd_enqueue_request() being accessed from software interrupts. +*/ +local_bh_disable ();preempt_disable (); backlog =crypto_get_backlog (&cpu_queue->queue); req =crypto_dequeue_request (&cpu_queue->queue);preempt_enable (); +local_bh_enable ();if (!req)return ;
drivers/acpi/video.c +7 -4
@@ -1345,12 +1345,15 @@ static int acpi_video_bus_get_devices(struct acpi_video_bus *video, struct acpi_device *device) { - int status; + int status = 0;struct acpi_device *dev; - status =acpi_video_device_enumerate (video); -if (status) -return status; +/* +* There are systems where video module known to work fine regardless +* of broken _DOD and ignoring returned value here doesn't cause +* any issues later. +*/ +acpi_video_device_enumerate (video);list_for_each_entry (dev, &device->children, node) {
drivers/ata/libata-acpi.c +8 -3
@@ -1105,10 +1105,15 @@ static int ata_acpi_bind_device(struct ata_port *ap, struct scsi_device *sdev,struct acpi_device *acpi_dev;struct acpi_device_power_state *states; -if (ap->flags &ATA_FLAG_ACPI_SATA ) - ata_dev = &ap->link.device[sdev->channel]; -else +if (ap->flags &ATA_FLAG_ACPI_SATA ) { +if (!sata_pmp_attached (ap)) + ata_dev = &ap->link.device[sdev->id]; +else + ata_dev = &ap->pmp_link[sdev->channel].device[sdev->id]; + } +else { ata_dev = &ap->link.device[sdev->id]; + } *handle =ata_dev_acpi_handle (ata_dev);
drivers/gpu/drm/i915/intel_sdvo.c +19 -3
@@ -2287,6 +2287,18 @@ intel_sdvo_output_setup(struct intel_sdvo *intel_sdvo, uint16_t flags)return true; } +static void intel_sdvo_output_cleanup (struct intel_sdvo *intel_sdvo) +{ +struct drm_device *dev = intel_sdvo->base.base.dev; +struct drm_connector *connector, *tmp; + +list_for_each_entry_safe (connector, tmp, + &dev->mode_config.connector_list, head) { +if (intel_attached_encoder (connector) == &intel_sdvo->base) +intel_sdvo_destroy (connector); + } +} +static bool intel_sdvo_tv_create_property (struct intel_sdvo *intel_sdvo,struct intel_sdvo_connector *intel_sdvo_connector,int type)
@@ -2606,7 +2618,8 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob) intel_sdvo->caps.output_flags) != true) {DRM_DEBUG_KMS ("SDVO output failed to setup on %s\n" ,SDVO_NAME (intel_sdvo)); - goto err; +/* Output_setup can leave behind connectors! */ + goto err_output; }/* Only enable the hotplug irq if we need it, to work around noisy
@@ -2619,12 +2632,12 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)/* Set the input timing to the screen. Assume always input 0. */ if (!intel_sdvo_set_target_input (intel_sdvo)) - goto err; + goto err_output;if (!intel_sdvo_get_input_pixel_clock_range (intel_sdvo, &intel_sdvo->pixel_clock_min, &intel_sdvo->pixel_clock_max)) - goto err; + goto err_output;DRM_DEBUG_KMS ("%s device VID/DID: %02X:%02X.%02X, " "clock range %dMHz - %dMHz, "
@@ -2644,6 +2657,9 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob) (SDVO_OUTPUT_TMDS1 | SDVO_OUTPUT_RGB1) ? 'Y' : 'N');return true; +err_output: +intel_sdvo_output_cleanup (intel_sdvo); + err:drm_encoder_cleanup (&intel_encoder->base);i2c_del_adapter (&intel_sdvo->ddc);
drivers/gpu/drm/radeon/atombios_encoders.c +1 -1
@@ -1421,7 +1421,7 @@ radeon_atom_encoder_dpms_dig(struct drm_encoder *encoder, int mode)atombios_dig_transmitter_setup (encoder,ATOM_TRANSMITTER_ACTION_SETUP ,0 ,0 );atombios_dig_transmitter_setup (encoder,ATOM_TRANSMITTER_ACTION_ENABLE ,0 ,0 );/* some early dce3.2 boards have a bug in their transmitter control table */ -if ((rdev->family !=CHIP_RV710 ) || (rdev->family !=CHIP_RV730 )) +if ((rdev->family !=CHIP_RV710 ) && (rdev->family !=CHIP_RV730 ))atombios_dig_transmitter_setup (encoder,ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT ,0 ,0 ); }if (ENCODER_MODE_IS_DP (atombios_get_encoder_mode (encoder)) && connector) {
drivers/gpu/drm/ttm/ttm_page_alloc.c +4 -1
@@ -749,7 +749,10 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags,/* clear the pages coming from the pool if requested */ if (flags &TTM_PAGE_FLAG_ZERO_ALLOC ) {list_for_each_entry (p, &plist, lru) { -clear_page (page_address (p)); +if (PageHighMem (p)) +clear_highpage (p); +else +clear_page (page_address (p)); } }
drivers/i2c/muxes/i2c-mux-pinctrl.c +1 -1
@@ -169,7 +169,7 @@ static int __devinit i2c_mux_pinctrl_probe(struct platform_device *pdev) mux->busses =devm_kzalloc (&pdev->dev,sizeof (mux->busses) * mux->pdata->bus_count,GFP_KERNEL ); -if (!mux->states) { +if (!mux->busses) {dev_err (&pdev->dev,"Cannot allocate busses\n" ); ret = -ENOMEM ; goto err;
drivers/iommu/intel-iommu.c +2 -2
@@ -4108,7 +4108,7 @@ static void swap_pci_ref(struct pci_dev **from, struct pci_dev *to)static int intel_iommu_add_device (struct device *dev) {struct pci_dev *pdev =to_pci_dev (dev); -struct pci_dev *bridge, *dma_pdev; +struct pci_dev *bridge, *dma_pdev =NULL ;struct iommu_group *group;int ret;
@@ -4122,7 +4122,7 @@ static int intel_iommu_add_device(struct device *dev) dma_pdev =pci_get_domain_bus_and_slot (pci_domain_nr (pdev->bus), bridge->subordinate->number,0 ); - else +if (!dma_pdev) dma_pdev =pci_dev_get (bridge); }else dma_pdev =pci_dev_get (pdev);
drivers/net/ethernet/broadcom/Kconfig +1 -0
@@ -101,6 +101,7 @@ config TIGON3 tristate "Broadcom Tigon3 support" depends on PCI select PHYLIB + select HWMON ---help--- This driver supports Broadcom Tigon3 based gigabit Ethernet cards.
drivers/net/ethernet/broadcom/tg3.c +0 -9
@@ -44,10 +44,8 @@#include <linux/prefetch.h> #include <linux/dma-mapping.h> #include <linux/firmware.h> -#if IS_ENABLED (CONFIG_HWMON )#include <linux/hwmon.h> #include <linux/hwmon-sysfs.h> -#endif #include <net/checksum.h> #include <net/ip.h>
@@ -9517,7 +9515,6 @@ static int tg3_init_hw(struct tg3 *tp, int reset_phy)return tg3_reset_hw (tp, reset_phy); } -#if IS_ENABLED (CONFIG_HWMON )static void tg3_sd_scan_scratchpad (struct tg3 *tp,struct tg3_ocir *ocir) {int i;
@@ -9570,22 +9567,17 @@ static const struct attribute_group tg3_group = { .attrs = tg3_attributes, }; -#endif -static void tg3_hwmon_close (struct tg3 *tp) { -#if IS_ENABLED (CONFIG_HWMON )if (tp->hwmon_dev) {hwmon_device_unregister (tp->hwmon_dev); tp->hwmon_dev =NULL ;sysfs_remove_group (&tp->pdev->dev.kobj, &tg3_group); } -#endif }static void tg3_hwmon_open (struct tg3 *tp) { -#if IS_ENABLED (CONFIG_HWMON )int i, err;u32 size =0 ;struct pci_dev *pdev = tp->pdev;
@@ -9617,7 +9609,6 @@ static void tg3_hwmon_open(struct tg3 *tp)dev_err (&pdev->dev,"Cannot register hwmon device, aborting\n" );sysfs_remove_group (&pdev->dev.kobj, &tg3_group); } -#endif }
drivers/net/ethernet/realtek/r8169.c +6 -1
@@ -77,7 +77,7 @@static const int multicast_filter_limit =32 ;#define MAX_READ_REQUEST_SHIFT 12 -#define TX_DMA_BURST 6/* Maximum PCI burst, '6' is 1024 */ +#define TX_DMA_BURST 7/* Maximum PCI burst, '7' is unlimited */ #define SafeMtu 0x1c20/* ... actually life sucks beyond ~7k */ #define InterFrameGap 0x03/* 3 means InterFrameGap = the shortest one */
@@ -3832,6 +3832,8 @@ static void rtl_wol_suspend_quirk(struct rtl8169_private *tp)void __iomem *ioaddr = tp->mmio_addr;switch (tp->mac_version) { +case RTL_GIGA_MAC_VER_25 : +case RTL_GIGA_MAC_VER_26 :case RTL_GIGA_MAC_VER_29 :case RTL_GIGA_MAC_VER_30 :case RTL_GIGA_MAC_VER_32 :
@@ -4524,6 +4526,9 @@ static void rtl_set_rx_mode(struct net_device *dev) mc_filter[1 ] =swab32 (data); } +if (tp->mac_version ==RTL_GIGA_MAC_VER_35 ) + mc_filter[1 ] = mc_filter[0 ] =0xffffffff ; +RTL_W32 (MAR0 +4 , mc_filter[1 ]);RTL_W32 (MAR0 +0 , mc_filter[0 ]);
drivers/net/wireless/iwlwifi/pcie/rx.c +21 -2
@@ -314,6 +314,14 @@ static void iwlagn_rx_allocate(struct iwl_trans *trans, gfp_t priority)dma_map_page (trans->dev, page,0 ,PAGE_SIZE << trans_pcie->rx_page_order,DMA_FROM_DEVICE ); +if (dma_mapping_error (trans->dev, rxb->page_dma)) { + rxb->page =NULL ; +spin_lock_irqsave (&rxq->lock, flags); +list_add (&rxb->list, &rxq->rx_used); +spin_unlock_irqrestore (&rxq->lock, flags); +__free_pages (page, trans_pcie->rx_page_order); +return ; + }/* dma address must be no more than 36 bits */ BUG_ON (rxb->page_dma & ~DMA_BIT_MASK (36 ));/* and also 256 byte aligned! */
@@ -463,8 +471,19 @@ static void iwl_rx_handle_rxbuf(struct iwl_trans *trans,dma_map_page (trans->dev, rxb->page,0 ,PAGE_SIZE << trans_pcie->rx_page_order,DMA_FROM_DEVICE ); -list_add_tail (&rxb->list, &rxq->rx_free); - rxq->free_count++; +if (dma_mapping_error (trans->dev, rxb->page_dma)) { +/* +* free the page(s) as well to not break +* the invariant that the items on the used +* list have no page(s) +*/ +__free_pages (rxb->page, trans_pcie->rx_page_order); + rxb->page =NULL ; +list_add_tail (&rxb->list, &rxq->rx_used); + }else { +list_add_tail (&rxb->list, &rxq->rx_free); + rxq->free_count++; + } }else list_add_tail (&rxb->list, &rxq->rx_used);spin_unlock_irqrestore (&rxq->lock, flags);
drivers/pci/pci-driver.c +2 -10
@@ -421,6 +421,8 @@ static void pci_device_shutdown(struct device *dev)struct pci_dev *pci_dev =to_pci_dev (dev);struct pci_driver *drv = pci_dev->driver; +pm_runtime_resume (dev); +if (drv && drv->shutdown) drv->shutdown (pci_dev);pci_msi_shutdown (pci_dev);
@@ -431,16 +433,6 @@ static void pci_device_shutdown(struct device *dev)* continue to do DMA */ pci_disable_device (pci_dev); - -/* -* Devices may be enabled to wake up by runtime PM, but they need not -* be supposed to wake up the system from its "power off" state (e.g. -* ACPI S5). Therefore disable wakeup for all devices that aren't -* supposed to wake up the system at this point. The state argument -* will be ignored by pci_enable_wake(). -*/ -if (!device_may_wakeup (dev)) -pci_enable_wake (pci_dev,PCI_UNKNOWN , false); }#ifdef CONFIG_PM
drivers/pci/pci-sysfs.c +0 -34
@@ -458,40 +458,6 @@ boot_vga_show(struct device *dev, struct device_attribute *attr, char *buf) }struct device_attribute vga_attr =__ATTR_RO (boot_vga); -static void -pci_config_pm_runtime_get (struct pci_dev *pdev) -{ -struct device *dev = &pdev->dev; -struct device *parent = dev->parent; - -if (parent) -pm_runtime_get_sync (parent); -pm_runtime_get_noresume (dev); -/* -* pdev->current_state is set to PCI_D3cold during suspending, -* so wait until suspending completes -*/ -pm_runtime_barrier (dev); -/* -* Only need to resume devices in D3cold, because config -* registers are still accessible for devices suspended but -* not in D3cold. -*/ -if (pdev->current_state == PCI_D3cold) -pm_runtime_resume (dev); -} - -static void -pci_config_pm_runtime_put (struct pci_dev *pdev) -{ -struct device *dev = &pdev->dev; -struct device *parent = dev->parent; - -pm_runtime_put (dev); -if (parent) -pm_runtime_put_sync (parent); -} - static ssize_t pci_read_config(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr,
drivers/pci/pci.c +32 -0
@@ -1910,6 +1910,38 @@ bool pci_dev_run_wake(struct pci_dev *dev) }EXPORT_SYMBOL_GPL (pci_dev_run_wake); +void pci_config_pm_runtime_get (struct pci_dev *pdev) +{ +struct device *dev = &pdev->dev; +struct device *parent = dev->parent; + +if (parent) +pm_runtime_get_sync (parent); +pm_runtime_get_noresume (dev); +/* +* pdev->current_state is set to PCI_D3cold during suspending, +* so wait until suspending completes +*/ +pm_runtime_barrier (dev); +/* +* Only need to resume devices in D3cold, because config +* registers are still accessible for devices suspended but +* not in D3cold. +*/ +if (pdev->current_state == PCI_D3cold) +pm_runtime_resume (dev); +} + +void pci_config_pm_runtime_put (struct pci_dev *pdev) +{ +struct device *dev = &pdev->dev; +struct device *parent = dev->parent; + +pm_runtime_put (dev); +if (parent) +pm_runtime_put_sync (parent); +} +/** * pci_pm_init - Initialize PM functions of given PCI device * @dev: PCI device to handle.
drivers/pci/pci.h +2 -0
@@ -72,6 +72,8 @@ extern void pci_disable_enabled_device(struct pci_dev *dev);extern int pci_finish_runtime_suspend (struct pci_dev *dev);extern int __pci_pme_wakeup (struct pci_dev *dev,void *ign);extern void pci_wakeup_bus (struct pci_bus *bus); +extern void pci_config_pm_runtime_get (struct pci_dev *dev); +extern void pci_config_pm_runtime_put (struct pci_dev *dev);extern void pci_pm_init (struct pci_dev *dev);extern void platform_pci_wakeup_init (struct pci_dev *dev);extern void pci_allocate_cap_save_buffers (struct pci_dev *dev);
drivers/pci/proc.c +8 -0
@@ -76,6 +76,8 @@ proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppif (!access_ok (VERIFY_WRITE , buf, cnt))return -EINVAL ; +pci_config_pm_runtime_get (dev); +if ((pos &1 ) && cnt) {unsigned char val;pci_user_read_config_byte (dev, pos, &val);
@@ -121,6 +123,8 @@ proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *pp cnt--; } +pci_config_pm_runtime_put (dev); + *ppos = pos;return nbytes; }
@@ -146,6 +150,8 @@ proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, lofif (!access_ok (VERIFY_READ , buf, cnt))return -EINVAL ; +pci_config_pm_runtime_get (dev); +if ((pos &1 ) && cnt) {unsigned char val;__get_user (val, buf);
@@ -191,6 +197,8 @@ proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, lof cnt--; } +pci_config_pm_runtime_put (dev); + *ppos = pos;i_size_write (ino, dp->size);return nbytes;
drivers/regulator/core.c +1 -1
@@ -1942,7 +1942,7 @@ int regulator_is_supported_voltage(struct regulator *regulator,if (!(rdev->constraints->valid_ops_mask ®ULATOR_CHANGE_VOLTAGE )) { ret =regulator_get_voltage (regulator);if (ret >=0 ) -return (min_uV >= ret && ret <= max_uV); +return (min_uV <= ret && ret <= max_uV);else return ret; }
drivers/scsi/isci/host.c +6 -4
@@ -1079,7 +1079,6 @@ static void sci_controller_completion_handler(struct isci_host *ihost)void ireq_done (struct isci_host *ihost,struct isci_request *ireq,struct sas_task *task) { - task->lldd_task =NULL ;if (!test_bit (IREQ_ABORT_PATH_ACTIVE , &ireq->flags) && !(task->task_state_flags &SAS_TASK_STATE_ABORTED )) {if (test_bit (IREQ_COMPLETE_IN_TARGET , &ireq->flags)) {
@@ -1087,16 +1086,19 @@ void ireq_done(struct isci_host *ihost, struct isci_request *ireq, struct sas_tadev_dbg (&ihost->pdev->dev,"%s: Normal - ireq/task = %p/%p\n" , __func__, ireq, task); - + task->lldd_task =NULL ; task->task_done (task); }else {dev_dbg (&ihost->pdev->dev,"%s: Error - ireq/task = %p/%p\n" , __func__, ireq, task); - +if (sas_protocol_ata (task->task_proto)) + task->lldd_task =NULL ;sas_task_abort (task); } - } + }else + task->lldd_task =NULL ; +if (test_and_clear_bit (IREQ_ABORT_PATH_ACTIVE , &ireq->flags))wake_up_all (&ihost->eventq);
drivers/staging/android/android_alarm.h +1 -3
@@ -51,12 +51,10 @@ enum android_alarm_return_flags {#define ANDROID_ALARM_WAIT _IO('a', 1)#define ALARM_IOW (c, type, size) _IOW('a', (c) | ((type) << 4), size) -#define ALARM_IOR (c, type, size) _IOR('a', (c) | ((type) << 4), size) -/* Set alarm */ #define ANDROID_ALARM_SET (type) ALARM_IOW(2, type, struct timespec)#define ANDROID_ALARM_SET_AND_WAIT (type) ALARM_IOW(3, type, struct timespec) -#define ANDROID_ALARM_GET_TIME (type) ALARM_IOR(4, type, struct timespec) +#define ANDROID_ALARM_GET_TIME (type) ALARM_IOW(4, type, struct timespec)#define ANDROID_ALARM_SET_RTC _IOW('a', 5, struct timespec)#define ANDROID_ALARM_BASE_CMD (cmd) (cmd & ~(_IOC(0, 0, 0xf0, 0)))#define ANDROID_ALARM_IOCTL_TO_TYPE (cmd) (_IOC_NR(cmd) >> 4)
drivers/tty/serial/omap-serial.c +6 -6
@@ -667,19 +667,19 @@ serial_omap_configure_xonxoff/* * IXON Flag: -* Flow control for OMAP.TX -* OMAP.RX should listen for XON/XOFF +* Enable XON/XOFF flow control on output. +* Transmit XON1, XOFF1 */ if (termios->c_iflag &IXON ) - up->efr |=OMAP_UART_SW_RX ; + up->efr |=OMAP_UART_SW_TX ;/* * IXOFF Flag: -* Flow control for OMAP.RX -* OMAP.TX should send XON/XOFF +* Enable XON/XOFF flow control on input. +* Receiver compares XON1, XOFF1. */ if (termios->c_iflag &IXOFF ) - up->efr |=OMAP_UART_SW_TX ; + up->efr |=OMAP_UART_SW_RX ;serial_out (up,UART_EFR , up->efr |UART_EFR_ECB );serial_out (up,UART_LCR ,UART_LCR_CONF_MODE_A );
drivers/usb/serial/keyspan.c +1 -2
@@ -2448,7 +2448,7 @@ static void keyspan_release(struct usb_serial *serial)static int keyspan_port_probe (struct usb_serial_port *port) {struct usb_serial *serial = port->serial; -struct keyspan_port_private *s_priv; +struct keyspan_serial_private *s_priv;struct keyspan_port_private *p_priv;const struct keyspan_device_details *d_details;struct callbacks *cback;
@@ -2463,7 +2463,6 @@ static int keyspan_port_probe(struct usb_serial_port *port)if (!p_priv)return -ENOMEM ; - s_priv =usb_get_serial_data (port->serial); p_priv->device_details = d_details;/* Setup values for the various callback routines */
drivers/usb/serial/option.c +9 -0
@@ -158,6 +158,7 @@ static void option_instat_callback(struct urb *urb);#define NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_HIGHSPEED 0x8001#define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED 0x9000#define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED 0x9001 +#define NOVATELWIRELESS_PRODUCT_E362 0x9010#define NOVATELWIRELESS_PRODUCT_G1 0xA001#define NOVATELWIRELESS_PRODUCT_G1_M 0xA002#define NOVATELWIRELESS_PRODUCT_G2 0xA010
@@ -193,6 +194,9 @@ static void option_instat_callback(struct urb *urb);#define DELL_PRODUCT_5730_MINICARD_TELUS 0x8181#define DELL_PRODUCT_5730_MINICARD_VZW 0x8182 +#define DELL_PRODUCT_5800_MINICARD_VZW 0x8195/* Novatel E362 */ +#define DELL_PRODUCT_5800_V2_MINICARD_VZW 0x8196/* Novatel E362 */ +#define KYOCERA_VENDOR_ID 0x0c88#define KYOCERA_PRODUCT_KPC650 0x17da#define KYOCERA_PRODUCT_KPC680 0x180a
@@ -283,6 +287,7 @@ static void option_instat_callback(struct urb *urb);/* ALCATEL PRODUCTS */ #define ALCATEL_VENDOR_ID 0x1bbb#define ALCATEL_PRODUCT_X060S_X200 0x0000 +#define ALCATEL_PRODUCT_X220_X500D 0x0017#define PIRELLI_VENDOR_ID 0x1266#define PIRELLI_PRODUCT_C100_1 0x1002
@@ -706,6 +711,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G2) },/* Novatel Ovation MC551 a.k.a. Verizon USB551L */ { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC551, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E362, 0xff, 0xff, 0xff) }, { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) }, { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) },
@@ -728,6 +734,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_SPRINT) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_TELUS) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_VZW) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ + { USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, DELL_PRODUCT_5800_MINICARD_VZW, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, DELL_PRODUCT_5800_V2_MINICARD_VZW, 0xff, 0xff, 0xff) }, { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, /* ADU-E100, ADU-310 */ { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) },
@@ -1157,6 +1165,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S_X200), .driver_info = (kernel_ulong_t)&alcatel_x200_blacklist }, + { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X220_X500D) }, { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14),
drivers/usb/serial/usb_wwan.c +5 -5
@@ -455,9 +455,6 @@ static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port,struct usb_serial *serial = port->serial;struct urb *urb; -if (endpoint ==-1 ) -return NULL ;/* endpoint not needed */ - urb =usb_alloc_urb (0 ,GFP_KERNEL );/* No ISO */ if (urb ==NULL ) {dbg ("%s: alloc for endpoint %d failed." , __func__, endpoint);
@@ -487,6 +484,9 @@ int usb_wwan_port_probe(struct usb_serial_port *port)init_usb_anchor (&portdata->delayed);for (i =0 ; i <N_IN_URB ; i++) { +if (!port->bulk_in_size) +break ; + buffer = (u8 *)__get_free_page (GFP_KERNEL );if (!buffer) goto bail_out_error;
@@ -499,8 +499,8 @@ int usb_wwan_port_probe(struct usb_serial_port *port) portdata->in_urbs[i] = urb; }for (i =0 ; i <N_OUT_URB ; i++) { -if (port->bulk_out_endpointAddress ==-1 ) -continue ; +if (!port->bulk_out_size) +break ; buffer =kmalloc (OUT_BUFLEN ,GFP_KERNEL );if (!buffer)
drivers/virtio/virtio.c +3 -1
@@ -225,8 +225,10 @@ EXPORT_SYMBOL_GPL(register_virtio_device);void unregister_virtio_device (struct virtio_device *dev) { +int index = dev->index;/* save for after device release */ +device_unregister (&dev->dev); -ida_simple_remove (&virtio_index_ida, dev->index); +ida_simple_remove (&virtio_index_ida, index); }EXPORT_SYMBOL_GPL (unregister_virtio_device);
drivers/xen/events.c +1 -1
@@ -1374,8 +1374,8 @@ void xen_evtchn_do_upcall(struct pt_regs *regs) {struct pt_regs *old_regs =set_irq_regs (regs); -exit_idle ();irq_enter (); +exit_idle ();__xen_evtchn_do_upcall ();
fs/cifs/cifsacl.c +20 -29
111 lines not on this page · raw message
fs/cifs/dir.c +10 -1
@@ -392,7 +392,16 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,* in network traffic in the other paths. */ if (!(oflags &O_CREAT )) { -struct dentry *res =cifs_lookup (inode, direntry,0 ); +struct dentry *res; + +/* +* Check for hashed negative dentry. We have already revalidated +* the dentry and it is fine. No need to perform another lookup. +*/ +if (!d_unhashed (direntry)) +return -ENOENT ; + + res =cifs_lookup (inode, direntry,0 );if (IS_ERR (res))return PTR_ERR (res);
fs/ext4/ext4.h +1 -2
@@ -2046,8 +2046,7 @@ extern int ext4_resize_fs(struct super_block *sb, ext4_fsblk_t n_blocks_count);extern int ext4_calculate_overhead (struct super_block *sb);extern int ext4_superblock_csum_verify (struct super_block *sb,struct ext4_super_block *es); -extern void ext4_superblock_csum_set (struct super_block *sb, -struct ext4_super_block *es); +extern void ext4_superblock_csum_set (struct super_block *sb);extern void *ext4_kvmalloc (size_t size,gfp_t flags);extern void *ext4_kvzalloc (size_t size,gfp_t flags);extern void ext4_kvfree (void *ptr);
fs/ext4/ext4_jbd2.c +2 -6
@@ -143,17 +143,13 @@ int __ext4_handle_dirty_super(const char *where, unsigned int line,struct buffer_head *bh =EXT4_SB (sb)->s_sbh;int err =0 ; +ext4_superblock_csum_set (sb);if (ext4_handle_valid (handle)) { -ext4_superblock_csum_set (sb, - (struct ext4_super_block *)bh->b_data); err =jbd2_journal_dirty_metadata (handle, bh);if (err)ext4_journal_abort_handle (where, line, __func__, bh, handle, err); - }else { -ext4_superblock_csum_set (sb, - (struct ext4_super_block *)bh->b_data); + }else mark_buffer_dirty (bh); - }return err; }
fs/ext4/resize.c +1 -1
@@ -979,7 +979,7 @@ static void update_backups(struct super_block *sb, goto exit_err; } -ext4_superblock_csum_set (sb, (struct ext4_super_block *)data); +ext4_superblock_csum_set (sb);while ((group =ext4_list_backups (sb, &three, &five, &seven)) < last) {struct buffer_head *bh;
fs/ext4/super.c +4 -3
@@ -143,9 +143,10 @@ int ext4_superblock_csum_verify(struct super_block *sb,return es->s_checksum ==ext4_superblock_csum (sb, es); } -void ext4_superblock_csum_set (struct super_block *sb, -struct ext4_super_block *es) +void ext4_superblock_csum_set (struct super_block *sb) { +struct ext4_super_block *es =EXT4_SB (sb)->s_es; +if (!EXT4_HAS_RO_COMPAT_FEATURE (sb,EXT4_FEATURE_RO_COMPAT_METADATA_CSUM ))return ;
@@ -4343,7 +4344,7 @@ static int ext4_commit_super(struct super_block *sb, int sync)cpu_to_le32 (percpu_counter_sum_positive ( &EXT4_SB (sb)->s_freeinodes_counter));BUFFER_TRACE (sbh,"marking dirty" ); -ext4_superblock_csum_set (sb, es); +ext4_superblock_csum_set (sb);mark_buffer_dirty (sbh);if (sync) { error =sync_dirty_buffer (sbh);
fs/gfs2/file.c +5 -7
@@ -515,15 +515,13 @@ static int gfs2_mmap(struct file *file, struct vm_area_struct *vma)struct gfs2_holder i_gh;int error; -gfs2_holder_init (ip->i_gl,LM_ST_SHARED ,LM_FLAG_ANY , &i_gh); - error =gfs2_glock_nq (&i_gh); -if (error ==0 ) { -file_accessed (file); -gfs2_glock_dq (&i_gh); - } -gfs2_holder_uninit (&i_gh); + error =gfs2_glock_nq_init (ip->i_gl,LM_ST_SHARED ,LM_FLAG_ANY , + &i_gh);if (error)return error; +/* grab lock to update inode */ +gfs2_glock_dq_uninit (&i_gh); +file_accessed (file); } vma->vm_ops = &gfs2_vm_ops; vma->vm_flags |=VM_CAN_NONLINEAR ;
fs/gfs2/super.c +2 -1
@@ -810,7 +810,8 @@ static void gfs2_dirty_inode(struct inode *inode, int flags)return ; } need_unlock =1 ; - } + }else if (WARN_ON_ONCE (ip->i_gl->gl_state !=LM_ST_EXCLUSIVE )) +return ;if (current->journal_info ==NULL ) { ret =gfs2_trans_begin (sdp,RES_DINODE ,0 );
fs/notify/fanotify/fanotify.c +1 -0
@@ -21,6 +21,7 @@ static bool should_merge(struct fsnotify_event *old, struct fsnotify_event *new)if ((old->path.mnt == new->path.mnt) && (old->path.dentry == new->path.dentry))return true; +break ;case (FSNOTIFY_EVENT_NONE ):return true;default :
fs/pstore/platform.c +2 -1
@@ -161,12 +161,13 @@ static void pstore_console_write(struct console *con, const char *s, unsigned c)while (s < e) {unsigned long flags; +u64 id;if (c > psinfo->bufsize) c = psinfo->bufsize;spin_lock_irqsave (&psinfo->buf_lock, flags);memcpy (psinfo->buf, s, c); - psinfo->write (PSTORE_TYPE_CONSOLE ,0 ,NULL ,0 , c, psinfo); + psinfo->write (PSTORE_TYPE_CONSOLE ,0 , &id,0 , c, psinfo);spin_unlock_irqrestore (&psinfo->buf_lock, flags); s += c; c = e - s;
fs/reiserfs/inode.c +7 -3
@@ -1782,8 +1782,9 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,BUG_ON (!th->t_trans_id); -dquot_initialize (inode); +reiserfs_write_unlock (inode->i_sb); err =dquot_alloc_inode (inode); +reiserfs_write_lock (inode->i_sb);if (err) goto out_end_trans;if (!dir->i_nlink) {
@@ -1979,8 +1980,10 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, out_end_trans:journal_end (th, th->t_super, th->t_blocks_allocated); +reiserfs_write_unlock (inode->i_sb);/* Drop can be outside and it needs more credits so it's better to have it outside */ dquot_drop (inode); +reiserfs_write_lock (inode->i_sb); inode->i_flags |=S_NOQUOTA ;make_bad_inode (inode);
@@ -3103,10 +3106,9 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr)/* must be turned off for recursive notify_change calls */ ia_valid = attr->ia_valid &= ~(ATTR_KILL_SUID |ATTR_KILL_SGID ); - depth =reiserfs_write_lock_once (inode->i_sb);if (is_quota_modification (inode, attr))dquot_initialize (inode); - + depth =reiserfs_write_lock_once (inode->i_sb);if (attr->ia_valid &ATTR_SIZE ) {/* version 2 items will be caught by the s_maxbytes check ** done for us in vmtruncate
@@ -3170,7 +3172,9 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr) error =journal_begin (&th, inode->i_sb, jbegin_count);if (error) goto out; +reiserfs_write_unlock_once (inode->i_sb, depth); error =dquot_transfer (inode, attr); + depth =reiserfs_write_lock_once (inode->i_sb);if (error) {journal_end (&th, inode->i_sb, jbegin_count); goto out;
fs/reiserfs/stree.c +4 -0
@@ -1968,7 +1968,9 @@ int reiserfs_paste_into_item(struct reiserfs_transaction_handle *th, struct tree key2type(&(key->on_disk_key)));#endif +reiserfs_write_unlock (inode->i_sb); retval =dquot_alloc_space_nodirty (inode, pasted_size); +reiserfs_write_lock (inode->i_sb);if (retval) {pathrelse (search_path);return retval;
@@ -2061,9 +2063,11 @@ int reiserfs_insert_item(struct reiserfs_transaction_handle *th,"reiserquota insert_item(): allocating %u id=%u type=%c" , quota_bytes, inode->i_uid, head2type(ih));#endif +reiserfs_write_unlock (inode->i_sb);/* We can't dirty inode here. It would be immediately written but * appropriate stat item isn't inserted yet... */ retval =dquot_alloc_space_nodirty (inode, quota_bytes); +reiserfs_write_lock (inode->i_sb);if (retval) {pathrelse (path);return retval;
fs/reiserfs/super.c +46 -14
205 lines not on this page · raw message
fs/ubifs/find.c +10 -2
@@ -681,8 +681,16 @@ int ubifs_find_free_leb_for_idx(struct ubifs_info *c)if (!lprops) { lprops =ubifs_fast_find_freeable (c);if (!lprops) { -ubifs_assert (c->freeable_cnt ==0 ); -if (c->lst.empty_lebs - c->lst.taken_empty_lebs >0 ) { +/* +* The first condition means the following: go scan the +* LPT if there are uncategorized lprops, which means +* there may be freeable LEBs there (UBIFS does not +* store the information about freeable LEBs in the +* master node). +*/ +if (c->in_a_category_cnt != c->main_lebs || + c->lst.empty_lebs - c->lst.taken_empty_lebs >0 ) { +ubifs_assert (c->freeable_cnt ==0 ); lprops =scan_for_leb_for_idx (c);if (IS_ERR (lprops)) { err =PTR_ERR (lprops);
fs/ubifs/lprops.c +6 -0
@@ -300,8 +300,11 @@ void ubifs_add_to_cat(struct ubifs_info *c, struct ubifs_lprops *lprops,default :ubifs_assert (0 ); } + lprops->flags &= ~LPROPS_CAT_MASK ; lprops->flags |= cat; + c->in_a_category_cnt +=1 ; +ubifs_assert (c->in_a_category_cnt <= c->main_lebs); }/**
@@ -334,6 +337,9 @@ static void ubifs_remove_from_cat(struct ubifs_info *c,default :ubifs_assert (0 ); } + + c->in_a_category_cnt -=1 ; +ubifs_assert (c->in_a_category_cnt >=0 ); }/**
fs/ubifs/ubifs.h +3 -0
@@ -1184,6 +1184,8 @@ struct ubifs_debug_info;* @freeable_list: list of freeable non-index LEBs (free + dirty == @leb_size) * @frdi_idx_list: list of freeable index LEBs (free + dirty == @leb_size) * @freeable_cnt: number of freeable LEBs in @freeable_list +* @in_a_category_cnt: count of lprops which are in a certain category, which +* basically meants that they were loaded from the flash * * @ltab_lnum: LEB number of LPT's own lprops table * @ltab_offs: offset of LPT's own lprops table
@@ -1413,6 +1415,7 @@ struct ubifs_info {struct list_head freeable_list;struct list_head frdi_idx_list;int freeable_cnt; +int in_a_category_cnt;int ltab_lnum;int ltab_offs;
fs/xfs/xfs_buf.c +12 -2
@@ -1197,9 +1197,14 @@ xfs_buf_bio_end_io( {xfs_buf_t *bp = (xfs_buf_t *)bio->bi_private; -xfs_buf_ioerror (bp, -error); +/* +* don't overwrite existing errors - otherwise we can lose errors on +* buffers that require multiple bios to complete. +*/ +if (!bp->b_error) +xfs_buf_ioerror (bp, -error); -if (!error &&xfs_buf_is_vmapped (bp) && (bp->b_flags &XBF_READ )) +if (!bp->b_error &&xfs_buf_is_vmapped (bp) && (bp->b_flags &XBF_READ ))invalidate_kernel_vmap_range (bp->b_addr,xfs_buf_vmap_len (bp));_xfs_buf_ioend (bp,1 );
@@ -1279,6 +1284,11 @@ next_chunk:if (size) goto next_chunk; }else { +/* +* This is guaranteed not to be the last io reference count +* because the caller (xfs_buf_iorequest) holds a count itself. +*/ +atomic_dec (&bp->b_io_remaining);xfs_buf_ioerror (bp,EIO );bio_put (bio); }
include/linux/mmzone.h +1 -1
@@ -744,7 +744,7 @@ extern int init_currently_empty_zone(struct zone *zone, unsigned long start_pfn,unsigned long size, enum memmap_context context); -extern void lruvec_init (struct lruvec *lruvec,struct zone *zone); +extern void lruvec_init (struct lruvec *lruvec);static inline struct zone *lruvec_zone (struct lruvec *lruvec) {
include/linux/ptp_clock_kernel.h +2 -1
@@ -50,7 +50,8 @@ struct ptp_clock_request {* clock operations * * @adjfreq: Adjusts the frequency of the hardware clock. -* parameter delta: Desired period change in parts per billion. +* parameter delta: Desired frequency offset from nominal frequency +* in parts per billion * * @adjtime: Shifts the time of the hardware clock. * parameter delta: Desired change in nanoseconds.
kernel/module.c +16 -11
@@ -2273,12 +2273,17 @@ static void layout_symtab(struct module *mod, struct load_info *info) src = (void *)info->hdr + symsect->sh_offset; nsrc = symsect->sh_size /sizeof (*src); +/* strtab always starts with a nul, so offset 0 is the empty string. */ + strtab_size =1 ; +/* Compute total space required for the core symbols' strtab. */ -for (ndst = i = strtab_size =1 ; i < nsrc; ++i, ++src) -if (is_core_symbol (src, info->sechdrs, info->hdr->e_shnum)) { - strtab_size +=strlen (&info->strtab[src->st_name]) +1 ; +for (ndst = i =0 ; i < nsrc; i++) { +if (i ==0 || +is_core_symbol (src+i, info->sechdrs, info->hdr->e_shnum)) { + strtab_size +=strlen (&info->strtab[src[i].st_name])+1 ; ndst++; } + }/* Append room for core symbols at end of core part. */ info->symoffs =ALIGN (mod->core_size, symsect->sh_addralign ?:1 );
@@ -2312,15 +2317,15 @@ static void add_kallsyms(struct module *mod, const struct load_info *info) mod->core_symtab = dst = mod->module_core + info->symoffs; mod->core_strtab = s = mod->module_core + info->stroffs; src = mod->symtab; - *dst = *src; *s++ =0 ; -for (ndst = i =1 ; i < mod->num_symtab; ++i, ++src) { -if (!is_core_symbol (src, info->sechdrs, info->hdr->e_shnum)) -continue ; - - dst[ndst] = *src; - dst[ndst++].st_name = s - mod->core_strtab; - s +=strlcpy (s, &mod->strtab[src->st_name],KSYM_NAME_LEN ) +1 ; +for (ndst = i =0 ; i < mod->num_symtab; i++) { +if (i ==0 || +is_core_symbol (src+i, info->sechdrs, info->hdr->e_shnum)) { + dst[ndst] = src[i]; + dst[ndst++].st_name = s - mod->core_strtab; + s +=strlcpy (s, &mod->strtab[src[i].st_name], +KSYM_NAME_LEN ) +1 ; + } } mod->core_num_syms = ndst; }
mm/memcontrol.c +50 -17
119 lines not on this page · raw message
mm/mmzone.c +1 -5
@@ -87,7 +87,7 @@ int memmap_valid_within(unsigned long pfn, }#endif /* CONFIG_ARCH_HAS_HOLES_MEMORYMODEL */ -void lruvec_init (struct lruvec *lruvec,struct zone *zone) +void lruvec_init (struct lruvec *lruvec) {enum lru_list lru;
@@ -95,8 +95,4 @@ void lruvec_init(struct lruvec *lruvec, struct zone *zone)for_each_lru (lru)INIT_LIST_HEAD (&lruvec->lists[lru]); - -#ifdef CONFIG_MEMCG - lruvec->zone = zone; -#endif }
mm/page_alloc.c +1 -1
@@ -4456,7 +4456,7 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat, zone->zone_pgdat = pgdat;zone_pcp_init (zone); -lruvec_init (&zone->lruvec, zone); +lruvec_init (&zone->lruvec);if (!size)continue ;
mm/shmem.c +15 -3
@@ -654,7 +654,7 @@ static void shmem_evict_inode(struct inode *inode)kfree (xattr->name);kfree (xattr); } -BUG_ON (inode->i_blocks); +WARN_ON (inode->i_blocks);shmem_free_inode (inode->i_sb);clear_inode (inode); }
@@ -1156,8 +1156,20 @@ repeat:if (!error) { error =shmem_add_to_page_cache (page, mapping, index, gfp,swp_to_radix_entry (swap)); -/* We already confirmed swap, and make no allocation */ -VM_BUG_ON (error); +/* +* We already confirmed swap under page lock, and make +* no memory allocation here, so usually no possibility +* of error; but free_swap_and_cache() only trylocks a +* page, so it is just possible that the entry has been +* truncated or holepunched since swap was confirmed. +* shmem_undo_range() will have done some of the +* unaccounting, now delete_from_swap_cache() will do +* the rest (including mem_cgroup_uncharge_swapcache). +* Reset swap.val? No, leave it so "failed" goes back to +* "repeat": reading a hole and writing should succeed. +*/ +if (error) +delete_from_swap_cache (page); }if (error) goto failed;
mm/vmscan.c +2 -0
@@ -2953,6 +2953,8 @@ static int kswapd(void *p) &balanced_classzone_idx); } } + + current->reclaim_state =NULL ;return 0 ; }
net/bluetooth/mgmt.c +6 -5
@@ -321,7 +321,7 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data,struct hci_dev *d;size_t rp_len;u16 count; -int i, err; +int err;BT_DBG ("sock %p" , sk);
@@ -339,17 +339,18 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data,return -ENOMEM ; } - rp->num_controllers =cpu_to_le16 (count); - - i =0 ; + count =0 ;list_for_each_entry (d, &hci_dev_list, list) {if (test_bit (HCI_SETUP , &d->dev_flags))continue ; - rp->index[i++] =cpu_to_le16 (d->id); + rp->index[count++] =cpu_to_le16 (d->id);BT_DBG ("Added hci%u" , d->id); } + rp->num_controllers =cpu_to_le16 (count); + rp_len =sizeof (*rp) + (2 * count); +read_unlock (&hci_dev_list_lock); err = cmd_complete(sk, MGMT_INDEX_NONE, MGMT_OP_READ_INDEX_LIST, 0, rp,
net/core/dev.c +3 -1
@@ -2793,8 +2793,10 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb,if (unlikely (tcpu != next_cpu) && (tcpu ==RPS_NO_CPU || !cpu_online (tcpu) || ((int )(per_cpu (softnet_data, tcpu).input_queue_head - - rflow->last_qtail)) >=0 )) + rflow->last_qtail)) >=0 )) { + tcpu = next_cpu; rflow =set_rps_cpu (dev, skb, rflow, next_cpu); + }if (tcpu !=RPS_NO_CPU &&cpu_online (tcpu)) { *rflowp = rflow;
net/core/dev_addr_lists.c +2 -1
@@ -317,7 +317,8 @@ int dev_addr_del(struct net_device *dev, unsigned char *addr,*/ ha =list_first_entry (&dev->dev_addrs.list, struct netdev_hw_addr, list); -if (ha->addr == dev->dev_addr && ha->refcount ==1 ) +if (!memcmp (ha->addr, addr, dev->addr_len) && + ha->type == addr_type && ha->refcount ==1 )return -ENOENT ; err = __hw_addr_del(&dev->dev_addrs, addr, dev->addr_len,
net/ipv4/ip_sockglue.c +22 -13
@@ -457,19 +457,28 @@ static int do_ip_setsockopt(struct sock *sk, int level,struct inet_sock *inet =inet_sk (sk);int val =0 , err; -if (((1 <<optname) & ((1 <<IP_PKTINFO ) | (1 <<IP_RECVTTL ) | - (1 <<IP_RECVOPTS ) | (1 <<IP_RECVTOS ) | - (1 <<IP_RETOPTS ) | (1 <<IP_TOS ) | - (1 <<IP_TTL ) | (1 <<IP_HDRINCL ) | - (1 <<IP_MTU_DISCOVER ) | (1 <<IP_RECVERR ) | - (1 <<IP_ROUTER_ALERT ) | (1 <<IP_FREEBIND ) | - (1 <<IP_PASSSEC ) | (1 <<IP_TRANSPARENT ) | - (1 <<IP_MINTTL ) | (1 <<IP_NODEFRAG ))) || - optname ==IP_UNICAST_IF || - optname ==IP_MULTICAST_TTL || - optname ==IP_MULTICAST_ALL || - optname ==IP_MULTICAST_LOOP || - optname ==IP_RECVORIGDSTADDR ) { +switch (optname) { +case IP_PKTINFO : +case IP_RECVTTL : +case IP_RECVOPTS : +case IP_RECVTOS : +case IP_RETOPTS : +case IP_TOS : +case IP_TTL : +case IP_HDRINCL : +case IP_MTU_DISCOVER : +case IP_RECVERR : +case IP_ROUTER_ALERT : +case IP_FREEBIND : +case IP_PASSSEC : +case IP_TRANSPARENT : +case IP_MINTTL : +case IP_NODEFRAG : +case IP_UNICAST_IF : +case IP_MULTICAST_TTL : +case IP_MULTICAST_ALL : +case IP_MULTICAST_LOOP : +case IP_RECVORIGDSTADDR :if (optlen >=sizeof (int )) {if (get_user (val, (int __user *) optval))return -EFAULT ;
net/ipv4/ip_vti.c +5 -0
@@ -341,12 +341,17 @@ static int vti_rcv(struct sk_buff *skb)if (tunnel !=NULL ) {struct pcpu_tstats *tstats; +if (!xfrm4_policy_check (NULL ,XFRM_POLICY_IN , skb)) +return -1 ; + tstats =this_cpu_ptr (tunnel->dev->tstats);u64_stats_update_begin (&tstats->syncp); tstats->rx_packets++; tstats->rx_bytes += skb->len;u64_stats_update_end (&tstats->syncp); + skb->mark =0 ; +secpath_reset (skb); skb->dev = tunnel->dev;rcu_read_unlock ();return 1 ;
net/ipv4/netfilter/nf_nat_standalone.c +4 -2
@@ -194,7 +194,8 @@ nf_nat_out(unsigned int hooknum,if ((ct->tuplehash[dir].tuple.src.u3.ip != ct->tuplehash[!dir].tuple.dst.u3.ip) || - (ct->tuplehash[dir].tuple.src.u.all != + (ct->tuplehash[dir].tuple.dst.protonum !=IPPROTO_ICMP && + ct->tuplehash[dir].tuple.src.u.all != ct->tuplehash[!dir].tuple.dst.u.all) )return ip_xfrm_me_harder (skb) ==0 ? ret :NF_DROP ;
@@ -230,7 +231,8 @@ nf_nat_local_fn(unsigned int hooknum, ret =NF_DROP ; }#ifdef CONFIG_XFRM - else if (ct->tuplehash[dir].tuple.dst.u.all != + else if (ct->tuplehash[dir].tuple.dst.protonum != IPPROTO_ICMP && + ct->tuplehash[dir].tuple.dst.u.all != ct->tuplehash[!dir].tuple.src.u.all) if (ip_xfrm_me_harder(skb)) ret =NF_DROP ;
net/ipv4/tcp.c +2 -2
@@ -1236,7 +1236,7 @@ new_segment: wait_for_sndbuf:set_bit (SOCK_NOSPACE , &sk->sk_socket->flags); wait_for_memory: -if (copied &&likely (!tp->repair)) +if (copied)tcp_push (sk, flags & ~MSG_MORE , mss_now,TCP_NAGLE_PUSH );if ((err =sk_stream_wait_memory (sk, &timeo)) !=0 )
@@ -1247,7 +1247,7 @@ wait_for_memory: } out: -if (copied &&likely (!tp->repair)) +if (copied)tcp_push (sk, flags, mss_now, tp->nonagle);release_sock (sk);return copied + copied_syn;
net/ipv4/tcp_metrics.c +9 -3
@@ -1,13 +1,13 @@#include <linux/rcupdate.h> #include <linux/spinlock.h> #include <linux/jiffies.h> -#include <linux/bootmem.h> #include <linux/module.h> #include <linux/cache.h> #include <linux/slab.h> #include <linux/init.h> #include <linux/tcp.h> #include <linux/hash.h> +#include <linux/vmalloc.h> #include <net/inet_connection_sock.h> #include <net/net_namespace.h>
@@ -722,7 +722,10 @@ static int __net_init tcp_net_metrics_init(struct net *net) net->ipv4.tcp_metrics_hash_log =order_base_2 (slots); size =sizeof (struct tcpm_hash_bucket ) << net->ipv4.tcp_metrics_hash_log; - net->ipv4.tcp_metrics_hash =kzalloc (size,GFP_KERNEL ); + net->ipv4.tcp_metrics_hash =kzalloc (size,GFP_KERNEL | __GFP_NOWARN); +if (!net->ipv4.tcp_metrics_hash) + net->ipv4.tcp_metrics_hash =vzalloc (size); +if (!net->ipv4.tcp_metrics_hash)return -ENOMEM ;
@@ -743,7 +746,10 @@ static void __net_exit tcp_net_metrics_exit(struct net *net) tm = next; } } -kfree (net->ipv4.tcp_metrics_hash); +if (is_vmalloc_addr (net->ipv4.tcp_metrics_hash)) +vfree (net->ipv4.tcp_metrics_hash); +else +kfree (net->ipv4.tcp_metrics_hash); }static __net_initdata struct pernet_operations tcp_net_metrics_ops = {
net/ipv4/tcp_output.c +4 -0
@@ -1977,6 +1977,9 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, tso_segs =tcp_init_tso_segs (sk, skb, mss_now);BUG_ON (!tso_segs); +if (unlikely (tp->repair) && tp->repair_queue ==TCP_SEND_QUEUE ) + goto repair;/* Skip network transmission */ + cwnd_quota =tcp_cwnd_test (tp, skb);if (!cwnd_quota)break ;
@@ -2017,6 +2020,7 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,if (unlikely (tcp_transmit_skb (sk, skb,1 , gfp)))break ; +repair:/* Advance the send_head. This one is sent out. * This call will increment packets_out. */
net/ipv6/ipv6_sockglue.c +1 -0
@@ -827,6 +827,7 @@ pref_skip_coa:if (val <0 || val >255 ) goto e_inval; np->min_hopcount = val; + retv =0 ;break ;case IPV6_DONTFRAG : np->dontfrag = valbool;
net/mac80211/ieee80211_i.h +2 -0
@@ -1304,6 +1304,8 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev);netdev_tx_t ieee80211_subif_start_xmit (struct sk_buff *skb,struct net_device *dev); +void ieee80211_purge_tx_queue (struct ieee80211_hw *hw, +struct sk_buff_head *skbs);/* HT */ void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata,
net/mac80211/sta_info.c +8 -3
@@ -730,8 +730,8 @@ int __must_check __sta_info_destroy(struct sta_info *sta)for (ac =0 ; ac <IEEE80211_NUM_ACS ; ac++) { local->total_ps_buffered -=skb_queue_len (&sta->ps_tx_buf[ac]); -__skb_queue_purge (&sta->ps_tx_buf[ac]); -__skb_queue_purge (&sta->tx_filtered[ac]); +ieee80211_purge_tx_queue (&local->hw, &sta->ps_tx_buf[ac]); +ieee80211_purge_tx_queue (&local->hw, &sta->tx_filtered[ac]); }#ifdef CONFIG_MAC80211_MESH
@@ -765,7 +765,7 @@ int __must_check __sta_info_destroy(struct sta_info *sta) tid_tx =rcu_dereference_raw (sta->ampdu_mlme.tid_tx[i]);if (!tid_tx)continue ; -__skb_queue_purge (&tid_tx->pending); +ieee80211_purge_tx_queue (&local->hw, &tid_tx->pending);kfree (tid_tx); }
@@ -948,6 +948,7 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta)struct ieee80211_local *local = sdata->local;struct sk_buff_head pending;int filtered =0 , buffered =0 , ac; +unsigned long flags;clear_sta_flag (sta,WLAN_STA_SP );
@@ -963,12 +964,16 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta)for (ac =0 ; ac <IEEE80211_NUM_ACS ; ac++) {int count =skb_queue_len (&pending), tmp; +spin_lock_irqsave (&sta->tx_filtered[ac].lock, flags);skb_queue_splice_tail_init (&sta->tx_filtered[ac], &pending); +spin_unlock_irqrestore (&sta->tx_filtered[ac].lock, flags); tmp =skb_queue_len (&pending); filtered += tmp - count; count = tmp; +spin_lock_irqsave (&sta->ps_tx_buf[ac].lock, flags);skb_queue_splice_tail_init (&sta->ps_tx_buf[ac], &pending); +spin_unlock_irqrestore (&sta->ps_tx_buf[ac].lock, flags); tmp =skb_queue_len (&pending); buffered += tmp - count; }
net/mac80211/status.c +9 -0
@@ -648,3 +648,12 @@ void ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb)dev_kfree_skb_any (skb); }EXPORT_SYMBOL (ieee80211_free_txskb); + +void ieee80211_purge_tx_queue (struct ieee80211_hw *hw, +struct sk_buff_head *skbs) +{ +struct sk_buff *skb; + +while ((skb =__skb_dequeue (skbs))) +ieee80211_free_txskb (hw, skb); +}
net/mac80211/tx.c +6 -3
@@ -1358,7 +1358,7 @@ static int invoke_tx_handlers(struct ieee80211_tx_data *tx)if (tx->skb)ieee80211_free_txskb (&tx->local->hw, tx->skb);else -__skb_queue_purge (&tx->skbs); +ieee80211_purge_tx_queue (&tx->local->hw, &tx->skbs);return -1 ; }else if (unlikely (res ==TX_QUEUED )) {I802_DEBUG_INC (tx->local->tx_handlers_queued);
@@ -2132,10 +2132,13 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,*/ void ieee80211_clear_tx_pending (struct ieee80211_local *local) { +struct sk_buff *skb;int i; -for (i =0 ; i < local->hw.queues; i++) -skb_queue_purge (&local->pending[i]); +for (i =0 ; i < local->hw.queues; i++) { +while ((skb =skb_dequeue (&local->pending[i])) !=NULL ) +ieee80211_free_txskb (&local->hw, skb); + } }/*
net/mac80211/util.c +2 -0
@@ -1434,6 +1434,8 @@ int ieee80211_reconfig(struct ieee80211_local *local)list_for_each_entry (sdata, &local->interfaces, list) {if (sdata->vif.type !=NL80211_IFTYPE_STATION )continue ; +if (!sdata->u.mgd.associated) +continue ;ieee80211_send_nullfunc (local, sdata,0 ); }
net/netfilter/nf_conntrack_h323_main.c +2 -1
@@ -733,7 +733,8 @@ static int callforward_do_filter(const union nf_inet_addr *src, flowi4_to_flowi(&fl1), false)) {if (!afinfo->route (&init_net, (struct dst_entry **)&rt2,flowi4_to_flowi (&fl2), false)) { -if (rt1->rt_gateway == rt2->rt_gateway && +if (rt_nexthop (rt1, fl1.daddr) == +rt_nexthop (rt2, fl2.daddr) && rt1->dst.dev == rt2->dst.dev) ret =1 ;dst_release (&rt2->dst);
net/netfilter/xt_TEE.c +1 -0
@@ -70,6 +70,7 @@ tee_tg_route4(struct sk_buff *skb, const struct xt_tee_tginfo *info) fl4.daddr = info->gw.ip; fl4.flowi4_tos =RT_TOS (iph->tos); fl4.flowi4_scope =RT_SCOPE_UNIVERSE ; + fl4.flowi4_flags =FLOWI_FLAG_KNOWN_NH ; rt =ip_route_output_key (net, &fl4);if (IS_ERR (rt))return false;
net/nfc/llcp/llcp.c +2 -2
@@ -1182,8 +1182,8 @@ int nfc_llcp_register_device(struct nfc_dev *ndev) goto err_rx_wq; } - local->sockets.lock =__RW_LOCK_UNLOCKED (local->sockets.lock); - local->connecting_sockets.lock =__RW_LOCK_UNLOCKED (local->connecting_sockets.lock); +rwlock_init (&local->sockets.lock); +rwlock_init (&local->connecting_sockets.lock);nfc_llcp_build_gb (local);
net/wireless/reg.c +2 -3
@@ -141,9 +141,8 @@ static const struct ieee80211_regdomain world_regdom = { .reg_rules = {/* IEEE 802.11b/g, channels 1..11 */ REG_RULE (2412 -10 ,2462 +10 ,40 ,6 ,20 ,0 ), -/* IEEE 802.11b/g, channels 12..13. No HT40 -* channel fits here. */ -REG_RULE (2467 -10 ,2472 +10 ,20 ,6 ,20 , +/* IEEE 802.11b/g, channels 12..13. */ +REG_RULE (2467 -10 ,2472 +10 ,40 ,6 ,20 ,NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS),/* IEEE 802.11 channel 14 - Only JP enables
security/selinux/netnode.c +2 -1
@@ -174,7 +174,8 @@ static void sel_netnode_insert(struct sel_netnode *node)if (sel_netnode_hash[idx].size ==SEL_NETNODE_HASH_BKT_LIMIT ) {struct sel_netnode *tail; tail =list_entry ( -rcu_dereference (sel_netnode_hash[idx].list.prev), +rcu_dereference_protected (sel_netnode_hash[idx].list.prev, +lockdep_is_held (&sel_netnode_lock)), struct sel_netnode, list);list_del_rcu (&tail->list);kfree_rcu (tail, rcu);
sound/pci/hda/patch_analog.c +1 -0
@@ -545,6 +545,7 @@ static int ad198x_build_pcms(struct hda_codec *codec)if (spec->multiout.dig_out_nid) { info++; codec->num_pcms++; + codec->spdif_status_reset =1 ; info->name ="AD198x Digital" ; info->pcm_type =HDA_PCM_TYPE_SPDIF ; info->stream[SNDRV_PCM_STREAM_PLAYBACK ] = ad198x_pcm_digital_playback;
sound/pci/hda/patch_cirrus.c +10 -6
@@ -96,8 +96,8 @@ enum {#define CS420X_VENDOR_NID 0x11#define CS_DIG_OUT1_PIN_NID 0x10#define CS_DIG_OUT2_PIN_NID 0x15 -#define CS_DMIC1_PIN_NID 0x12 -#define CS_DMIC2_PIN_NID 0x0e +#define CS_DMIC1_PIN_NID 0x0e +#define CS_DMIC2_PIN_NID 0x12/* coef indices */ #define IDX_SPDIF_STAT 0x0000
@@ -1074,14 +1074,18 @@ static void init_input(struct hda_codec *codec)cs_automic (codec); coef =0x000a ;/* ADC1/2 - Digital and Analog Soft Ramp */ +cs_vendor_coef_set (codec,IDX_ADC_CFG , coef); + + coef =cs_vendor_coef_get (codec,IDX_BEEP_CFG );if (is_active_pin (codec,CS_DMIC2_PIN_NID )) - coef |=0x0500 ;/* DMIC2 2 chan on, GPIO1 off */ + coef |=1 <<4 ;/* DMIC2 2 chan on, GPIO1 off */ if (is_active_pin (codec,CS_DMIC1_PIN_NID )) - coef |=0x1800 ;/* DMIC1 2 chan on, GPIO0 off + coef |=1 <<3 ;/* DMIC1 2 chan on, GPIO0 off * No effect if SPDIF_OUT2 is * selected in IDX_SPDIF_CTL. */ -cs_vendor_coef_set (codec,IDX_ADC_CFG , coef); + +cs_vendor_coef_set (codec,IDX_BEEP_CFG , coef); }else {if (spec->mic_detect)cs_automic (codec);
@@ -1102,7 +1106,7 @@ static const struct hda_verb cs_coef_init_verbs[] = { | 0x0400 /* Disable Coefficient Auto increment */ )},/* Beep */ - {0x11, AC_VERB_SET_COEF_INDEX, IDX_DAC_CFG}, + {0x11, AC_VERB_SET_COEF_INDEX, IDX_BEEP_CFG}, {0x11, AC_VERB_SET_PROC_COEF, 0x0007}, /* Enable Beep thru DAC1/2/3 */ {} /* terminator */
sound/pci/hda/patch_realtek.c +14 -13
@@ -5434,6 +5434,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {SND_PCI_QUIRK (0x106b ,0x4000 ,"MacbookPro 5,1" ,ALC889_FIXUP_IMAC91_VREF ),SND_PCI_QUIRK (0x106b ,0x4100 ,"Macmini 3,1" ,ALC889_FIXUP_IMAC91_VREF ),SND_PCI_QUIRK (0x106b ,0x4200 ,"Mac Pro 5,1" ,ALC885_FIXUP_MACPRO_GPIO ), +SND_PCI_QUIRK (0x106b ,0x4300 ,"iMac 9,1" ,ALC889_FIXUP_IMAC91_VREF ),SND_PCI_QUIRK (0x106b ,0x4600 ,"MacbookPro 5,2" ,ALC889_FIXUP_IMAC91_VREF ),SND_PCI_QUIRK (0x106b ,0x4900 ,"iMac 9,1 Aluminum" ,ALC889_FIXUP_IMAC91_VREF ), SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF),
@@ -5867,7 +5868,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec)return alc_parse_auto_config (codec, alc269_ignore, ssids); } -static void alc269_toggle_power_output (struct hda_codec *codec,int power_up) +static void alc269vb_toggle_power_output (struct hda_codec *codec,int power_up) {int val =alc_read_coef_idx (codec,0x04 );if (power_up)
@@ -5884,10 +5885,10 @@ static void alc269_shutup(struct hda_codec *codec)if (spec->codec_variant !=ALC269_TYPE_ALC269VB )return ; -if ((alc_get_coef0 (codec) &0x00ff ) ==0x017 ) -alc269_toggle_power_output (codec,0 ); -if ((alc_get_coef0 (codec) &0x00ff ) ==0x018 ) { -alc269_toggle_power_output (codec,0 ); +if (spec->codec_variant ==ALC269_TYPE_ALC269VB ) +alc269vb_toggle_power_output (codec,0 ); +if (spec->codec_variant ==ALC269_TYPE_ALC269VB && + (alc_get_coef0 (codec) &0x00ff ) ==0x018 ) {msleep (150 ); } }
@@ -5897,24 +5898,22 @@ static int alc269_resume(struct hda_codec *codec) {struct alc_spec *spec = codec->spec; -if (spec->codec_variant ==ALC269_TYPE_ALC269VB || +if (spec->codec_variant ==ALC269_TYPE_ALC269VB ) +alc269vb_toggle_power_output (codec,0 ); +if (spec->codec_variant ==ALC269_TYPE_ALC269VB && (alc_get_coef0 (codec) &0x00ff ) ==0x018 ) { -alc269_toggle_power_output (codec,0 );msleep (150 ); } codec->patch_ops.init (codec); -if (spec->codec_variant ==ALC269_TYPE_ALC269VB || +if (spec->codec_variant ==ALC269_TYPE_ALC269VB ) +alc269vb_toggle_power_output (codec,1 ); +if (spec->codec_variant ==ALC269_TYPE_ALC269VB && (alc_get_coef0 (codec) &0x00ff ) ==0x017 ) { -alc269_toggle_power_output (codec,1 );msleep (200 ); } -if (spec->codec_variant ==ALC269_TYPE_ALC269VB || - (alc_get_coef0 (codec) &0x00ff ) ==0x018 ) -alc269_toggle_power_output (codec,1 ); -snd_hda_codec_resume_amp (codec);snd_hda_codec_resume_cache (codec);hda_call_check_power_status (codec,0x01 );
@@ -7103,6 +7102,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = { .patch = patch_alc662 }, { .id = 0x10ec0663, .name = "ALC663", .patch = patch_alc662 }, { .id = 0x10ec0665, .name = "ALC665", .patch = patch_alc662 }, + { .id = 0x10ec0668, .name = "ALC668", .patch = patch_alc662 }, { .id = 0x10ec0670, .name = "ALC670", .patch = patch_alc662 }, { .id = 0x10ec0680, .name = "ALC680", .patch = patch_alc680 }, { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 },
@@ -7120,6 +7120,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = { { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc882 }, { .id = 0x10ec0892, .name = "ALC892", .patch = patch_alc662 }, { .id = 0x10ec0899, .name = "ALC898", .patch = patch_alc882 }, + { .id = 0x10ec0900, .name = "ALC1150", .patch = patch_alc882 }, {}/* terminator */ };
sound/pci/hda/patch_via.c +18 -7
@@ -1875,11 +1875,11 @@ static int via_auto_fill_dac_nids(struct hda_codec *codec) {struct via_spec *spec = codec->spec;const struct auto_pin_cfg *cfg = &spec->autocfg; -int i, dac_num; +int i;hda_nid_t nid; + spec->multiout.num_dacs =0 ; spec->multiout.dac_nids = spec->private_dac_nids; - dac_num =0 ;for (i =0 ; i < cfg->line_outs; i++) {hda_nid_t dac =0 ; nid = cfg->line_out_pins[i];
@@ -1890,16 +1890,13 @@ static int via_auto_fill_dac_nids(struct hda_codec *codec)if (!i &&parse_output_path (codec, nid, dac,1 , &spec->out_mix_path)) dac = spec->out_mix_path.path[0 ]; -if (dac) { - spec->private_dac_nids[i] = dac; - dac_num++; - } +if (dac) + spec->private_dac_nids[spec->multiout.num_dacs++] = dac; }if (!spec->out_path[0 ].depth && spec->out_mix_path.depth) { spec->out_path[0 ] = spec->out_mix_path; spec->out_mix_path.depth =0 ; } - spec->multiout.num_dacs = dac_num;return 0 ; }
@@ -3700,6 +3697,18 @@ static const struct snd_pci_quirk vt2002p_fixups[] = { {} }; +/* NIDs 0x24 and 0x33 on VT1802 have connections to non-existing NID 0x3e +* Replace this with mixer NID 0x1c +*/ +static void fix_vt1802_connections (struct hda_codec *codec) +{ +static hda_nid_t conn_24[] = {0x14 ,0x1c }; +static hda_nid_t conn_33[] = {0x1c }; + +snd_hda_override_conn_list (codec,0x24 ,ARRAY_SIZE (conn_24), conn_24); +snd_hda_override_conn_list (codec,0x33 ,ARRAY_SIZE (conn_33), conn_33); +} +/* patch for vt2002P */ static int patch_vt2002P (struct hda_codec *codec) {
@@ -3714,6 +3723,8 @@ static int patch_vt2002P(struct hda_codec *codec) spec->aa_mix_nid =0x21 ;override_mic_boost (codec,0x2b ,0 ,3 ,40 );override_mic_boost (codec,0x29 ,0 ,3 ,40 ); +if (spec->codec_type ==VT1802 ) +fix_vt1802_connections (codec);add_secret_dac_path (codec);snd_hda_pick_fixup (codec,NULL , vt2002p_fixups, via_fixups);
sound/soc/codecs/cs42l52.c +1 -2
@@ -774,7 +774,6 @@ static int cs42l52_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) {struct snd_soc_codec *codec = codec_dai->codec;struct cs42l52_private *cs42l52 =snd_soc_codec_get_drvdata (codec); -int ret =0 ;u8 iface =0 ;switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) {
@@ -823,7 +822,7 @@ static int cs42l52_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)case SND_SOC_DAIFMT_NB_IF :break ;default : - ret = -EINVAL ; +return -EINVAL ; } cs42l52->config.format = iface;snd_soc_write (codec,CS42L52_IFACE_CTL1 , cs42l52->config.format);
sound/soc/codecs/wm8978.c +1 -1
@@ -782,7 +782,7 @@ static int wm8978_hw_params(struct snd_pcm_substream *substream, wm8978->mclk_idx =-1 ; f_sel = wm8978->f_mclk; }else { -if (!wm8978->f_pllout) { +if (!wm8978->f_opclk) {/* We only enter here, if OPCLK is not used */ int ret =wm8978_configure_pll (codec);if (ret <0 )
sound/soc/soc-core.c +3 -2
@@ -2776,8 +2776,9 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol, val = (ucontrol->value.integer.value[0 ] + min) & mask; val = val << shift; -if (snd_soc_update_bits_locked (codec, reg, val_mask, val)) -return err; + err =snd_soc_update_bits_locked (codec, reg, val_mask, val); +if (err <0 ) +return err;if (snd_soc_volsw_is_stereo (mc)) { val_mask = mask << rshift;
sound/soc/soc-dapm.c +1 -1
@@ -3710,7 +3710,7 @@ void snd_soc_dapm_shutdown(struct snd_soc_card *card) {struct snd_soc_codec *codec; -list_for_each_entry (codec, &card->codec_dev_list, list) { +list_for_each_entry (codec, &card->codec_dev_list, card_list) {soc_dapm_shutdown_codec (&codec->dapm);if (codec->dapm.bias_level ==SND_SOC_BIAS_STANDBY ) snd_soc_dapm_set_bias_level(&codec->dapm,
sound/usb/endpoint.c +13 -0
@@ -35,6 +35,7 @@#define EP_FLAG_ACTIVATED 0#define EP_FLAG_RUNNING 1 +#define EP_FLAG_STOPPING 2/* * snd_usb_endpoint is a model that abstracts everything related to an
@@ -502,10 +503,20 @@ static int wait_clear_urbs(struct snd_usb_endpoint *ep)if (alive)snd_printk (KERN_ERR "timeout: still %d active urbs on EP #%x\n" , alive, ep->ep_num); +clear_bit (EP_FLAG_STOPPING , &ep->flags);return 0 ; } +/* sync the pending stop operation; +* this function itself doesn't trigger the stop operation +*/ +void snd_usb_endpoint_sync_pending_stop (struct snd_usb_endpoint *ep) +{ +if (ep &&test_bit (EP_FLAG_STOPPING , &ep->flags)) +wait_clear_urbs (ep); +} +/* * unlink active urbs. */
@@ -913,6 +924,8 @@ void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep,if (wait)wait_clear_urbs (ep); +else +set_bit (EP_FLAG_STOPPING , &ep->flags); } }
sound/usb/endpoint.h +1 -0
@@ -16,6 +16,7 @@ int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep,int snd_usb_endpoint_start (struct snd_usb_endpoint *ep,int can_sleep);void snd_usb_endpoint_stop (struct snd_usb_endpoint *ep,int force,int can_sleep,int wait); +void snd_usb_endpoint_sync_pending_stop (struct snd_usb_endpoint *ep);int snd_usb_endpoint_activate (struct snd_usb_endpoint *ep);int snd_usb_endpoint_deactivate (struct snd_usb_endpoint *ep);void snd_usb_endpoint_free (struct list_head *head);
sound/usb/pcm.c +3 -0
@@ -563,6 +563,9 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream) goto unlock; } +snd_usb_endpoint_sync_pending_stop (subs->sync_endpoint); +snd_usb_endpoint_sync_pending_stop (subs->data_endpoint); +/* some unit conversions in runtime */ subs->data_endpoint->maxframesize =bytes_to_frames (runtime, subs->data_endpoint->maxpacksize);