Linux 3.10.71
Greg KH
maintainerI'm announcing the release of the 3.10.71 kernel.
All users of the 3.10 kernel series must upgrade.
The updated 3.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.10.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arc/include/asm/pgtable.h | 3 - 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/mmap.c | 6 +- block/blk-throttle.c | 3 + block/cfq-iosched.c | 16 ++++- drivers/bluetooth/ath3k.c | 8 ++ 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/speedstep-lib.c | 3 + drivers/cpufreq/speedstep-smi.c | 12 ++++ drivers/gpio/gpio-tps65912.c | 14 +++-- 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/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/target/iscsi/iscsi_target_tq.c | 28 +--------- drivers/tty/pty.c | 3 + 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 fs/binfmt_elf.c | 5 + 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_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 net/ceph/osd_client.c | 30 +++++++---- sound/pci/riptide/riptide.c | 27 +++++++-- sound/pci/rme9652/hdspm.c | 6 ++ 56 files changed, 331 insertions(+), 141 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
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
Dan Carpenter (1):
ALSA: off by one bug in snd_riptide_joystick_probe()
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
Dmitry Eremin-Solenikov (3):
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
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.10.71
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: 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
MIPS: Export FP functions used by lose_fpu(1) for KVM
Jan Kara (1):
fsnotify: fix handling of renames in audit
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
Konstantin Khlebnikov (1):
cfq-iosched: handle failure of cfq group allocation
Krzysztof Kozlowski (1):
power_supply: 88pm860x: Fix leaked power supply on probe fail
Lennart Sorensen (1):
USB: cp210x: add ID for RUGGEDCOM USB Serial Console
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
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
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
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
honclo (1):
Added Little Endian support to vtpm module
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 10 -SUBLEVEL = 70 +SUBLEVEL = 71 EXTRAVERSION = NAME = TOSSUG Baby Fish
arch/arc/include/asm/pgtable.h +2 -1
@@ -270,7 +270,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/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
@@ -891,6 +891,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>
@@ -452,6 +453,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
@@ -179,8 +179,7 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, 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);
@@ -209,7 +208,7 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, 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
@@ -431,7 +431,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>
@@ -413,11 +414,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);
@@ -1017,9 +1020,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
@@ -155,7 +155,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
@@ -1182,21 +1182,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/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
@@ -942,6 +942,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
@@ -3575,6 +3575,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);/*
@@ -3611,7 +3616,7 @@ retry: }else cfqq = &cfqd->oom_cfqq; } - +out:if (new_cfqq)kmem_cache_free (cfq_pool, new_cfqq);
@@ -3641,12 +3646,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
@@ -151,6 +151,8 @@ static 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)
@@ -181,6 +183,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);
@@ -277,6 +282,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_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);
@@ -511,11 +523,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) {
@@ -536,11 +548,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/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
@@ -188,6 +188,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 );
@@ -198,9 +199,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__(
@@ -217,6 +228,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/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/hid/i2c-hid/i2c-hid.c +4 -1
@@ -341,7 +341,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
@@ -557,7 +557,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)
@@ -566,7 +566,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
@@ -2853,7 +2853,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/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
@@ -360,9 +360,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);
@@ -544,7 +541,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;/* * Update power state on the new interface. Admittedly, based on
drivers/net/wireless/iwlwifi/mvm/tx.c +5 -0
@@ -832,6 +832,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
@@ -720,7 +720,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
@@ -1267,7 +1267,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/target/iscsi/iscsi_target_tq.c +5 -23
@@ -26,36 +26,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;
@@ -68,7 +54,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);
@@ -219,8 +205,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;
@@ -423,7 +407,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 ();
@@ -476,7 +459,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
@@ -215,6 +215,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/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
@@ -1593,6 +1593,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;
@@ -1604,20 +1605,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
@@ -1003,6 +1003,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 */
fs/binfmt_elf.c +3 -2
@@ -552,11 +552,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/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
@@ -296,6 +296,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
@@ -1655,6 +1655,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 ;
@@ -1746,6 +1747,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_trans.c +1 -0
@@ -1100,6 +1100,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
@@ -416,6 +416,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
@@ -2532,7 +2532,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
@@ -4588,7 +4588,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]); }
net/ceph/osd_client.c +21 -9
@@ -967,12 +967,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)
@@ -982,7 +994,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); }
@@ -1012,7 +1024,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); }
@@ -1027,8 +1039,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 ; }
@@ -1610,6 +1621,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
@@ -5789,6 +5789,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 ; }
@@ -5863,6 +5866,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 ; }