Linux 3.14.35
Greg KH
maintainerI'm announcing the release of the 3.14.35 kernel.
All users of the 3.14 kernel series must upgrade.
The updated 3.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.14.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arc/include/asm/pgtable.h | 3 - arch/arm/boot/dts/am335x-bone-common.dtsi | 1 arch/arm/boot/dts/tegra20.dtsi | 8 +- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 2 arch/arm/mach-pxa/corgi.c | 3 + arch/arm/mach-pxa/hx4700.c | 2 arch/arm/mach-pxa/poodle.c | 2 arch/arm/mach-sa1100/pm.c | 1 arch/arm64/kernel/signal32.c | 5 - arch/metag/include/asm/processor.h | 4 - arch/mips/kernel/mips_ksyms.c | 8 ++ arch/mips/kvm/kvm_locore.S | 2 arch/mips/kvm/kvm_mips.c | 8 +- arch/powerpc/sysdev/axonram.c | 2 arch/x86/kvm/x86.c | 19 +++---- arch/x86/mm/gup.c | 2 arch/x86/mm/hugetlbpage.c | 8 ++ arch/x86/mm/mmap.c | 6 +- block/blk-throttle.c | 3 + block/cfq-iosched.c | 16 ++++- drivers/bluetooth/ath3k.c | 8 ++ drivers/char/tpm/tpm-interface.c | 2 drivers/char/tpm/tpm_i2c_atmel.c | 4 + drivers/char/tpm/tpm_i2c_nuvoton.c | 5 + drivers/char/tpm/tpm_i2c_stm_st33.c | 2 drivers/char/tpm/tpm_ibmvtpm.c | 28 +++++++--- drivers/char/tpm/tpm_tis.c | 76 ++++++++++++++++++++++------ drivers/cpufreq/cpufreq.c | 6 +- drivers/cpufreq/s3c2416-cpufreq.c | 4 - drivers/cpufreq/s3c24xx-cpufreq.c | 2 drivers/cpufreq/speedstep-lib.c | 3 + drivers/cpufreq/speedstep-smi.c | 12 ++++ drivers/edac/amd64_edac.c | 10 ++- drivers/gpio/gpio-tps65912.c | 14 +++-- drivers/gpio/gpiolib-of.c | 9 +-- drivers/hid/i2c-hid/i2c-hid.c | 5 + drivers/md/raid1.c | 5 + drivers/md/raid5.c | 3 - drivers/media/usb/dvb-usb-v2/lmedm04.c | 7 ++ drivers/media/usb/em28xx/em28xx-audio.c | 4 - drivers/media/usb/em28xx/em28xx-dvb.c | 2 drivers/media/usb/em28xx/em28xx-input.c | 2 drivers/media/usb/em28xx/em28xx-video.c | 2 drivers/mmc/host/sdhci-pxav3.c | 4 - drivers/net/wireless/iwlwifi/mvm/mac80211.c | 5 - drivers/net/wireless/iwlwifi/mvm/tx.c | 5 + drivers/net/wireless/iwlwifi/pcie/tx.c | 7 ++ drivers/pci/pci-driver.c | 2 drivers/pci/rom.c | 7 +- drivers/power/88pm860x_charger.c | 1 drivers/power/bq24190_charger.c | 2 drivers/power/gpio-charger.c | 4 - drivers/scsi/megaraid/megaraid_sas_fusion.c | 3 - drivers/target/iscsi/iscsi_target_tq.c | 28 +--------- drivers/tty/pty.c | 3 + drivers/tty/serial/atmel_serial.c | 4 + drivers/tty/vt/vt.c | 4 + drivers/usb/core/buffer.c | 26 ++++++--- drivers/usb/core/hcd.c | 16 ++--- drivers/usb/core/usb.c | 1 drivers/usb/serial/cp210x.c | 1 drivers/xen/manage.c | 8 ++ fs/binfmt_elf.c | 5 + fs/btrfs/ctree.c | 17 +----- fs/btrfs/disk-io.c | 11 +++- fs/btrfs/tree-log.c | 11 +++- fs/jffs2/scan.c | 5 + fs/nfs/callback.c | 8 +- fs/nfs/callback_xdr.c | 4 + fs/xfs/xfs_buf_item.c | 4 + fs/xfs/xfs_inode.c | 2 fs/xfs/xfs_qm.c | 5 + fs/xfs/xfs_trans.c | 1 include/linux/fsnotify.h | 6 +- include/linux/usb/hcd.h | 1 kernel/debug/kdb/kdb_main.c | 2 kernel/time/ntp.c | 10 ++- kernel/trace/trace.c | 2 mm/hugetlb.c | 2 net/ceph/osd_client.c | 30 +++++++---- sound/pci/riptide/riptide.c | 27 +++++++-- sound/pci/rme9652/hdspm.c | 6 ++ 83 files changed, 424 insertions(+), 188 deletions(-)
Adam Lee (1):
Bluetooth: ath3k: workaround the compatibility issue with xHCI controller
Adrian Knoth (1):
ALSA: hdspm - Constrain periods to 2 on older cards
Alan Stern (1):
USB: fix use-after-free bug in usb_hcd_unlink_urb()
Alexey Brodkin (1):
ARC: fix page address calculation if PAGE_OFFSET != LINUX_LINK_BASE
Arnd Bergmann (1):
cpufreq: s3c: remove incorrect __init annotations
Catalin Marinas (1):
arm64: compat Fix siginfo_t -> compat_siginfo_t conversion on big endian
Chen Jie (1):
jffs2: fix handling of corrupted summary length
Christophe Ricard (1):
tpm/tpm_i2c_stm_st33: Fix potential bug in tpm_stm_i2c_send
Cyrille Pitchen (1):
tty/serial: at91: fix error handling in atmel_serial_probe()
Dan Carpenter (1):
ALSA: off by one bug in snd_riptide_joystick_probe()
Daniel J Blueman (1):
EDAC, amd64_edac: Prevent OOPS with >16 memory controllers
Dave Chinner (3):
xfs: ensure buffer types are set correctly
xfs: inode unlink does not set AGI buffer type
xfs: set superblock buffer type correctly
David Howells (1):
TPM: Add new TPMs to the tail of the list to prevent inadvertent change of dev
David Sterba (2):
btrfs: set proper message level for skinny metadata
btrfs: fix leak of path in btrfs_find_item
Dmitry Eremin-Solenikov (4):
power: gpio-charger: balance enable/disable_irq_wake calls
ARM: 8284/1: sa1100: clear RCSR_SMR on resume
ARM: pxa: add regulator_has_full_constraints to corgi board file
ARM: pxa: add regulator_has_full_constraints to poodle board file
Dmitry Osipenko (1):
ARM: dts: tegra20: fix GR3D, DSI unit and reg base addresses
Emmanuel Grumbach (1):
iwlwifi: pcie: disable the SCD_BASE_ADDR when we resume from WoWLAN
Eyal Shapira (1):
iwlwifi: mvm: validate tid and sta_id in ba_notif
Greg Kroah-Hartman (1):
Linux 3.14.35
Hans Holmberg (1):
gpiolib: of: allow of_gpiochip_find_and_xlate to find more than one chip per node
Hector Marco-Gisbert (1):
x86, mm/ASLR: Fix stack randomization on 64-bit systems
Hon Ching (Vicky) Lo (1):
tpm: Fix NULL return in tpm_ibmvtpm_get_desired_dma
Ilya Dryomov (3):
libceph: assert both regular and lingering lists in __remove_osd()
libceph: change from BUG to WARN for __remove_osd() asserts
libceph: fix double __remove_osd() problem
James Hogan (4):
MIPS: Export FP functions used by lose_fpu(1) for KVM
MIPS: KVM: Deliver guest interrupts after local_irq_disable()
KVM: MIPS: Don't leak FPU/DSP to guest
metag: Fix KSTK_EIP() and KSTK_ESP() macros
Jan Kara (2):
fsnotify: fix handling of renames in audit
xfs: Fix quota type in quota structures when reusing quota file
Jay Lan (1):
kdb: fix incorrect counts in KDB summary command output
Jeff Layton (1):
nfs: don't call blocking operations while !TASK_RUNNING
Jeff Moyer (1):
cfq-iosched: fix incorrect filing of rt async cfqq
Jisheng Zhang (1):
mmc: sdhci-pxav3: fix setting of pdata->clk_delay_cycles
John Stultz (1):
ntp: Fixup adjtimex freq validation on 32-bit systems
Kiran Padwal (1):
char: tpm: Add missing error check for devm_kzalloc
Konstantin Khlebnikov (1):
cfq-iosched: handle failure of cfq group allocation
Krzysztof Kozlowski (2):
power_supply: 88pm860x: Fix leaked power supply on probe fail
power: bq24190: Fix ignored supplicants
Lennart Sorensen (1):
USB: cp210x: add ID for RUGGEDCOM USB Serial Console
Lokesh Vutla (1):
ARM: DRA7: hwmod: Fix boot crash with DEBUG_LL enabled on UART3
Luciano Coelho (2):
iwlwifi: mvm: fix failure path when power_update fails in add_interface
iwlwifi: mvm: always use mac color zero
Malcolm Priestley (1):
lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in interrupt urb
Marcelo Tosatti (1):
KVM: x86: update masterclock values on TSC writes
Martin Vajnar (1):
hx4700: regulator: declare full constraints
Matthew Wilcox (1):
axonram: Fix bug in direct_access
Michel Dänzer (1):
PCI: Fix infinite loop with ROM image of size 0
Mikulas Patocka (1):
cpufreq: speedstep-smi: enable interrupts when waiting
Naoya Horiguchi (1):
mm/hugetlb: pmd_huge() returns true for non-present hugepage
NeilBrown (1):
md/raid5: Fix livelock when array is both resyncing and degraded.
Nicholas Bellinger (1):
iscsi-target: Drop problematic active_ts_list usage
Nicolas Pitre (1):
vt: provide notifications on selection changes
Nicolas Saenz Julienne (1):
gpio: tps65912: fix wrong container_of arguments
Peter Hurley (1):
tty: Prevent untrappable signals from malicious program
Ricardo Ribalda Delgado (1):
PCI: Generate uppercase hex for modalias var in uevent
Robert Nelson (1):
ARM: dts: am335x-bone*: usb0 is hardwired for peripheral
Ross Lagerwall (1):
xen/manage: Fix USB interaction issues when resuming
Russell King (2):
em28xx: ensure "closing" messages terminate with a newline
em28xx-audio: fix missing newlines
Scot Doyle (1):
tpm_tis: verify interrupt during init
Sebastian Andrzej Siewior (1):
usb: core: buffer: smallest buffer should start at ARCH_DMA_MINALIGN
Seth Forshee (1):
HID: i2c-hid: Limit reads to wMaxInputLength bytes for input events
[email protected] (1):
megaraid_sas: disable interrupt_mask before enabling hardware interrupts
Thadeu Lima de Souza Cascardo (1):
blk-throttle: check stats_cpu before reading it from sysfs
Tomáš Hodek (1):
md/raid1: fix read balance when a drive is write-mostly.
Trond Myklebust (1):
NFSv4.1: Fix a kfree() of uninitialised pointers in decode_cb_sequence_args
Vikram Mulukutla (1):
tracing: Fix unmapping loop in tracing_mark_write
Viresh Kumar (1):
cpufreq: Set cpufreq_cpu_data to NULL before putting kobject
honclo (1):
Added Little Endian support to vtpm module
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 14 -SUBLEVEL = 34 +SUBLEVEL = 35 EXTRAVERSION = NAME = Remembering Coco
arch/arc/include/asm/pgtable.h +2 -1
@@ -259,7 +259,8 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)#define pmd_clear (xp) do { pmd_val(*(xp)) = 0; } while (0)#define pte_page (x) (mem_map + \ - (unsigned long)(((pte_val(x) - PAGE_OFFSET) >> PAGE_SHIFT))) + (unsigned long)(((pte_val(x) - CONFIG_LINUX_LINK_BASE) >> \ + PAGE_SHIFT)))#define mk_pte (page, pgprot) \ ({ \
arch/arm/boot/dts/am335x-bone-common.dtsi +1 -0
@@ -197,6 +197,7 @@ usb@47401000 { status = "okay"; + dr_mode = "peripheral"; }; usb@47401800 {
arch/arm/boot/dts/tegra20.dtsi +4 -4
@@ -76,9 +76,9 @@ reset-names = "2d"; }; - gr3d@54140000 { + gr3d@54180000 { compatible = "nvidia,tegra20-gr3d"; - reg = <0x54140000 0x00040000>; + reg = <0x54180000 0x00040000>; clocks = <&tegra_car TEGRA20_CLK_GR3D>; resets = <&tegra_car 24>; reset-names = "3d";
@@ -138,9 +138,9 @@ status = "disabled"; }; - dsi@542c0000 { + dsi@54300000 { compatible = "nvidia,tegra20-dsi"; - reg = <0x542c0000 0x00040000>; + reg = <0x54300000 0x00040000>; clocks = <&tegra_car TEGRA20_CLK_DSI>; resets = <&tegra_car 48>; reset-names = "dsi";
arch/arm/mach-omap2/omap_hwmod_7xx_data.c +1 -1
@@ -1669,7 +1669,7 @@ static struct omap_hwmod dra7xx_uart3_hwmod = { .class = &dra7xx_uart_hwmod_class, .clkdm_name = "l4per_clkdm", .main_clk = "uart3_gfclk_mux", - .flags = HWMOD_SWSUP_SIDLE_ACT, + .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP4UART3_FLAGS, .prcm = { .omap4 = { .clkctrl_offs = DRA7XX_CM_L4PER_UART3_CLKCTRL_OFFSET,
arch/arm/mach-pxa/corgi.c +3 -0
@@ -26,6 +26,7 @@#include <linux/i2c.h> #include <linux/i2c/pxa-i2c.h> #include <linux/io.h> +#include <linux/regulator/machine.h> #include <linux/spi/spi.h> #include <linux/spi/ads7846.h> #include <linux/spi/corgi_lcd.h>
@@ -711,6 +712,8 @@ static void __init corgi_init(void) sharpsl_nand_partitions[1 ].size =53 *1024 *1024 ;platform_add_devices (devices,ARRAY_SIZE (devices)); + +regulator_has_full_constraints (); } static void __init fixup_corgi(struct tag *tags, char **cmdline,
arch/arm/mach-pxa/hx4700.c +2 -0
@@ -892,6 +892,8 @@ static void __init hx4700_init(void)mdelay (10 );gpio_set_value (GPIO71_HX4700_ASIC3_nRESET,1 );mdelay (10 ); + +regulator_has_full_constraints (); }MACHINE_START (H4700 ,"HP iPAQ HX4700" )
arch/arm/mach-pxa/poodle.c +2 -0
@@ -25,6 +25,7 @@#include <linux/gpio.h> #include <linux/i2c.h> #include <linux/i2c/pxa-i2c.h> +#include <linux/regulator/machine.h> #include <linux/spi/spi.h> #include <linux/spi/ads7846.h> #include <linux/spi/pxa2xx_spi.h>
@@ -454,6 +455,7 @@ static void __init poodle_init(void)pxa_set_i2c_info (NULL );i2c_register_board_info (0 ,ARRAY_AND_SIZE (poodle_i2c_devices));poodle_init_spi (); +regulator_has_full_constraints (); } static void __init fixup_poodle(struct tag *tags, char **cmdline,
arch/arm/mach-sa1100/pm.c +1 -0
@@ -81,6 +81,7 @@ static int sa11x0_pm_enter(suspend_state_t state)/* * Ensure not to come back here if it wasn't intended */ +RCSR =RCSR_SMR ;PSPR =0 ;/*
arch/arm64/kernel/signal32.c +2 -3
@@ -151,8 +151,7 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from)case __SI_TIMER: err |=__put_user (from->si_tid, &to->si_tid); err |=__put_user (from->si_overrun, &to->si_overrun); - err |=__put_user ((compat_uptr_t )(unsigned long )from->si_ptr, - &to->si_ptr); + err |=__put_user (from->si_int, &to->si_int);break ;case __SI_POLL: err |=__put_user (from->si_band, &to->si_band);
@@ -181,7 +180,7 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from)case __SI_MESGQ:/* But this is */ err |=__put_user (from->si_pid, &to->si_pid); err |=__put_user (from->si_uid, &to->si_uid); - err |=__put_user ((compat_uptr_t )(unsigned long )from->si_ptr, &to->si_ptr); + err |=__put_user (from->si_int, &to->si_int);break ;default :/* this is just in case for now ... */ err |=__put_user (from->si_pid, &to->si_pid);
arch/metag/include/asm/processor.h +2 -2
@@ -149,8 +149,8 @@ extern void exit_thread(void);unsigned long get_wchan (struct task_struct *p); -#define KSTK_EIP (tsk) ((tsk)->thread.kernel_context->CurrPC) -#define KSTK_ESP (tsk) ((tsk)->thread.kernel_context->AX[0].U0) +#define KSTK_EIP (tsk) (task_pt_regs(tsk)->ctx.CurrPC) +#define KSTK_ESP (tsk) (task_pt_regs(tsk)->ctx.AX[0].U0)#define user_stack_pointer (regs) ((regs)->ctx.AX[0].U0)
arch/mips/kernel/mips_ksyms.c +8 -0
@@ -14,6 +14,7 @@#include <linux/mm.h> #include <asm/uaccess.h> #include <asm/ftrace.h> +#include <asm/fpu.h> extern void *__bzero (void *__s,size_t __count); extern long __strncpy_from_user_nocheck_asm(char *__to,
@@ -26,6 +27,13 @@ extern long __strnlen_user_nocheck_asm(const char *s);extern long __strnlen_user_asm (const char *s);/* +* Core architecture code +*/ +#ifdef CONFIG_CPU_R4K_FPU +EXPORT_SYMBOL_GPL (_save_fp); +#endif + +/* * String functions */ EXPORT_SYMBOL (memset);
arch/mips/kvm/kvm_locore.S +1 -1
@@ -428,7 +428,7 @@ __kvm_mips_return_to_guest: /* Setup status register for running guest in UM */ .set at or v1, v1, (ST0_EXL | KSU_USER | ST0_IE) - and v1, v1, ~ST0_CU0 + and v1, v1, ~(ST0_CU0 | ST0_MX) .set noat mtc0 v1, CP0_STATUS ehb
arch/mips/kvm/kvm_mips.c +4 -4
@@ -15,6 +15,7 @@#include <linux/vmalloc.h> #include <linux/fs.h> #include <linux/bootmem.h> +#include <asm/fpu.h> #include <asm/page.h> #include <asm/cacheflush.h> #include <asm/mmu_context.h>
@@ -418,11 +419,13 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) vcpu->mmio_needed =0 ; } +lose_fpu (1 ); + +local_irq_disable ();/* Check if we have any exceptions/interrupts pending */ kvm_mips_deliver_interrupts (vcpu,kvm_read_c0_guest_cause (vcpu->arch.cop0)); -local_irq_disable ();kvm_guest_enter (); r =__kvm_mips_vcpu_run (run, vcpu);
@@ -1021,9 +1024,6 @@ void kvm_mips_set_c0_status(void) {uint32_t status =read_c0_status (); -if (cpu_has_fpu) - status |= (ST0_CU1 ); -if (cpu_has_dsp) status |= (ST0_MX );
arch/powerpc/sysdev/axonram.c +1 -1
@@ -156,7 +156,7 @@ axon_ram_direct_access(struct block_device *device, sector_t sector, } *kaddr = (void *)(bank->ph_addr + offset); - *pfn =virt_to_phys (kaddr) >>PAGE_SHIFT ; + *pfn =virt_to_phys (*kaddr) >>PAGE_SHIFT ;return 0 ; }
arch/x86/kvm/x86.c +10 -9
@@ -1207,21 +1207,22 @@ void kvm_track_tsc_matching(struct kvm_vcpu *vcpu) {#ifdef CONFIG_X86_64 bool vcpus_matched; -bool do_request = false;struct kvm_arch *ka = &vcpu->kvm->arch;struct pvclock_gtod_data *gtod = &pvclock_gtod_data; vcpus_matched = (ka->nr_vcpus_matched_tsc +1 ==atomic_read (&vcpu->kvm->online_vcpus)); -if (vcpus_matched && gtod->clock.vclock_mode ==VCLOCK_TSC ) -if (!ka->use_master_clock) - do_request =1 ; - -if (!vcpus_matched && ka->use_master_clock) - do_request =1 ; - -if (do_request) +/* +* Once the masterclock is enabled, always perform request in +* order to update it. +* +* In order to enable masterclock, the host clocksource must be TSC +* and the vcpus need to have matched TSCs. When that happens, +* perform request to enable masterclock. +*/ +if (ka->use_master_clock || + (gtod->clock.vclock_mode ==VCLOCK_TSC && vcpus_matched))kvm_make_request (KVM_REQ_MASTERCLOCK_UPDATE , vcpu); trace_kvm_track_tsc(vcpu->vcpu_id, ka->nr_vcpus_matched_tsc,
arch/x86/mm/gup.c +1 -1
@@ -172,7 +172,7 @@ static int gup_pmd_range(pud_t pud, unsigned long addr, unsigned long end,*/ if (pmd_none (pmd) ||pmd_trans_splitting (pmd))return 0 ; -if (unlikely (pmd_large (pmd))) { +if (unlikely (pmd_large (pmd) || !pmd_present (pmd))) {/* * NUMA hinting faults need to be handled in the GUP * slowpath for accounting purposes and so that they
arch/x86/mm/hugetlbpage.c +7 -1
@@ -66,9 +66,15 @@ follow_huge_addr(struct mm_struct *mm, unsigned long address, int write)return ERR_PTR (-EINVAL ); } +/* +* pmd_huge() returns 1 if @pmd is hugetlb related entry, that is normal +* hugetlb entry or non-present (migration or hwpoisoned) hugetlb entry. +* Otherwise, returns 0. +*/ int pmd_huge (pmd_t pmd) { -return !!(pmd_val (pmd) & _PAGE_PSE); +return !pmd_none (pmd) && + (pmd_val (pmd) & (_PAGE_PRESENT|_PAGE_PSE)) != _PAGE_PRESENT; }int pud_huge (pud_t pud)
arch/x86/mm/mmap.c +3 -3
@@ -35,12 +35,12 @@ struct __read_mostly va_alignment va_align = { .flags = -1, }; -static unsigned int stack_maxrandom_size (void ) +static unsigned long stack_maxrandom_size (void ) { -unsigned int max =0 ; +unsigned long max =0 ;if ((current->flags &PF_RANDOMIZE ) && !(current->personality &ADDR_NO_RANDOMIZE )) { - max = ((-1U ) &STACK_RND_MASK ) <<PAGE_SHIFT ; + max = ((-1UL ) &STACK_RND_MASK ) <<PAGE_SHIFT ; }return max;
block/blk-throttle.c +3 -0
@@ -1292,6 +1292,9 @@ static u64 tg_prfill_cpu_rwstat(struct seq_file *sf,struct blkg_rwstat rwstat = { }, tmp;int i, cpu; +if (tg->stats_cpu ==NULL ) +return 0 ; +for_each_possible_cpu (cpu) {struct tg_stats_cpu *sc =per_cpu_ptr (tg->stats_cpu, cpu);
block/cfq-iosched.c +13 -3
@@ -3585,6 +3585,11 @@ retry: blkcg =bio_blkcg (bio); cfqg =cfq_lookup_create_cfqg (cfqd, blkcg); +if (!cfqg) { + cfqq = &cfqd->oom_cfqq; + goto out; + } + cfqq =cic_to_cfqq (cic, is_sync);/*
@@ -3621,7 +3626,7 @@ retry: }else cfqq = &cfqd->oom_cfqq; } - +out:if (new_cfqq)kmem_cache_free (cfq_pool, new_cfqq);
@@ -3651,12 +3656,17 @@ static struct cfq_queue * cfq_get_queue(struct cfq_data *cfqd, bool is_sync, struct cfq_io_cq *cic, struct bio *bio, gfp_t gfp_mask) { - const int ioprio_class = IOPRIO_PRIO_CLASS(cic->ioprio); -const int ioprio =IOPRIO_PRIO_DATA (cic->ioprio); + int ioprio_class = IOPRIO_PRIO_CLASS(cic->ioprio); +int ioprio =IOPRIO_PRIO_DATA (cic->ioprio);struct cfq_queue **async_cfqq =NULL ;struct cfq_queue *cfqq =NULL ;if (!is_sync) { +if (!ioprio_valid (cic->ioprio)) { +struct task_struct *tsk = current; + ioprio =task_nice_ioprio (tsk); + ioprio_class =task_nice_ioclass (tsk); + } async_cfqq =cfq_async_queue_prio (cfqd, ioprio_class, ioprio); cfqq = *async_cfqq; }
drivers/bluetooth/ath3k.c +8 -0
@@ -157,6 +157,8 @@ static const struct usb_device_id ath3k_blist_tbl[] = {#define USB_REQ_DFU_DNLOAD 1#define BULK_SIZE 4096#define FW_HDR_SIZE 20 +#define TIMEGAP_USEC_MIN 50 +#define TIMEGAP_USEC_MAX 100static int ath3k_load_firmware (struct usb_device *udev,const struct firmware *firmware)
@@ -187,6 +189,9 @@ static int ath3k_load_firmware(struct usb_device *udev, count -=20 ;while (count) { +/* workaround the compatibility issue with xHCI controller*/ +usleep_range (TIMEGAP_USEC_MIN ,TIMEGAP_USEC_MAX ); + size =min_t (uint, count,BULK_SIZE ); pipe =usb_sndbulkpipe (udev,0x02 );memcpy (send_buf, firmware->data + sent, size);
@@ -283,6 +288,9 @@ static int ath3k_load_fwfile(struct usb_device *udev, count -= size;while (count) { +/* workaround the compatibility issue with xHCI controller*/ +usleep_range (TIMEGAP_USEC_MIN ,TIMEGAP_USEC_MAX ); + size =min_t (uint, count,BULK_SIZE ); pipe =usb_sndbulkpipe (udev,0x02 );
drivers/char/tpm/tpm-interface.c +1 -1
@@ -1122,7 +1122,7 @@ struct tpm_chip *tpm_register_hardware(struct device *dev,/* Make chip available */ spin_lock (&driver_lock); -list_add_rcu (&chip->list, &tpm_chip_list); +list_add_tail_rcu (&chip->list, &tpm_chip_list);spin_unlock (&driver_lock);return chip;
drivers/char/tpm/tpm_i2c_atmel.c +4 -0
@@ -168,6 +168,10 @@ static int i2c_atmel_probe(struct i2c_client *client, chip->vendor.priv =devm_kzalloc (dev,sizeof (struct priv_data ),GFP_KERNEL ); +if (!chip->vendor.priv) { + rc = -ENOMEM ; + goto out_err; + }/* Default timeouts */ chip->vendor.timeout_a =msecs_to_jiffies (TPM_I2C_SHORT_TIMEOUT );
drivers/char/tpm/tpm_i2c_nuvoton.c +5 -0
@@ -538,6 +538,11 @@ static int i2c_nuvoton_probe(struct i2c_client *client, chip->vendor.priv =devm_kzalloc (dev,sizeof (struct priv_data ),GFP_KERNEL ); +if (!chip->vendor.priv) { + rc = -ENOMEM ; + goto out_err; + } +init_waitqueue_head (&chip->vendor.read_queue);init_waitqueue_head (&chip->vendor.int_queue);
drivers/char/tpm/tpm_i2c_stm_st33.c +1 -1
@@ -488,7 +488,7 @@ static int tpm_stm_i2c_send(struct tpm_chip *chip, unsigned char *buf,if (burstcnt <0 )return burstcnt; size =min_t (int, len - i -1 , burstcnt); - ret =I2C_WRITE_DATA (client,TPM_DATA_FIFO , buf, size); + ret =I2C_WRITE_DATA (client,TPM_DATA_FIFO , buf + i, size);if (ret <0 ) goto out_err;
drivers/char/tpm/tpm_ibmvtpm.c +20 -8
@@ -148,7 +148,8 @@ static int tpm_ibmvtpm_send(struct tpm_chip *chip, u8 *buf, size_t count) crq.len = (u16 )count; crq.data = ibmvtpm->rtce_dma_handle; - rc =ibmvtpm_send_crq (ibmvtpm->vdev, word[0 ], word[1 ]); + rc =ibmvtpm_send_crq (ibmvtpm->vdev,cpu_to_be64 (word[0 ]), +cpu_to_be64 (word[1 ]));if (rc !=H_SUCCESS ) {dev_err (ibmvtpm->dev,"tpm_ibmvtpm_send failed rc=%d\n" , rc); rc =0 ;
@@ -186,7 +187,8 @@ static int ibmvtpm_crq_get_rtce_size(struct ibmvtpm_dev *ibmvtpm) crq.valid = (u8 )IBMVTPM_VALID_CMD ; crq.msg = (u8 )VTPM_GET_RTCE_BUFFER_SIZE ; - rc =ibmvtpm_send_crq (ibmvtpm->vdev, buf[0 ], buf[1 ]); + rc =ibmvtpm_send_crq (ibmvtpm->vdev,cpu_to_be64 (buf[0 ]), +cpu_to_be64 (buf[1 ]));if (rc !=H_SUCCESS )dev_err (ibmvtpm->dev,"ibmvtpm_crq_get_rtce_size failed rc=%d\n" , rc);
@@ -212,7 +214,8 @@ static int ibmvtpm_crq_get_version(struct ibmvtpm_dev *ibmvtpm) crq.valid = (u8 )IBMVTPM_VALID_CMD ; crq.msg = (u8 )VTPM_GET_VERSION ; - rc =ibmvtpm_send_crq (ibmvtpm->vdev, buf[0 ], buf[1 ]); + rc =ibmvtpm_send_crq (ibmvtpm->vdev,cpu_to_be64 (buf[0 ]), +cpu_to_be64 (buf[1 ]));if (rc !=H_SUCCESS )dev_err (ibmvtpm->dev,"ibmvtpm_crq_get_version failed rc=%d\n" , rc);
@@ -307,6 +310,14 @@ static int tpm_ibmvtpm_remove(struct vio_dev *vdev)static unsigned long tpm_ibmvtpm_get_desired_dma (struct vio_dev *vdev) {struct ibmvtpm_dev *ibmvtpm =ibmvtpm_get_data (&vdev->dev); + +/* ibmvtpm initializes at probe time, so the data we are +* asking for may not be set yet. Estimate that 4K required +* for TCE-mapped buffer in addition to CRQ. +*/ +if (!ibmvtpm) +return CRQ_RES_BUF_SIZE +PAGE_SIZE ; +return CRQ_RES_BUF_SIZE + ibmvtpm->rtce_size; }
@@ -327,7 +338,8 @@ static int tpm_ibmvtpm_suspend(struct device *dev) crq.valid = (u8 )IBMVTPM_VALID_CMD ; crq.msg = (u8 )VTPM_PREPARE_TO_SUSPEND ; - rc =ibmvtpm_send_crq (ibmvtpm->vdev, buf[0 ], buf[1 ]); + rc =ibmvtpm_send_crq (ibmvtpm->vdev,cpu_to_be64 (buf[0 ]), +cpu_to_be64 (buf[1 ]));if (rc !=H_SUCCESS )dev_err (ibmvtpm->dev,"tpm_ibmvtpm_suspend failed rc=%d\n" , rc);
@@ -472,11 +484,11 @@ static void ibmvtpm_crq_process(struct ibmvtpm_crq *crq,case IBMVTPM_VALID_CMD :switch (crq->msg) {case VTPM_GET_RTCE_BUFFER_SIZE_RES : -if (crq->len <=0 ) { +if (be16_to_cpu (crq->len) <=0 ) {dev_err (ibmvtpm->dev,"Invalid rtce size\n" );return ; } - ibmvtpm->rtce_size = crq->len; + ibmvtpm->rtce_size =be16_to_cpu (crq->len); ibmvtpm->rtce_buf =kmalloc (ibmvtpm->rtce_size,GFP_KERNEL );if (!ibmvtpm->rtce_buf) {
@@ -497,11 +509,11 @@ static void ibmvtpm_crq_process(struct ibmvtpm_crq *crq,return ;case VTPM_GET_VERSION_RES : - ibmvtpm->vtpm_version = crq->data; + ibmvtpm->vtpm_version =be32_to_cpu (crq->data);return ;case VTPM_TPM_COMMAND_RES :/* len of the data in rtce buffer */ - ibmvtpm->res_len = crq->len; + ibmvtpm->res_len =be16_to_cpu (crq->len);wake_up_interruptible (&ibmvtpm->wq);return ;default :
drivers/char/tpm/tpm_tis.c +62 -14
126 lines not on this page · raw message
drivers/cpufreq/cpufreq.c +3 -3
@@ -1365,9 +1365,10 @@ static int __cpufreq_remove_dev_finish(struct device *dev,unsigned long flags;struct cpufreq_policy *policy; -read_lock_irqsave (&cpufreq_driver_lock, flags); +write_lock_irqsave (&cpufreq_driver_lock, flags); policy =per_cpu (cpufreq_cpu_data, cpu); -read_unlock_irqrestore (&cpufreq_driver_lock, flags); +per_cpu (cpufreq_cpu_data, cpu) =NULL ; +write_unlock_irqrestore (&cpufreq_driver_lock, flags);if (!policy) {pr_debug ("%s: No cpu_data found\n" , __func__);
@@ -1422,7 +1423,6 @@ static int __cpufreq_remove_dev_finish(struct device *dev, } } -per_cpu (cpufreq_cpu_data, cpu) =NULL ;return 0 ; }
drivers/cpufreq/s3c2416-cpufreq.c +2 -2
@@ -263,7 +263,7 @@ out: }#ifdef CONFIG_ARM_S3C2416_CPUFREQ_VCORESCALE -static void __init s3c2416_cpufreq_cfg_regulator (struct s3c2416_data *s3c_freq) +static void s3c2416_cpufreq_cfg_regulator (struct s3c2416_data *s3c_freq) {int count, v, i, found;struct cpufreq_frequency_table *freq;
@@ -335,7 +335,7 @@ static struct notifier_block s3c2416_cpufreq_reboot_notifier = { .notifier_call = s3c2416_cpufreq_reboot_notifier_evt, }; -static int __init s3c2416_cpufreq_driver_init (struct cpufreq_policy *policy) +static int s3c2416_cpufreq_driver_init (struct cpufreq_policy *policy) {struct s3c2416_data *s3c_freq = &s3c2416_cpufreq;struct cpufreq_frequency_table *freq;
drivers/cpufreq/s3c24xx-cpufreq.c +1 -1
@@ -454,7 +454,7 @@ static struct cpufreq_driver s3c24xx_driver = { }; -int __init s3c_cpufreq_register (struct s3c_cpufreq_info *info) +int s3c_cpufreq_register (struct s3c_cpufreq_info *info) {if (!info || !info->name) { printk(KERN_ERR "%s: failed to pass valid information\n",
drivers/cpufreq/speedstep-lib.c +3 -0
@@ -400,6 +400,7 @@ unsigned int speedstep_get_freqs(enum speedstep_processor processor,pr_debug ("previous speed is %u\n" , prev_speed); +preempt_disable ();local_irq_save (flags);/* switch to low state */
@@ -464,6 +465,8 @@ unsigned int speedstep_get_freqs(enum speedstep_processor processor, out:local_irq_restore (flags); +preempt_enable (); +return ret; }EXPORT_SYMBOL_GPL (speedstep_get_freqs);
drivers/cpufreq/speedstep-smi.c +12 -0
@@ -156,6 +156,7 @@ static void speedstep_set_state(unsigned int state)return ;/* Disable IRQs */ +preempt_disable ();local_irq_save (flags); command = (smi_sig &0xffffff00 ) | (smi_cmd &0xff );
@@ -166,9 +167,19 @@ static void speedstep_set_state(unsigned int state) do { if (retry) { + /* + * We need to enable interrupts, otherwise the blockage + * won't resolve. + * + * We disable preemption so that other processes don't + * run. If other processes were running, they could + * submit more DMA requests, making the blockage worse. + */ pr_debug("retry %u, previous result %u, waiting...\n", retry, result); + local_irq_enable(); mdelay(retry * 50); + local_irq_disable(); } retry++; __asm__ __volatile__(
@@ -185,6 +196,7 @@ static void speedstep_set_state(unsigned int state)/* enable IRQs */ local_irq_restore (flags); +preempt_enable ();if (new_state == state) pr_debug("change to %u MHz succeeded after %u tries "
drivers/edac/amd64_edac.c +8 -2
@@ -2006,14 +2006,20 @@ static void __log_bus_error(struct mem_ctl_info *mci, struct err_info *err,static inline void decode_bus_error (int node_id,struct mce *m) { -struct mem_ctl_info *mci = mcis[node_id]; -struct amd64_pvt *pvt = mci->pvt_info; +struct mem_ctl_info *mci; +struct amd64_pvt *pvt;u8 ecc_type = (m->status >>45 ) &0x3 ;u8 xec =XEC (m->status,0x1f );u16 ec =EC (m->status);u64 sys_addr;struct err_info err; + mci =edac_mc_find (node_id); +if (!mci) +return ; + + pvt = mci->pvt_info; +/* Bail out early if this was an 'observed' error */ if (PP (ec) ==NBSL_PP_OBS )return ;
drivers/gpio/gpio-tps65912.c +10 -4
@@ -26,9 +26,12 @@ struct tps65912_gpio_data {struct gpio_chip gpio_chip; }; +#define to_tgd (gc) container_of(gc, struct tps65912_gpio_data, gpio_chip) +static int tps65912_gpio_get (struct gpio_chip *gc,unsigned offset) { - struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio); +struct tps65912_gpio_data *tps65912_gpio =to_tgd (gc); +struct tps65912 *tps65912 = tps65912_gpio->tps65912;int val; val =tps65912_reg_read (tps65912,TPS65912_GPIO1 + offset);
@@ -42,7 +45,8 @@ static int tps65912_gpio_get(struct gpio_chip *gc, unsigned offset)static void tps65912_gpio_set (struct gpio_chip *gc,unsigned offset,int value) { - struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio); +struct tps65912_gpio_data *tps65912_gpio =to_tgd (gc); +struct tps65912 *tps65912 = tps65912_gpio->tps65912;if (value) tps65912_set_bits(tps65912, TPS65912_GPIO1 + offset,
@@ -55,7 +59,8 @@ static void tps65912_gpio_set(struct gpio_chip *gc, unsigned offset,static int tps65912_gpio_output (struct gpio_chip *gc,unsigned offset,int value) { - struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio); +struct tps65912_gpio_data *tps65912_gpio =to_tgd (gc); +struct tps65912 *tps65912 = tps65912_gpio->tps65912;/* Set the initial value */ tps65912_gpio_set (gc, offset, value);
@@ -66,7 +71,8 @@ static int tps65912_gpio_output(struct gpio_chip *gc, unsigned offset,static int tps65912_gpio_input (struct gpio_chip *gc,unsigned offset) { - struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio); +struct tps65912_gpio_data *tps65912_gpio =to_tgd (gc); +struct tps65912 *tps65912 = tps65912_gpio->tps65912;return tps65912_clear_bits (tps65912,TPS65912_GPIO1 + offset,GPIO_CFG_MASK );
drivers/gpio/gpiolib-of.c +5 -4
@@ -45,12 +45,13 @@ static int of_gpiochip_find_and_xlate(struct gpio_chip *gc, void *data) ret = gc->of_xlate (gc, &gg_data->gpiospec, gg_data->flags);if (ret <0 ) { -/* We've found the gpio chip, but the translation failed. -* Return true to stop looking and return the translation -* error via out_gpio +/* We've found a gpio chip, but the translation failed. +* Store translation error in out_gpio. +* Return false to keep looking, as more than one gpio chip +* could be registered per of-node. */ gg_data->out_gpio =ERR_PTR (ret); -return true; +return false; } gg_data->out_gpio =gpio_to_desc (ret + gc->base);
drivers/hid/i2c-hid/i2c-hid.c +4 -1
@@ -356,7 +356,10 @@ static int i2c_hid_hwreset(struct i2c_client *client)static void i2c_hid_get_input (struct i2c_hid *ihid) {int ret, ret_size; -int size = ihid->bufsize; +int size =le16_to_cpu (ihid->hdesc.wMaxInputLength); + +if (size > ihid->bufsize) + size = ihid->bufsize; ret =i2c_master_recv (ihid->client, ihid->inbuf, size);if (ret != size) {
drivers/md/raid1.c +3 -2
@@ -561,7 +561,7 @@ static int read_balance(struct r1conf *conf, struct r1bio *r1_bio, int *max_sectif (test_bit (WriteMostly, &rdev->flags)) {/* Don't balance among write-mostly, just * use the first as a last resort */ -if (best_disk <0 ) { +if (best_dist_disk <0 ) {if (is_badblock (rdev, this_sector, sectors, &first_bad, &bad_sectors)) {if (first_bad < this_sector)
@@ -570,7 +570,8 @@ static int read_balance(struct r1conf *conf, struct r1bio *r1_bio, int *max_sect best_good_sectors = first_bad - this_sector; }else best_good_sectors = sectors; - best_disk = disk; + best_dist_disk = disk; + best_pending_disk = disk; }continue ; }
drivers/md/raid5.c +2 -1
@@ -3071,7 +3071,8 @@ static void handle_stripe_dirtying(struct r5conf *conf,* generate correct data from the parity. */ if (conf->max_degraded ==2 || - (recovery_cp < MaxSector && sh->sector >= recovery_cp)) { + (recovery_cp < MaxSector && sh->sector >= recovery_cp && + s->failed ==0 )) {/* Calculate the real rcw later - for now make it * look like rcw is cheaper */
drivers/media/usb/dvb-usb-v2/lmedm04.c +7 -0
@@ -350,6 +350,7 @@ static int lme2510_int_read(struct dvb_usb_adapter *adap) {struct dvb_usb_device *d =adap_to_d (adap);struct lme2510_state *lme_int =adap_to_priv (adap); +struct usb_host_endpoint *ep; lme_int->lme_urb =usb_alloc_urb (0 ,GFP_ATOMIC );
@@ -371,6 +372,12 @@ static int lme2510_int_read(struct dvb_usb_adapter *adap) adap, 8); +/* Quirk of pipe reporting PIPE_BULK but behaves as interrupt */ + ep =usb_pipe_endpoint (d->udev, lme_int->lme_urb->pipe); + +if (usb_endpoint_type (&ep->desc) ==USB_ENDPOINT_XFER_BULK ) + lme_int->lme_urb->pipe =usb_rcvbulkpipe (d->udev,0xa ), + lme_int->lme_urb->transfer_flags |=URB_NO_TRANSFER_DMA_MAP ;usb_submit_urb (lme_int->lme_urb,GFP_ATOMIC );
drivers/media/usb/em28xx/em28xx-audio.c +2 -2
@@ -814,7 +814,7 @@ static int em28xx_audio_urb_init(struct em28xx *dev)if (urb_size > ep_size * npackets) npackets =DIV_ROUND_UP (urb_size, ep_size); -em28xx_info ("Number of URBs: %d, with %d packets and %d size" , +em28xx_info ("Number of URBs: %d, with %d packets and %d size\n" , num_urb, npackets, urb_size);/* Estimate the bytes per period */
@@ -974,7 +974,7 @@ static int em28xx_audio_fini(struct em28xx *dev)return 0 ; } -em28xx_info ("Closing audio extension" ); +em28xx_info ("Closing audio extension\n" );if (dev->adev.sndcard) {snd_card_disconnect (dev->adev.sndcard);
drivers/media/usb/em28xx/em28xx-dvb.c +1 -1
@@ -1468,7 +1468,7 @@ static int em28xx_dvb_fini(struct em28xx *dev)return 0 ; } -em28xx_info ("Closing DVB extension" ); +em28xx_info ("Closing DVB extension\n" );if (dev->dvb) {struct em28xx_dvb *dvb = dev->dvb;
drivers/media/usb/em28xx/em28xx-input.c +1 -1
@@ -810,7 +810,7 @@ static int em28xx_ir_fini(struct em28xx *dev)return 0 ; } -em28xx_info ("Closing input extension" ); +em28xx_info ("Closing input extension\n" );em28xx_shutdown_buttons (dev);
drivers/media/usb/em28xx/em28xx-video.c +1 -1
@@ -1900,7 +1900,7 @@ static int em28xx_v4l2_fini(struct em28xx *dev)return 0 ; } -em28xx_info ("Closing video extension" ); +em28xx_info ("Closing video extension\n" );mutex_lock (&dev->lock);
drivers/mmc/host/sdhci-pxav3.c +2 -2
@@ -201,8 +201,8 @@ static struct sdhci_pxa_platdata *pxav3_get_mmc_pdata(struct device *dev)if (!pdata)return NULL ; -of_property_read_u32 (np,"mrvl,clk-delay-cycles" , &clk_delay_cycles); -if (clk_delay_cycles >0 ) +if (!of_property_read_u32 (np,"mrvl,clk-delay-cycles" , + &clk_delay_cycles)) pdata->clk_delay_cycles = clk_delay_cycles;return pdata;
drivers/net/wireless/iwlwifi/mvm/mac80211.c +1 -4
@@ -410,9 +410,6 @@ static void iwl_mvm_cleanup_iterator(void *data, u8 *mac, mvmvif->uploaded = false; mvmvif->ap_sta_id =IWL_MVM_STATION_COUNT ; -/* does this make sense at all? */ - mvmvif->color++; -spin_lock_bh (&mvm->time_event_lock);iwl_mvm_te_clear_data (mvm, &mvmvif->time_event_data);spin_unlock_bh (&mvm->time_event_lock);
@@ -597,7 +594,7 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw, ret =iwl_mvm_mac_ctxt_add (mvm, vif);if (ret) - goto out_release; + goto out_remove_mac;iwl_mvm_power_disable (mvm, vif);
drivers/net/wireless/iwlwifi/mvm/tx.c +5 -0
@@ -835,6 +835,11 @@ int iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb, sta_id = ba_notif->sta_id; tid = ba_notif->tid; +if (WARN_ONCE (sta_id >=IWL_MVM_STATION_COUNT || + tid >=IWL_MAX_TID_COUNT , +"sta_id %d tid %d" , sta_id, tid)) +return 0 ; +rcu_read_lock (); sta =rcu_dereference (mvm->fw_id_to_mac_id[sta_id]);
drivers/net/wireless/iwlwifi/pcie/tx.c +6 -1
@@ -729,7 +729,12 @@ void iwl_trans_pcie_tx_reset(struct iwl_trans *trans)iwl_write_direct32 (trans,FH_KW_MEM_ADDR_REG , trans_pcie->kw.dma >>4 ); -iwl_pcie_tx_start (trans, trans_pcie->scd_base_addr); +/* +* Send 0 as the scd_base_addr since the device may have be reset +* while we were in WoWLAN in which case SCD_SRAM_BASE_ADDR will +* contain garbage. +*/ +iwl_pcie_tx_start (trans,0 ); }/*
drivers/pci/pci-driver.c +1 -1
@@ -1324,7 +1324,7 @@ static int pci_uevent(struct device *dev, struct kobj_uevent_env *env)if (add_uevent_var (env,"PCI_SLOT_NAME=%s" ,pci_name (pdev)))return -ENOMEM ; - if (add_uevent_var(env, "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x", + if (add_uevent_var(env, "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02X", pdev->vendor, pdev->device, pdev->subsystem_vendor, pdev->subsystem_device, (u8)(pdev->class >> 16), (u8)(pdev->class >> 8),
drivers/pci/rom.c +4 -3
@@ -69,6 +69,7 @@ size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size) {void __iomem *image;int last_image; +unsigned length; image = rom; do {
@@ -91,9 +92,9 @@ size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size)if (readb (pds +3 ) !='R' )break ; last_image =readb (pds +21 ) &0x80 ; -/* this length is reliable */ - image +=readw (pds +16 ) *512 ; - }while (!last_image); + length =readw (pds +16 ); + image += length *512 ; + }while (length && !last_image);/* never return a size larger than the PCI resource window */ /* there are known ROMs that get the size wrong */
drivers/power/88pm860x_charger.c +1 -0
@@ -711,6 +711,7 @@ static int pm860x_charger_probe(struct platform_device *pdev)return 0 ; out_irq: +power_supply_unregister (&info->usb);while (--i >=0 )free_irq (info->irq[i], info); out:
drivers/power/bq24190_charger.c +1 -1
@@ -929,7 +929,7 @@ static void bq24190_charger_init(struct power_supply *charger) charger->properties = bq24190_charger_properties; charger->num_properties =ARRAY_SIZE (bq24190_charger_properties); charger->supplied_to = bq24190_charger_supplied_to; - charger->num_supplies =ARRAY_SIZE (bq24190_charger_supplied_to); + charger->num_supplicants =ARRAY_SIZE (bq24190_charger_supplied_to); charger->get_property = bq24190_charger_get_property; charger->set_property = bq24190_charger_set_property; charger->property_is_writeable = bq24190_charger_property_is_writeable;
drivers/power/gpio-charger.c +2 -2
@@ -168,7 +168,7 @@ static int gpio_charger_suspend(struct device *dev)if (device_may_wakeup (dev)) gpio_charger->wakeup_enabled = -enable_irq_wake (gpio_charger->irq); + !enable_irq_wake (gpio_charger->irq);return 0 ; }
@@ -178,7 +178,7 @@ static int gpio_charger_resume(struct device *dev)struct platform_device *pdev =to_platform_device (dev);struct gpio_charger *gpio_charger =platform_get_drvdata (pdev); -if (gpio_charger->wakeup_enabled) +if (device_may_wakeup (dev) && gpio_charger->wakeup_enabled)disable_irq_wake (gpio_charger->irq);power_supply_changed (&gpio_charger->charger);
drivers/scsi/megaraid/megaraid_sas_fusion.c +2 -1
@@ -92,6 +92,8 @@ megasas_enable_intr_fusion(struct megasas_instance *instance) {struct megasas_register_set __iomem *regs; regs = instance->reg_set; + + instance->mask_interrupts =0 ;/* For Thunderbolt/Invader also clear intr on enable */ writel (~0 , ®s->outbound_intr_status);readl (®s->outbound_intr_status);
@@ -100,7 +102,6 @@ megasas_enable_intr_fusion(struct megasas_instance *instance)/* Dummy readl to force pci flush */ readl (®s->outbound_intr_mask); - instance->mask_interrupts =0 ; }/**
drivers/target/iscsi/iscsi_target_tq.c +5 -23
@@ -24,36 +24,22 @@#include "iscsi_target_tq.h" #include "iscsi_target.h" -static LIST_HEAD (active_ts_list);static LIST_HEAD (inactive_ts_list); -static DEFINE_SPINLOCK (active_ts_lock);static DEFINE_SPINLOCK (inactive_ts_lock);static DEFINE_SPINLOCK (ts_bitmap_lock); -static void iscsi_add_ts_to_active_list (struct iscsi_thread_set *ts) -{ -spin_lock (&active_ts_lock); -list_add_tail (&ts->ts_list, &active_ts_list); - iscsit_global->active_ts++; -spin_unlock (&active_ts_lock); -} -static void iscsi_add_ts_to_inactive_list (struct iscsi_thread_set *ts) { +if (!list_empty (&ts->ts_list)) { +WARN_ON (1 ); +return ; + }spin_lock (&inactive_ts_lock);list_add_tail (&ts->ts_list, &inactive_ts_list); iscsit_global->inactive_ts++;spin_unlock (&inactive_ts_lock); } -static void iscsi_del_ts_from_active_list (struct iscsi_thread_set *ts) -{ -spin_lock (&active_ts_lock); -list_del (&ts->ts_list); - iscsit_global->active_ts--; -spin_unlock (&active_ts_lock); -} -static struct iscsi_thread_set *iscsi_get_ts_from_inactive_list (void ) {struct iscsi_thread_set *ts;
@@ -66,7 +52,7 @@ static struct iscsi_thread_set *iscsi_get_ts_from_inactive_list(void) ts = list_first_entry(&inactive_ts_list, struct iscsi_thread_set, ts_list); -list_del (&ts->ts_list); +list_del_init (&ts->ts_list); iscsit_global->inactive_ts--;spin_unlock (&inactive_ts_lock);
@@ -204,8 +190,6 @@ static void iscsi_deallocate_extra_thread_sets(void)void iscsi_activate_thread_set (struct iscsi_conn *conn,struct iscsi_thread_set *ts) { -iscsi_add_ts_to_active_list (ts); -spin_lock_bh (&ts->ts_state_lock); conn->thread_set = ts; ts->conn = conn;
@@ -397,7 +381,6 @@ struct iscsi_conn *iscsi_rx_thread_pre_handler(struct iscsi_thread_set *ts)if (ts->delay_inactive && (--ts->thread_count ==0 )) {spin_unlock_bh (&ts->ts_state_lock); -iscsi_del_ts_from_active_list (ts);if (!iscsit_global->in_shutdown)iscsi_deallocate_extra_thread_sets ();
@@ -452,7 +435,6 @@ struct iscsi_conn *iscsi_tx_thread_pre_handler(struct iscsi_thread_set *ts)if (ts->delay_inactive && (--ts->thread_count ==0 )) {spin_unlock_bh (&ts->ts_state_lock); -iscsi_del_ts_from_active_list (ts);if (!iscsit_global->in_shutdown)iscsi_deallocate_extra_thread_sets ();
drivers/tty/pty.c +3 -0
@@ -209,6 +209,9 @@ static int pty_signal(struct tty_struct *tty, int sig)unsigned long flags;struct pid *pgrp; +if (sig !=SIGINT && sig !=SIGQUIT && sig !=SIGTSTP ) +return -EINVAL ; +if (tty->link) {spin_lock_irqsave (&tty->link->ctrl_lock, flags); pgrp =get_pid (tty->link->pgrp);
drivers/tty/serial/atmel_serial.c +3 -1
@@ -2392,7 +2392,7 @@ static int atmel_serial_probe(struct platform_device *pdev) ret =atmel_init_port (port, pdev);if (ret) - goto err; + goto err_clear_bit;if (!atmel_use_pdc_rx (&port->uart)) { ret = -ENOMEM ;
@@ -2441,6 +2441,8 @@ err_alloc_ring:clk_put (port->clk); port->clk =NULL ; } +err_clear_bit: +clear_bit (port->uart.line, atmel_ports_in_use); err:return ret; }
drivers/tty/vt/vt.c +3 -1
@@ -498,6 +498,7 @@ void invert_screen(struct vc_data *vc, int offset, int count, int viewed)#endif if (DO_UPDATE (vc))do_update_region (vc, (unsigned long ) p, count); +notify_update (vc); }/* used by selection: complement pointer position */
@@ -514,6 +515,7 @@ void complement_pos(struct vc_data *vc, int offset)scr_writew (old,screenpos (vc, old_offset,1 ));if (DO_UPDATE (vc)) vc->vc_sw->con_putc (vc, old, oldy, oldx); +notify_update (vc); } old_offset = offset;
@@ -531,8 +533,8 @@ void complement_pos(struct vc_data *vc, int offset) oldy = (offset >>1 ) / vc->vc_cols; vc->vc_sw->con_putc (vc, new, oldy, oldx); } +notify_update (vc); } - }static void insert_char (struct vc_data *vc,unsigned int nr)
drivers/usb/core/buffer.c +17 -9
@@ -22,17 +22,25 @@*/ /* FIXME tune these based on pool statistics ... */ -static const size_t pool_max[HCD_BUFFER_POOLS ] = { -/* platforms without dma-friendly caches might need to -* prevent cacheline sharing... -*/ -32 , -128 , -512 , -PAGE_SIZE /2 -/* bigger --> allocate pages */ +static size_t pool_max[HCD_BUFFER_POOLS ] = { +32 ,128 ,512 ,2048 , }; +void __init usb_init_pool_max (void ) +{ +/* +* The pool_max values must never be smaller than +* ARCH_KMALLOC_MINALIGN. +*/ +if (ARCH_KMALLOC_MINALIGN <=32 ) + ;/* Original value is okay */ +else if (ARCH_KMALLOC_MINALIGN <=64 ) + pool_max[0 ] =64 ; +else if (ARCH_KMALLOC_MINALIGN <=128 ) + pool_max[0 ] =0 ;/* Don't use this pool */ +else +BUILD_BUG ();/* We don't allow this */ +}/* SETUP primitives */
drivers/usb/core/hcd.c +8 -8
@@ -1617,6 +1617,7 @@ static int unlink1(struct usb_hcd *hcd, struct urb *urb, int status)int usb_hcd_unlink_urb (struct urb *urb,int status) {struct usb_hcd *hcd; +struct usb_device *udev = urb->dev;int retval = -EIDRM ;unsigned long flags;
@@ -1628,20 +1629,19 @@ int usb_hcd_unlink_urb (struct urb *urb, int status)spin_lock_irqsave (&hcd_urb_unlink_lock, flags);if (atomic_read (&urb->use_count) >0 ) { retval =0 ; -usb_get_dev (urb->dev); +usb_get_dev (udev); }spin_unlock_irqrestore (&hcd_urb_unlink_lock, flags);if (retval ==0 ) { hcd =bus_to_hcd (urb->dev->bus); retval =unlink1 (hcd, urb, status); -usb_put_dev (urb->dev); +if (retval ==0 ) + retval = -EINPROGRESS ; +else if (retval != -EIDRM && retval != -EBUSY ) +dev_dbg (&udev->dev,"hcd_unlink_urb %p fail %d\n" , + urb, retval); +usb_put_dev (udev); } - -if (retval ==0 ) - retval = -EINPROGRESS ; -else if (retval != -EIDRM && retval != -EBUSY ) -dev_dbg (&urb->dev->dev,"hcd_unlink_urb %p fail %d\n" , - urb, retval);return retval; }
drivers/usb/core/usb.c +1 -0
@@ -1050,6 +1050,7 @@ static int __init usb_init(void)pr_info ("%s: USB support disabled\n" , usbcore_name);return 0 ; } +usb_init_pool_max (); retval =usb_debugfs_init ();if (retval)
drivers/usb/serial/cp210x.c +1 -0
@@ -56,6 +56,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x0846, 0x1100) }, /* NetGear Managed Switch M4100 series, M5300 series, M7100 series */ { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */ { USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */ + { USB_DEVICE(0x0908, 0x01FF) }, /* Siemens RUGGEDCOM USB Serial Console */ { USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */ { USB_DEVICE(0x0BED, 0x1101) }, /* MEI series 2000 Combo Acceptor */ { USB_DEVICE(0x0FCF, 0x1003) }, /* Dynastream ANT development board */
drivers/xen/manage.c +7 -1
@@ -113,10 +113,16 @@ static void do_suspend(void) err =freeze_processes ();if (err) { -pr_err ("%s: freeze failed %d\n" , __func__, err); +pr_err ("%s: freeze processes failed %d\n" , __func__, err); goto out; } + err =freeze_kernel_threads (); +if (err) { +pr_err ("%s: freeze kernel threads failed %d\n" , __func__, err); + goto out_thaw; + } + err =dpm_suspend_start (PMSG_FREEZE );if (err) {pr_err ("%s: dpm_suspend_start %d\n" , __func__, err);
fs/binfmt_elf.c +3 -2
@@ -549,11 +549,12 @@ out:static unsigned long randomize_stack_top (unsigned long stack_top) { -unsigned int random_variable =0 ; +unsigned long random_variable =0 ;if ((current->flags &PF_RANDOMIZE ) && !(current->personality &ADDR_NO_RANDOMIZE )) { - random_variable =get_random_int () &STACK_RND_MASK ; + random_variable = (unsigned long )get_random_int (); + random_variable &=STACK_RND_MASK ; random_variable <<=PAGE_SHIFT ; }#ifdef CONFIG_STACK_GROWSUP
fs/btrfs/ctree.c +4 -13
@@ -2655,32 +2655,23 @@ static int key_search(struct extent_buffer *b, struct btrfs_key *key,return 0 ; } -int btrfs_find_item (struct btrfs_root *fs_root,struct btrfs_path *found_path, +int btrfs_find_item (struct btrfs_root *fs_root,struct btrfs_path *path,u64 iobjectid,u64 ioff,u8 key_type,struct btrfs_key *found_key) {int ret;struct btrfs_key key;struct extent_buffer *eb; -struct btrfs_path *path; + +ASSERT (path); key.type = key_type; key.objectid = iobjectid; key.offset = ioff; -if (found_path ==NULL ) { - path =btrfs_alloc_path (); -if (!path) -return -ENOMEM ; - }else - path = found_path; - ret =btrfs_search_slot (NULL , fs_root, &key, path,0 ,0 ); -if ((ret <0 ) || (found_key ==NULL )) { -if (path != found_path) -btrfs_free_path (path); +if ((ret <0 ) || (found_key ==NULL ))return ret; - } eb = path->nodes[0 ];if (ret && path->slots[0 ] >=btrfs_header_nritems (eb)) {
fs/btrfs/disk-io.c +9 -2
@@ -1560,6 +1560,7 @@ struct btrfs_root *btrfs_get_fs_root(struct btrfs_fs_info *fs_info, bool check_ref) {struct btrfs_root *root; +struct btrfs_path *path;int ret;if (location->objectid ==BTRFS_ROOT_TREE_OBJECTID )
@@ -1599,8 +1600,14 @@ again:if (ret) goto fail; - ret =btrfs_find_item (fs_info->tree_root,NULL ,BTRFS_ORPHAN_OBJECTID , + path =btrfs_alloc_path (); +if (!path) { + ret = -ENOMEM ; + goto fail; + } + ret =btrfs_find_item (fs_info->tree_root, path,BTRFS_ORPHAN_OBJECTID , location->objectid,BTRFS_ORPHAN_ITEM_KEY ,NULL ); +btrfs_free_path (path);if (ret <0 ) goto fail;if (ret ==0 )
@@ -2411,7 +2418,7 @@ int open_ctree(struct super_block *sb, features |=BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO ;if (features &BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA ) -printk (KERN_ERR "BTRFS: has skinny extents\n" ); +printk (KERN_INFO "BTRFS: has skinny extents\n" );/* * flag our filesystem as having big metadata blocks if
fs/btrfs/tree-log.c +10 -1
@@ -1238,10 +1238,19 @@ static int insert_orphan_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 offset) { int ret; - ret =btrfs_find_item (root,NULL ,BTRFS_ORPHAN_OBJECTID , +struct btrfs_path *path; + + path =btrfs_alloc_path (); +if (!path) +return -ENOMEM ; + + ret =btrfs_find_item (root, path,BTRFS_ORPHAN_OBJECTID , offset,BTRFS_ORPHAN_ITEM_KEY ,NULL );if (ret >0 ) ret =btrfs_insert_orphan_item (trans, root, offset); + +btrfs_free_path (path); +return ret; }
fs/jffs2/scan.c +5 -0
@@ -510,6 +510,10 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo sumlen = c->sector_size -je32_to_cpu (sm->offset); sumptr = buf + buf_size - sumlen; +/* sm->offset maybe wrong but MAGIC maybe right */ +if (sumlen > c->sector_size) + goto full_scan; +/* Now, make sure the summary itself is available */ if (sumlen > buf_size) {/* Need to kmalloc for this. */
@@ -544,6 +548,7 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo } } +full_scan: buf_ofs = jeb->offset;if (!buf_size) {
fs/nfs/callback.c +5 -3
@@ -128,22 +128,24 @@ nfs41_callback_svc(void *vrqstp)if (try_to_freeze ())continue ; -prepare_to_wait (&serv->sv_cb_waitq, &wq,TASK_INTERRUPTIBLE ); +prepare_to_wait (&serv->sv_cb_waitq, &wq,TASK_UNINTERRUPTIBLE );spin_lock_bh (&serv->sv_cb_lock);if (!list_empty (&serv->sv_cb_list)) { req =list_first_entry (&serv->sv_cb_list, struct rpc_rqst, rq_bc_list);list_del (&req->rq_bc_list);spin_unlock_bh (&serv->sv_cb_lock); +finish_wait (&serv->sv_cb_waitq, &wq);dprintk ("Invoking bc_svc_process()\n" ); error =bc_svc_process (serv, req, rqstp);dprintk ("bc_svc_process() returned w/ error code= %d\n" , error); }else {spin_unlock_bh (&serv->sv_cb_lock); -schedule (); +/* schedule_timeout to game the hung task watchdog */ +schedule_timeout (60 *HZ ); +finish_wait (&serv->sv_cb_waitq, &wq); } -finish_wait (&serv->sv_cb_waitq, &wq); }return 0 ; }
fs/nfs/callback_xdr.c +3 -1
@@ -464,8 +464,10 @@ static __be32 decode_cb_sequence_args(struct svc_rqst *rqstp,for (i =0 ; i < args->csa_nrclists; i++) { status =decode_rc_list (xdr, &args->csa_rclists[i]); -if (status) +if (status) { + args->csa_nrclists = i; goto out_free; + } } } status =0 ;
fs/xfs/xfs_buf_item.c +4 -0
@@ -319,6 +319,10 @@ xfs_buf_item_format(ASSERT (atomic_read (&bip->bli_refcount) >0 );ASSERT ((bip->bli_flags &XFS_BLI_LOGGED ) || (bip->bli_flags &XFS_BLI_STALE )); +ASSERT ((bip->bli_flags &XFS_BLI_STALE ) || + (xfs_blft_from_flags (&bip->__bli_format) >XFS_BLFT_UNKNOWN_BUF + &&xfs_blft_from_flags (&bip->__bli_format) <XFS_BLFT_MAX_BUF )); +/* * If it is an inode buffer, transfer the in-memory state to the
fs/xfs/xfs_inode.c +2 -0
@@ -1946,6 +1946,7 @@ xfs_iunlink( agi->agi_unlinked[bucket_index] =cpu_to_be32 (agino); offset = offsetof(xfs_agi_t , agi_unlinked) + (sizeof (xfs_agino_t) * bucket_index); +xfs_trans_buf_set_type (tp, agibp,XFS_BLFT_AGI_BUF );xfs_trans_log_buf (tp, agibp, offset, (offset +sizeof (xfs_agino_t) -1 ));return 0 ;
@@ -2037,6 +2038,7 @@ xfs_iunlink_remove( agi->agi_unlinked[bucket_index] =cpu_to_be32 (next_agino); offset = offsetof(xfs_agi_t , agi_unlinked) + (sizeof (xfs_agino_t) * bucket_index); +xfs_trans_buf_set_type (tp, agibp,XFS_BLFT_AGI_BUF );xfs_trans_log_buf (tp, agibp, offset, (offset +sizeof (xfs_agino_t) -1 )); }else {
fs/xfs/xfs_qm.c +5 -0
@@ -1108,6 +1108,11 @@ xfs_qm_reset_dqcounts(*/ xfs_dqcheck (mp, ddq, id+j, type,XFS_QMOPT_DQREPAIR ,"xfs_quotacheck" ); +/* +* Reset type in case we are reusing group quota file for +* project quotas or vice versa +*/ + ddq->d_flags = type; ddq->d_bcount =0 ; ddq->d_icount =0 ; ddq->d_rtbcount =0 ;
fs/xfs/xfs_trans.c +1 -0
@@ -474,6 +474,7 @@ xfs_trans_apply_sb_deltas( whole =1 ; } +xfs_trans_buf_set_type (tp, bp,XFS_BLFT_SB_BUF );if (whole)/* * Log the whole thing, the fields are noncontiguous.
include/linux/fsnotify.h +4 -2
@@ -101,8 +101,10 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, new_dir_mask |=FS_ISDIR ; } -fsnotify (old_dir, old_dir_mask, old_dir,FSNOTIFY_EVENT_INODE , old_name, fs_cookie); -fsnotify (new_dir, new_dir_mask, new_dir,FSNOTIFY_EVENT_INODE , new_name, fs_cookie); +fsnotify (old_dir, old_dir_mask, source,FSNOTIFY_EVENT_INODE , old_name, + fs_cookie); +fsnotify (new_dir, new_dir_mask, source,FSNOTIFY_EVENT_INODE , new_name, + fs_cookie);if (target)fsnotify_link_count (target);
include/linux/usb/hcd.h +1 -0
@@ -447,6 +447,7 @@ extern const struct dev_pm_ops usb_hcd_pci_pm_ops;#endif /* CONFIG_PCI */ /* pci-ish (pdev null is ok) buffer alloc/mapping support */ +void usb_init_pool_max (void );int hcd_buffer_create (struct usb_hcd *hcd);void hcd_buffer_destroy (struct usb_hcd *hcd);
kernel/debug/kdb/kdb_main.c +1 -1
@@ -2535,7 +2535,7 @@ static int kdb_summary(int argc, const char **argv)#define K (x) ((x) << (PAGE_SHIFT - 10))kdb_printf ("\nMemTotal: %8lu kB\nMemFree: %8lu kB\n" "Buffers: %8lu kB\n" , - val.totalram, val.freeram, val.bufferram); +K (val.totalram),K (val.freeram),K (val.bufferram));return 0 ; }
kernel/time/ntp.c +7 -3
@@ -631,10 +631,14 @@ int ntp_validate_timex(struct timex *txc)if ((txc->modes &ADJ_SETOFFSET ) && (!capable (CAP_SYS_TIME )))return -EPERM ; -if (txc->modes &ADJ_FREQUENCY ) { -if (LONG_MIN /PPM_SCALE > txc->freq) +/* +* Check for potential multiplication overflows that can +* only happen on 64-bit systems: +*/ +if ((txc->modes &ADJ_FREQUENCY ) && (BITS_PER_LONG ==64 )) { +if (LLONG_MIN /PPM_SCALE > txc->freq)return -EINVAL ; -if (LONG_MAX /PPM_SCALE < txc->freq) +if (LLONG_MAX /PPM_SCALE < txc->freq)return -EINVAL ; }
kernel/trace/trace.c +1 -1
@@ -4694,7 +4694,7 @@ tracing_mark_write(struct file *filp, const char __user *ubuf, *fpos += written; out_unlock: -for (i =0 ; i < nr_pages; i++){ +for (i = nr_pages -1 ; i >=0 ; i--) {kunmap_atomic (map_page[i]);put_page (pages[i]); }
mm/hugetlb.c +2 -0
@@ -3456,6 +3456,8 @@ follow_huge_pmd(struct mm_struct *mm, unsigned long address, {struct page *page; +if (!pmd_present (*pmd)) +return NULL ; page =pte_page (*(pte_t *)pmd);if (page) page += ((address & ~PMD_MASK ) >>PAGE_SHIFT );
net/ceph/osd_client.c +21 -9
@@ -977,12 +977,24 @@ static void put_osd(struct ceph_osd *osd)*/ static void __remove_osd (struct ceph_osd_client *osdc,struct ceph_osd *osd) { -dout ("__remove_osd %p\n" , osd); -BUG_ON (!list_empty (&osd->o_requests)); -rb_erase (&osd->o_node, &osdc->osds); +dout ("%s %p osd%d\n" , __func__, osd, osd->o_osd); +WARN_ON (!list_empty (&osd->o_requests)); +WARN_ON (!list_empty (&osd->o_linger_requests)); +list_del_init (&osd->o_osd_lru); -ceph_con_close (&osd->o_con); -put_osd (osd); +rb_erase (&osd->o_node, &osdc->osds); +RB_CLEAR_NODE (&osd->o_node); +} + +static void remove_osd (struct ceph_osd_client *osdc,struct ceph_osd *osd) +{ +dout ("%s %p osd%d\n" , __func__, osd, osd->o_osd); + +if (!RB_EMPTY_NODE (&osd->o_node)) { +ceph_con_close (&osd->o_con); +__remove_osd (osdc, osd); +put_osd (osd); + } }static void remove_all_osds (struct ceph_osd_client *osdc)
@@ -992,7 +1004,7 @@ static void remove_all_osds(struct ceph_osd_client *osdc)while (!RB_EMPTY_ROOT (&osdc->osds)) {struct ceph_osd *osd =rb_entry (rb_first (&osdc->osds), struct ceph_osd, o_node); -__remove_osd (osdc, osd); +remove_osd (osdc, osd); }mutex_unlock (&osdc->request_mutex); }
@@ -1022,7 +1034,7 @@ static void remove_old_osds(struct ceph_osd_client *osdc)list_for_each_entry_safe (osd, nosd, &osdc->osd_lru, o_osd_lru) {if (time_before (jiffies, osd->lru_ttl))break ; -__remove_osd (osdc, osd); +remove_osd (osdc, osd); }mutex_unlock (&osdc->request_mutex); }
@@ -1037,8 +1049,7 @@ static int __reset_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd)dout ("__reset_osd %p osd%d\n" , osd, osd->o_osd);if (list_empty (&osd->o_requests) &&list_empty (&osd->o_linger_requests)) { -__remove_osd (osdc, osd); - +remove_osd (osdc, osd);return -ENODEV ; }
@@ -1840,6 +1851,7 @@ static void reset_changed_osds(struct ceph_osd_client *osdc) {struct rb_node *p, *n; +dout ("%s %p\n" , __func__, osdc);for (p =rb_first (&osdc->osds); p; p = n) { struct ceph_osd *osd = rb_entry(p, struct ceph_osd, o_node);
sound/pci/riptide/riptide.c +19 -8
@@ -2032,32 +2032,43 @@ snd_riptide_joystick_probe(struct pci_dev *pci, const struct pci_device_id *id) {static int dev;struct gameport *gameport; +int ret;if (dev >=SNDRV_CARDS )return -ENODEV ; +if (!enable[dev]) { - dev++; -return -ENOENT ; + ret = -ENOENT ; + goto inc_dev; } -if (!joystick_port[dev++]) -return 0 ; +if (!joystick_port[dev]) { + ret =0 ; + goto inc_dev; + } gameport =gameport_allocate_port (); -if (!gameport) -return -ENOMEM ; +if (!gameport) { + ret = -ENOMEM ; + goto inc_dev; + }if (!request_region (joystick_port[dev],8 ,"Riptide gameport" )) {snd_printk (KERN_WARNING "Riptide: cannot grab gameport 0x%x\n" , joystick_port[dev]);gameport_free_port (gameport); -return -EBUSY ; + ret = -EBUSY ; + goto inc_dev; } gameport->io = joystick_port[dev];gameport_register_port (gameport);pci_set_drvdata (pci, gameport); -return 0 ; + + ret =0 ; +inc_dev: + dev++; +return ret; }static void snd_riptide_joystick_remove (struct pci_dev *pci)
sound/pci/rme9652/hdspm.c +6 -0
@@ -6102,6 +6102,9 @@ static int snd_hdspm_playback_open(struct snd_pcm_substream *substream)snd_pcm_hw_constraint_minmax (runtime,SNDRV_PCM_HW_PARAM_PERIOD_SIZE ,64 ,8192 ); +snd_pcm_hw_constraint_minmax (runtime, +SNDRV_PCM_HW_PARAM_PERIODS , +2 ,2 );break ; }
@@ -6176,6 +6179,9 @@ static int snd_hdspm_capture_open(struct snd_pcm_substream *substream)snd_pcm_hw_constraint_minmax (runtime,SNDRV_PCM_HW_PARAM_PERIOD_SIZE ,64 ,8192 ); +snd_pcm_hw_constraint_minmax (runtime, +SNDRV_PCM_HW_PARAM_PERIODS , +2 ,2 );break ; }