Linux 3.4.44
Greg KH
maintainerI'm announcing the release of the 3.4.44 kernel.
All users of the 3.4 kernel series must upgrade.
The updated 3.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.4.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/configs/at91sam9g45_defconfig | 1 arch/arm/include/asm/pgtable.h | 9 +++ arch/arm/mach-at91/setup.c | 2 arch/avr32/configs/favr-32_defconfig | 1 arch/avr32/configs/merisc_defconfig | 1 arch/ia64/include/asm/futex.h | 5 - arch/ia64/include/asm/mca.h | 1 arch/ia64/kernel/irq.c | 8 ++ arch/ia64/kernel/mca.c | 37 ++++++++---- arch/ia64/kvm/vtlb.c | 2 arch/powerpc/kernel/head_64.S | 1 arch/powerpc/platforms/cell/spufs/inode.c | 1 arch/x86/kernel/irq.c | 4 - arch/x86/kvm/emulate.c | 4 + arch/x86/xen/enlighten.c | 5 + arch/x86/xen/time.c | 6 +- drivers/acpi/pci_root.c | 4 - drivers/i2c/busses/i2c-xiic.c | 6 -- drivers/md/md.c | 9 +-- drivers/mfd/adp5520.c | 8 ++ drivers/mmc/core/mmc.c | 2 drivers/mmc/host/Kconfig | 10 --- drivers/mmc/host/atmel-mci.c | 16 +++-- drivers/net/ethernet/freescale/gianfar_ptp.c | 3 - drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 10 +++ drivers/net/wireless/mwifiex/pcie.c | 4 - drivers/pci/pci.c | 12 +--- drivers/rtc/rtc-cmos.c | 4 - drivers/s390/char/sclp_cmd.c | 4 + drivers/tty/pty.c | 3 + drivers/tty/serial/serial_core.c | 4 + drivers/tty/tty_io.c | 4 - drivers/usb/core/devio.c | 2 drivers/usb/misc/appledisplay.c | 1 drivers/usb/serial/ftdi_sio.c | 5 + drivers/usb/serial/ftdi_sio_ids.h | 4 + drivers/usb/serial/option.c | 8 ++ drivers/usb/storage/cypress_atacb.c | 16 ++++- drivers/video/console/fbcon.c | 2 fs/dcache.c | 4 + fs/exec.c | 4 - fs/ext4/Kconfig | 3 - fs/ext4/ext4_jbd2.h | 6 +- fs/ext4/mballoc.c | 8 +- fs/ext4/resize.c | 2 fs/ext4/super.c | 7 +- fs/fscache/stats.c | 2 fs/jbd2/commit.c | 50 +++++++++-------- fs/lockd/clntlock.c | 3 + fs/lockd/clntproc.c | 3 - fs/nfs/nfs4proc.c | 6 ++ fs/nfsd/nfs4state.c | 8 -- fs/nfsd/nfs4xdr.c | 19 +----- fs/sysfs/dir.c | 15 +++-- include/asm-generic/pgtable.h | 10 +++ include/linux/ipc_namespace.h | 2 include/linux/jbd2.h | 1 ipc/shm.c | 2 kernel/cgroup.c | 2 kernel/hrtimer.c | 6 ++ kernel/time/tick-broadcast.c | 4 + kernel/time/tick-common.c | 1 kernel/trace/ftrace.c | 5 + kernel/trace/trace.c | 2 kernel/trace/trace_stack.c | 76 +++++++++++++++++++++++--- kernel/trace/trace_stat.c | 2 mm/mmap.c | 4 - net/wireless/reg.c | 2 sound/soc/codecs/max98088.c | 2 sound/usb/card.c | 4 + sound/usb/midi.c | 13 ---- sound/usb/stream.c | 8 ++ 73 files changed, 347 insertions(+), 170 deletions(-)
Adrian Thomasset (1):
USB: ftdi_sio: correct ST Micro Connect Lite PIDs
Anurup m (1):
fs/fscache/stats.c: fix memory leak
Ben Jencks (1):
usb/misc/appledisplay: Add 24" LED Cinema display
Bjørn Mork (1):
USB: option: add a D-Link DWM-156 variant
Bryan Schumaker (1):
nfsd: Decode and send 64bit time values
Catalin Marinas (1):
arm: set the page table freeing ceiling to TASK_SIZE
Clemens Ladisch (1):
ALSA: usb-audio: disable autopm for MIDI devices
Daniel Mack (1):
ALSA: snd-usb: try harder to find USB_DT_CS_ENDPOINT
David Engraf (1):
hrtimer: Fix ktime_add_ns() overflow on 32bit architectures
Derek Basehore (1):
drivers/rtc/rtc-cmos.c: don't disable hpet emulation on suspend
Dmitry Monakhov (2):
jbd2: fix race between jbd2_journal_remove_checkpoint and ->j_commit_callback
ext4: fix journal callback list traversal
Dylan Reid (1):
ASoC: max98088: Fix logging of hardware revision.
Federico Vaga (1):
serial_core.c: add put_device() after device_find_child()
Filippo Turato (1):
USB: serial: option: Added support Olivetti Olicard 145
Gleb Natapov (1):
KVM: X86 emulator: fix source operand decoding for 8bit mov[zs]x instructions
Greg Kroah-Hartman (1):
Linux 3.4.44
Greg Thelen (1):
fs/dcache.c: add cond_resched() to shrink_dcache_parent()
Hans de Goede (1):
usbfs: Always allow ctrl requests with USB_RECIP_ENDPOINT on the ctrl ep
Heiko Carstens (1):
s390/memory hotplug: prevent offline of active memory increments
Hugh Dickins (1):
mm: allow arch code to control the user page table ceiling
J. Bruce Fields (1):
nfsd4: don't close read-write opens too soon
Jacob Keller (1):
ixgbe: fix EICR write in ixgbe_msix_other
Johan Hovold (1):
mmc: at91/avr32/atmel-mci: fix DMA-channel leak on module unload
Johannes Berg (1):
wireless: regulatory: fix channel disabling race condition
Konrad Rzeszutek Wilk (1):
xen/time: Fix kasprintf splat when allocating timer%d IRQ line.
Lars-Peter Clausen (1):
mfd: adp5520: Restore mode bits on resume
Li Fei (1):
x86: Eliminate irq_mis_count counted in arch_irq_stat
Li Zefan (1):
cgroup: fix an off-by-one bug which may trigger BUG_ON()
Linus Torvalds (1):
tty: fix up atime/mtime mess, take three
Maxime Ripard (1):
ARM: at91: Fix typo in restart code panic message
Michael Ellerman (1):
powerpc/spufs: Initialise inode->i_ino in spufs_new_inode()
Michael Neuling (1):
powerpc: Add isync to copy_and_flush
Mika Kuoppala (1):
fbcon: when font is freed, clear also vc_font.data
Ming Lei (1):
sysfs: fix use after free in case of concurrent read/write and readdir
Namhyung Kim (3):
tracing: Fix off-by-one on allocating stat->pages
tracing: Check return value of tracing_init_dentry()
tracing: Reset ftrace_graph_filter_enabled if count is zero
NeilBrown (1):
md: bad block list should default to disabled.
Philip Rakity (1):
mmc: core: Fix bit width test failing on old eMMC cards
Prarit Bhargava (1):
hrtimer: Add expiry time overflow check in hrtimer_interrupt
Rafael J. Wysocki (1):
PCI/PM: Fix fallback to PCI_D0 in pci_platform_power_transition()
Richard Cochran (1):
gianfar: do not advertise any alarm capability.
Robin Holt (1):
ipc: sysv shared memory limited to 8TiB
Stefani Seibold (1):
USB: add ftdi_sio USB ID for GDM Boost V1.x
Stephan Schreiber (2):
Wrong asm register contraints in the futex implementation Wrong asm register contraints in the kvm implementation
Steven A. Falco (1):
i2c: xiic: must always write 16-bit words to TX_FIFO
Steven Rostedt (Red Hat) (3):
tracing: Use stack of calling function for stack tracer
tracing: Fix stack tracer with fentry use
tracing: Remove most or all of stack tracer stack size from stack_max_size
Takashi Iwai (1):
ALSA: usb-audio: Fix autopm error during probing
Terry Barnaby (1):
mmc: atmel-mci: pio hang on block errors
Theodore Ts'o (2):
ext4: fix online resizing for ext3-compat file systems
ext4: fix Kconfig documentation for CONFIG_EXT4_DEBUG
Thomas Gleixner (1):
clockevents: Set dummy handler on CPU_DEAD shutdown
Tony Luck (1):
Fix initialization of CMCI/CMCP interrupts
Tormod Volden (1):
usb-storage: CY7C68300A chips do not support Cypress ATACB
Trond Myklebust (2):
LOCKD: Ensure that nlmclnt_block resets block->b_status after a server reboot
NFSv4: Handle NFS4ERR_DELAY and NFS4ERR_GRACE in nfs4_open_delegation_recall
Yinghai Lu (1):
PCI / ACPI: Don't query OSC support with all possible controls
Yogesh Ashok Powar (2):
mwifiex: Use pci_release_region() instead of a pci_release_regions()
mwifiex: Call pci_release_region after calling pci_disable_device
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 4 -SUBLEVEL = 43 +SUBLEVEL = 44 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/arm/configs/at91sam9g45_defconfig +0 -1
@@ -173,7 +173,6 @@ CONFIG_MMC=y # CONFIG_MMC_BLOCK_BOUNCE is not set CONFIG_SDIO_UART=m CONFIG_MMC_ATMELMCI=y -CONFIG_MMC_ATMELMCI_DMA=y CONFIG_LEDS_ATMEL_PWM=y CONFIG_LEDS_GPIO=y CONFIG_LEDS_TRIGGER_TIMER=y
arch/arm/include/asm/pgtable.h +9 -0
@@ -61,6 +61,15 @@ extern void __pgd_error(const char *file, int line, pgd_t);#define FIRST_USER_ADDRESS PAGE_SIZE/* +* Use TASK_SIZE as the ceiling argument for free_pgtables() and +* free_pgd_range() to avoid freeing the modules pmd when LPAE is enabled (pmd +* page shared between user and kernel). +*/ +#ifdef CONFIG_ARM_LPAE +#define USER_PGTABLES_CEILING TASK_SIZE +#endif + +/* * The pgprot_* and protection_map entries will be fixed up in runtime * to include the cachable and bufferable bits based on memory policy, * as well as any architecture dependent bits like global/ASID and SMP
arch/arm/mach-at91/setup.c +1 -1
@@ -326,7 +326,7 @@ static void at91_dt_rstc(void) of_id =of_match_node (rstc_ids, np);if (!of_id) -panic ("AT91: rtsc no restart function availlable\n" ); +panic ("AT91: rtsc no restart function available\n" ); arm_pm_restart = of_id->data;
arch/avr32/configs/favr-32_defconfig +0 -1
@@ -122,7 +122,6 @@ CONFIG_USB_G_SERIAL=m CONFIG_USB_CDC_COMPOSITE=m CONFIG_MMC=y CONFIG_MMC_ATMELMCI=y -CONFIG_MMC_ATMELMCI_DMA=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_ATMEL_PWM=m
arch/avr32/configs/merisc_defconfig +0 -1
@@ -102,7 +102,6 @@ CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_LOGO=y CONFIG_MMC=y CONFIG_MMC_ATMELMCI=y -CONFIG_MMC_ATMELMCI_DMA=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_ATMEL_PWM=y
arch/ia64/include/asm/futex.h +2 -3
@@ -106,16 +106,15 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,return -EFAULT ; { - registerunsigned long r8 __asm ("r8" ); + register unsigned long r8 __asm ("r8") = 0;unsigned long prev; __asm__ __volatile__(" mf;; \n" -" mov %0=r0 \n" " mov ar.ccv=%4;; \n" "[1:] cmpxchg4.acq %1=[%2],%3,ar.ccv \n" " .xdata4 \"__ex_table\", 1b-., 2f-. \n" "[2:]" - :"=r" (r8),"=r" (prev) + :"+r" (r8),"=&r" (prev) :"r" (uaddr),"r" (newval),"rO" ((long ) (unsigned ) oldval) :"memory" );
arch/ia64/include/asm/mca.h +1 -0
@@ -143,6 +143,7 @@ extern unsigned long __per_cpu_mca[NR_CPUS];extern int cpe_vector;extern int ia64_cpe_irq;extern void ia64_mca_init (void ); +extern void ia64_mca_irq_init (void );extern void ia64_mca_cpu_init (void *);extern void ia64_os_mca_dispatch (void );extern void ia64_os_mca_dispatch_end (void );
arch/ia64/kernel/irq.c +8 -0
@@ -23,6 +23,8 @@#include <linux/interrupt.h> #include <linux/kernel_stat.h> +#include <asm/mca.h> +/* * 'what should we do if we get a hw irq event on an illegal vector'. * each architecture has to answer this themselves.
@@ -83,6 +85,12 @@ bool is_affinity_mask_valid(const struct cpumask *cpumask)#endif /* CONFIG_SMP */ +int __init arch_early_irq_init (void ) +{ +ia64_mca_irq_init (); +return 0 ; +} +#ifdef CONFIG_HOTPLUG_CPU unsigned int vectors_in_migration[NR_IRQS ];
arch/ia64/kernel/mca.c +24 -13
@@ -2074,22 +2074,16 @@ ia64_mca_init(void)printk (KERN_INFO "MCA related initialization done\n" ); } +/* -* ia64_mca_late_init -* -* Opportunity to setup things that require initialization later -* than ia64_mca_init. Setup a timer to poll for CPEs if the -* platform doesn't support an interrupt driven mechanism. -* -* Inputs : None -* Outputs : Status +* These pieces cannot be done in ia64_mca_init() because it is called before +* early_irq_init() which would wipe out our percpu irq registrations. But we +* cannot leave them until ia64_mca_late_init() because by then all the other +* processors have been brought online and have set their own CMC vectors to +* point at a non-existant action. Called from arch_early_irq_init(). */ -static int __init -ia64_mca_late_init (void ) +void __init ia64_mca_irq_init (void ) { -if (!mca_init) -return 0 ; -/* * Configure the CMCI/P vector and handler. Interrupts for CMC are * per-processor, so AP CMC interrupts are setup in smp_callin() (smpboot.c).
@@ -2108,6 +2102,23 @@ ia64_mca_late_init(void)/* Setup the CPEI/P handler */ register_percpu_irq (IA64_CPEP_VECTOR , &mca_cpep_irqaction);#endif +} + +/* +* ia64_mca_late_init +* +* Opportunity to setup things that require initialization later +* than ia64_mca_init. Setup a timer to poll for CPEs if the +* platform doesn't support an interrupt driven mechanism. +* +* Inputs : None +* Outputs : Status +*/ +static int __init +ia64_mca_late_init (void ) +{ +if (!mca_init) +return 0 ;register_hotcpu_notifier (&mca_cpu_notifier);
arch/ia64/kvm/vtlb.c +1 -1
@@ -256,7 +256,7 @@ u64 guest_vhpt_lookup(u64 iha, u64 *pte)"srlz.d;;" "ssm psr.i;;" "srlz.d;;" - : "=r"(ret) : "r"(iha), "r"(pte):"memory"); + : "=&r"(ret) : "r"(iha), "r"(pte) : "memory"); return ret; }
arch/powerpc/kernel/head_64.S +1 -0
@@ -489,6 +489,7 @@ _GLOBAL(copy_and_flush) sync addi r5,r5,8 addi r6,r6,8 + isync blr .align 8
arch/powerpc/platforms/cell/spufs/inode.c +1 -0
@@ -99,6 +99,7 @@ spufs_new_inode(struct super_block *sb, umode_t mode)if (!inode) goto out; + inode->i_ino =get_next_ino (); inode->i_mode = mode; inode->i_uid =current_fsuid (); inode->i_gid =current_fsgid ();
arch/x86/kernel/irq.c +0 -4
@@ -165,10 +165,6 @@ u64 arch_irq_stat_cpu(unsigned int cpu)u64 arch_irq_stat (void ) {u64 sum =atomic_read (&irq_err_count); - -#ifdef CONFIG_X86_IO_APIC - sum +=atomic_read (&irq_mis_count); -#endif return sum; }
arch/x86/kvm/emulate.c +4 -0
@@ -3737,6 +3737,10 @@ static int decode_operand(struct x86_emulate_ctxt *ctxt, struct operand *op,break ;case OpMem8: ctxt->memop.bytes =1 ; +if (ctxt->memop.type ==OP_REG ) { + ctxt->memop.addr.reg =decode_register (ctxt, ctxt->modrm_rm,1 ); +fetch_register_operand (&ctxt->memop); + } goto mem_common;case OpMem16: ctxt->memop.bytes =2 ;
arch/x86/xen/enlighten.c +4 -1
@@ -1515,8 +1515,11 @@ static int __cpuinit xen_hvm_cpu_notify(struct notifier_block *self,switch (action) {case CPU_UP_PREPARE :xen_vcpu_setup (cpu); -if (xen_have_vector_callback) +if (xen_have_vector_callback) {xen_init_lock_cpu (cpu); +if (xen_feature (XENFEAT_hvm_safe_pvclock)) +xen_setup_timer (cpu); + }break ;default :break ;
arch/x86/xen/time.c +5 -1
@@ -497,7 +497,11 @@ static void xen_hvm_setup_cpu_clockevents(void) {int cpu =smp_processor_id ();xen_setup_runstate_info (cpu); -xen_setup_timer (cpu); +/* +* xen_setup_timer(cpu) - snprintf is bad in atomic context. Hence +* doing it xen_hvm_cpu_notify (which gets called by smp_init during +* early bootup and also during CPU hotplug events). +*/ xen_setup_cpu_clockevents (); }
drivers/acpi/pci_root.c +2 -2
@@ -247,8 +247,8 @@ static acpi_status acpi_pci_query_osc(struct acpi_pci_root *root, *control &=OSC_PCI_CONTROL_MASKS ; capbuf[OSC_CONTROL_TYPE ] = *control | root->osc_control_set; }else { -/* Run _OSC query for all possible controls. */ - capbuf[OSC_CONTROL_TYPE ] =OSC_PCI_CONTROL_MASKS ; +/* Run _OSC query only with existing controls. */ + capbuf[OSC_CONTROL_TYPE ] = root->osc_control_set; } status =acpi_pci_run_osc (root->device->handle, capbuf, &result);
drivers/i2c/busses/i2c-xiic.c +2 -4
@@ -311,10 +311,8 @@ static void xiic_fill_tx_fifo(struct xiic_i2c *i2c)/* last message in transfer -> STOP */ data |=XIIC_TX_DYN_STOP_MASK ;dev_dbg (i2c->adap.dev.parent,"%s TX STOP\n" , __func__); - -xiic_setreg16 (i2c,XIIC_DTR_REG_OFFSET , data); - }else -xiic_setreg8 (i2c,XIIC_DTR_REG_OFFSET , data); + } +xiic_setreg16 (i2c,XIIC_DTR_REG_OFFSET , data); } }
drivers/md/md.c +3 -6
@@ -1587,8 +1587,8 @@ static int super_1_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor_ sector, count, 1) == 0)return -EINVAL ; } - }else if (sb->bblog_offset ==0 ) - rdev->badblocks.shift =-1 ; + }else if (sb->bblog_offset !=0 ) + rdev->badblocks.shift =0 ;if (!refdev) { ret =1 ;
@@ -3107,7 +3107,7 @@ int md_rdev_init(struct md_rdev *rdev)* be used - I wonder if that matters */ rdev->badblocks.count =0 ; - rdev->badblocks.shift =0 ; + rdev->badblocks.shift =-1 ;/* disabled until explicitly enabled */ rdev->badblocks.page =kmalloc (PAGE_SIZE ,GFP_KERNEL );seqlock_init (&rdev->badblocks.lock);if (rdev->badblocks.page ==NULL )
@@ -3179,9 +3179,6 @@ static struct md_rdev *md_import_device(dev_t newdev, int super_format, int supe goto abort_free; } } -if (super_format ==-1 ) -/* hot-add for 0.90, or non-persistent: so no badblocks */ - rdev->badblocks.shift =-1 ;return rdev;
drivers/mfd/adp5520.c +6 -2
@@ -36,6 +36,7 @@ struct adp5520_chip {struct blocking_notifier_head notifier_list;int irq;unsigned long id; +uint8_t mode; }; static int __adp5520_read(struct i2c_client *client,
@@ -326,7 +327,10 @@ static int adp5520_suspend(struct device *dev)struct i2c_client *client =to_i2c_client (dev);struct adp5520_chip *chip =dev_get_drvdata (&client->dev); -adp5520_clr_bits (chip->dev,ADP5520_MODE_STATUS , ADP5520_nSTNBY); +adp5520_read (chip->dev,ADP5520_MODE_STATUS , &chip->mode); +/* All other bits are W1C */ + chip->mode &=ADP5520_BL_EN |ADP5520_DIM_EN | ADP5520_nSTNBY; +adp5520_write (chip->dev,ADP5520_MODE_STATUS ,0 );return 0 ; }
@@ -335,7 +339,7 @@ static int adp5520_resume(struct device *dev)struct i2c_client *client =to_i2c_client (dev);struct adp5520_chip *chip =dev_get_drvdata (&client->dev); -adp5520_set_bits (chip->dev,ADP5520_MODE_STATUS , ADP5520_nSTNBY); +adp5520_write (chip->dev,ADP5520_MODE_STATUS , chip->mode); return 0; }#endif
drivers/mmc/core/mmc.c +1 -1
@@ -385,13 +385,13 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd) ext_csd[EXT_CSD_SEC_FEATURE_SUPPORT ]; card->ext_csd.raw_trim_mult = ext_csd[EXT_CSD_TRIM_MULT ]; + card->ext_csd.raw_partition_support = ext_csd[EXT_CSD_PARTITION_SUPPORT ];if (card->ext_csd.rev >=4 ) {/* * Enhanced area feature support -- check whether the eMMC * card has the Enhanced area enabled. If so, export enhanced * area offset and size to user by adding sysfs interface. */ - card->ext_csd.raw_partition_support = ext_csd[EXT_CSD_PARTITION_SUPPORT ];if ((ext_csd[EXT_CSD_PARTITION_SUPPORT ] &0x2 ) && (ext_csd[EXT_CSD_PARTITION_ATTRIBUTE ] &0x1 )) { hc_erase_grp_sz =
drivers/mmc/host/Kconfig +0 -10
@@ -297,16 +297,6 @@ config MMC_ATMELMCI endchoice -config MMC_ATMELMCI_DMA - bool "Atmel MCI DMA support" - depends on MMC_ATMELMCI && (AVR32 || ARCH_AT91SAM9G45) && DMA_ENGINE - help - Say Y here to have the Atmel MCI driver use a DMA engine to - do data transfers and thus increase the throughput and - reduce the CPU utilization. - - If unsure, say N. - config MMC_IMX tristate "Motorola i.MX Multimedia Card Interface support" depends on ARCH_MX1
drivers/mmc/host/atmel-mci.c +10 -6
@@ -165,6 +165,7 @@ struct atmel_mci {void __iomem *regs;struct scatterlist *sg; +unsigned int sg_len;unsigned int pio_offset;struct atmel_mci_slot *cur_slot;
@@ -754,6 +755,7 @@ static u32 atmci_prepare_data(struct atmel_mci *host, struct mmc_data *data) data->error = -EINPROGRESS ; host->sg = data->sg; + host->sg_len = data->sg_len; host->data = data; host->data_chan =NULL ;
@@ -1592,7 +1594,8 @@ static void atmci_read_data_pio(struct atmel_mci *host)if (offset == sg->length) {flush_dcache_page (sg_page (sg)); host->sg = sg =sg_next (sg); -if (!sg) + host->sg_len--; +if (!sg || !host->sg_len) goto done; offset =0 ;
@@ -1605,7 +1608,8 @@ static void atmci_read_data_pio(struct atmel_mci *host)flush_dcache_page (sg_page (sg)); host->sg = sg =sg_next (sg); -if (!sg) + host->sg_len--; +if (!sg || !host->sg_len) goto done; offset =4 - remaining;
@@ -1659,7 +1663,8 @@ static void atmci_write_data_pio(struct atmel_mci *host) nbytes +=4 ;if (offset == sg->length) { host->sg = sg =sg_next (sg); -if (!sg) + host->sg_len--; +if (!sg || !host->sg_len) goto done; offset =0 ;
@@ -1673,7 +1678,8 @@ static void atmci_write_data_pio(struct atmel_mci *host) nbytes += remaining; host->sg = sg =sg_next (sg); -if (!sg) { + host->sg_len--; +if (!sg || !host->sg_len) {atmci_writel (host,ATMCI_TDR , value); goto done; }
@@ -2190,10 +2196,8 @@ static int __exit atmci_remove(struct platform_device *pdev)atmci_readl (host,ATMCI_SR );clk_disable (host->mck); -#ifdef CONFIG_MMC_ATMELMCI_DMA if (host->dma.chan)dma_release_channel (host->dma.chan); -#endif free_irq (platform_get_irq (pdev,0 ), host);iounmap (host->regs);
drivers/net/ethernet/freescale/gianfar_ptp.c +1 -2
@@ -127,7 +127,6 @@ struct gianfar_ptp_registers {#define DRIVER "gianfar_ptp"#define DEFAULT_CKSEL 1 -#define N_ALARM 1/* first alarm is used internally to reset fipers */ #define N_EXT_TS 2#define REG_SIZE sizeof(struct gianfar_ptp_registers)
@@ -410,7 +409,7 @@ static struct ptp_clock_info ptp_gianfar_caps = { .owner = THIS_MODULE, .name = "gianfar clock", .max_adj = 512000, - .n_alarm = N_ALARM, + .n_alarm = 0, .n_ext_ts = N_EXT_TS, .n_per_out = 0, .pps = 1,
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +10 -0
@@ -2263,6 +2263,16 @@ static irqreturn_t ixgbe_msix_other(int irq, void *data)* with the write to EICR. */ eicr =IXGBE_READ_REG (hw,IXGBE_EICS ); + +/* The lower 16bits of the EICR register are for the queue interrupts +* which should be masked here in order to not accidently clear them if +* the bits are high when ixgbe_msix_other is called. There is a race +* condition otherwise which results in possible performance loss +* especially if the ixgbe_msix_other interrupt is triggering +* consistently (as it would when PPS is turned on for the X540 device) +*/ + eicr &=0xFFFF0000 ; +IXGBE_WRITE_REG (hw,IXGBE_EICR , eicr);if (eicr &IXGBE_EICR_LSC )
drivers/net/wireless/mwifiex/pcie.c +2 -2
@@ -1828,9 +1828,9 @@ static void mwifiex_pcie_cleanup(struct mwifiex_adapter *adapter)if (pdev) {pci_iounmap (pdev, card->pci_mmap);pci_iounmap (pdev, card->pci_mmap1); - -pci_release_regions (pdev);pci_disable_device (pdev); +pci_release_region (pdev,2 ); +pci_release_region (pdev,0 );pci_set_drvdata (pdev,NULL ); } }
drivers/pci/pci.c +4 -8
@@ -673,15 +673,11 @@ static int pci_platform_power_transition(struct pci_dev *dev, pci_power_t state) error =platform_pci_set_power_state (dev, state);if (!error)pci_update_current_state (dev, state); -/* Fall back to PCI_D0 if native PM is not supported */ -if (!dev->pm_cap) - dev->current_state =PCI_D0 ; - }else { + }else error = -ENODEV ; -/* Fall back to PCI_D0 if native PM is not supported */ -if (!dev->pm_cap) - dev->current_state =PCI_D0 ; - } + +if (error && !dev->pm_cap)/* Fall back to PCI_D0 */ + dev->current_state =PCI_D0 ;return error; }
drivers/rtc/rtc-cmos.c +2 -2
@@ -805,9 +805,8 @@ static int cmos_suspend(struct device *dev) mask =RTC_IRQMASK ; tmp &= ~mask;CMOS_WRITE (tmp,RTC_CONTROL ); +hpet_mask_rtc_irq_bit (mask); -/* shut down hpet emulation - we don't need it for alarm */ -hpet_mask_rtc_irq_bit (RTC_PIE |RTC_AIE |RTC_UIE );cmos_checkintr (cmos, tmp); }spin_unlock_irq (&rtc_lock);
@@ -872,6 +871,7 @@ static int cmos_resume(struct device *dev)rtc_update_irq (cmos->rtc,1 , mask); tmp &= ~RTC_AIE ;hpet_mask_rtc_irq_bit (RTC_AIE ); +hpet_rtc_timer_init (); }while (mask &RTC_AIE );spin_unlock_irq (&rtc_lock); }
drivers/s390/char/sclp_cmd.c +3 -1
@@ -509,6 +509,8 @@ static void __init sclp_add_standby_memory(void)add_memory_merged (0 ); } +#define MEM_SCT_SIZE (1UL << SECTION_SIZE_BITS) +static void __init insert_increment (u16 rn,int standby,int assigned) {struct memory_increment *incr, *new_incr;
@@ -521,7 +523,7 @@ static void __init insert_increment(u16 rn, int standby, int assigned) new_incr->rn = rn; new_incr->standby = standby;if (!standby) - new_incr->usecount =1 ; + new_incr->usecount = rzm >MEM_SCT_SIZE ? rzm/MEM_SCT_SIZE :1 ; last_rn =0 ; prev = &sclp_mem_list;list_for_each_entry (incr, &sclp_mem_list, list) {
drivers/tty/pty.c +3 -0
@@ -607,6 +607,9 @@ static int ptmx_open(struct inode *inode, struct file *filp)nonseekable_open (inode, filp); +/* We refuse fsnotify events on ptmx, since it's a shared resource */ + filp->f_mode |=FMODE_NONOTIFY ; + retval =tty_alloc_file (filp);if (retval)return retval;
drivers/tty/serial/serial_core.c +4 -0
@@ -1877,6 +1877,8 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport)mutex_unlock (&port->mutex);return 0 ; } +put_device (tty_dev); +if (console_suspend_enabled || !uart_console (uport)) uport->suspended =1 ;
@@ -1942,9 +1944,11 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport)disable_irq_wake (uport->irq); uport->irq_wake =0 ; } +put_device (tty_dev);mutex_unlock (&port->mutex);return 0 ; } +put_device (tty_dev); uport->suspended =0 ;/*
drivers/tty/tty_io.c +2 -2
@@ -938,10 +938,10 @@ void start_tty(struct tty_struct *tty)EXPORT_SYMBOL (start_tty); +/* We limit tty time update visibility to every 8 seconds or so. */ static void tty_update_time (struct timespec *time) { -unsigned long sec =get_seconds (); - sec -= sec %60 ; +unsigned long sec =get_seconds () & ~7 ;if ((long )(sec - time->tv_sec) >0 ) time->tv_sec = sec; }
drivers/usb/core/devio.c +2 -0
@@ -681,6 +681,8 @@ static int check_ctrlrecip(struct dev_state *ps, unsigned int requesttype, index &=0xff ;switch (requesttype &USB_RECIP_MASK ) {case USB_RECIP_ENDPOINT : +if ((index & ~USB_DIR_IN ) ==0 ) +return 0 ; ret =findintfep (ps->dev, index);if (ret >=0 ) ret =checkintf (ps, ret);
drivers/usb/misc/appledisplay.c +1 -0
@@ -63,6 +63,7 @@ static const struct usb_device_id appledisplay_table[] = { { APPLEDISPLAY_DEVICE(0x9219) }, { APPLEDISPLAY_DEVICE(0x921c) }, { APPLEDISPLAY_DEVICE(0x921d) }, + { APPLEDISPLAY_DEVICE(0x9236) }, /* Terminating entry */ { }
drivers/usb/serial/ftdi_sio.c +4 -1
@@ -197,6 +197,7 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_THROTTLE_PID) }, { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GATEWAY_PID) }, { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GBM_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GBM_BOOST_PID) }, { USB_DEVICE(NEWPORT_VID, NEWPORT_AGILIS_PID) }, { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
@@ -878,7 +879,9 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(FTDI_VID, FTDI_DOTEC_PID) }, { USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID), .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, - { USB_DEVICE(ST_VID, ST_STMCLT1030_PID), + { USB_DEVICE(ST_VID, ST_STMCLT_2232_PID), + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { USB_DEVICE(ST_VID, ST_STMCLT_4232_PID), .driver_info = (kernel_ulong_t)&ftdi_stmclite_quirk }, { USB_DEVICE(FTDI_VID, FTDI_RF_R106) }, { USB_DEVICE(FTDI_VID, FTDI_DISTORTEC_JTAG_LOCK_PICK_PID),
drivers/usb/serial/ftdi_sio_ids.h +3 -1
@@ -74,6 +74,7 @@#define FTDI_OPENDCC_THROTTLE_PID 0xBFDA#define FTDI_OPENDCC_GATEWAY_PID 0xBFDB#define FTDI_OPENDCC_GBM_PID 0xBFDC +#define FTDI_OPENDCC_GBM_BOOST_PID 0xBFDD/* NZR SEM 16+ USB (http://www.nzr.de) */ #define FTDI_NZR_SEM_USB_PID 0xC1E0/* NZR SEM-LOG16+ */
@@ -1150,7 +1151,8 @@* STMicroelectonics */ #define ST_VID 0x0483 -#define ST_STMCLT1030_PID 0x3747/* ST Micro Connect Lite STMCLT1030 */ +#define ST_STMCLT_2232_PID 0x3746 +#define ST_STMCLT_4232_PID 0x3747/* * Papouch products (http://www.papouch.com/)
drivers/usb/serial/option.c +8 -0
@@ -347,6 +347,7 @@ static void option_instat_callback(struct urb *urb);/* Olivetti products */ #define OLIVETTI_VENDOR_ID 0x0b3c#define OLIVETTI_PRODUCT_OLICARD100 0xc000 +#define OLIVETTI_PRODUCT_OLICARD145 0xc003/* Celot products */ #define CELOT_VENDOR_ID 0x211f
@@ -1273,6 +1274,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) }, { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) }, + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD145) }, { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ { USB_DEVICE(ONDA_VENDOR_ID, ONDA_MT825UP) }, /* ONDA MT825UP modem */ { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/
@@ -1350,6 +1352,12 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180), .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE(CHANGHONG_VENDOR_ID, CHANGHONG_PRODUCT_CH690) }, + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x02, 0x01) }, /* D-Link DWM-156 (variant) */ + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x00, 0x00) }, /* D-Link DWM-156 (variant) */ + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d02, 0xff, 0x02, 0x01) }, + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d02, 0xff, 0x00, 0x00) }, + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) }, + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) }, { } /* Terminating entry */ };MODULE_DEVICE_TABLE (usb, option_ids);
drivers/usb/storage/cypress_atacb.c +14 -2
@@ -248,14 +248,26 @@ static int cypress_probe(struct usb_interface *intf, {struct us_data *us;int result; +struct usb_device *device; result =usb_stor_probe1 (&us, intf, id, (id - cypress_usb_ids) + cypress_unusual_dev_list);if (result)return result; - us->protocol_name ="Transparent SCSI with Cypress ATACB" ; - us->proto_handler = cypress_atacb_passthrough; +/* Among CY7C68300 chips, the A revision does not support Cypress ATACB +* Filter out this revision from EEPROM default descriptor values +*/ + device =interface_to_usbdev (intf); +if (device->descriptor.iManufacturer !=0x38 || + device->descriptor.iProduct !=0x4e || + device->descriptor.iSerialNumber !=0x64 ) { + us->protocol_name ="Transparent SCSI with Cypress ATACB" ; + us->proto_handler = cypress_atacb_passthrough; + }else { + us->protocol_name ="Transparent SCSI" ; + us->proto_handler = usb_stor_transparent_scsi_command; + } result =usb_stor_probe2 (us);return result;
drivers/video/console/fbcon.c +2 -0
@@ -1228,6 +1228,8 @@ static void fbcon_deinit(struct vc_data *vc) finished:fbcon_free_font (p, free_font); +if (free_font) + vc->vc_font.data =NULL ;if (!con_is_bound (&fb_con))fbcon_exit ();
fs/dcache.c +3 -1
@@ -1238,8 +1238,10 @@ void shrink_dcache_parent(struct dentry * parent)LIST_HEAD (dispose);int found; -while ((found =select_parent (parent, &dispose)) !=0 ) +while ((found =select_parent (parent, &dispose)) !=0 ) {shrink_dentry_list (&dispose); +cond_resched (); + } }EXPORT_SYMBOL (shrink_dcache_parent);
fs/exec.c +2 -2
@@ -627,7 +627,7 @@ static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift)* when the old and new regions overlap clear from new_end. */ free_pgd_range (&tlb, new_end, old_end, new_end, - vma->vm_next ? vma->vm_next->vm_start :0 ); + vma->vm_next ? vma->vm_next->vm_start :USER_PGTABLES_CEILING ); }else {/* * otherwise, clean from old_start; this is done to not touch
@@ -636,7 +636,7 @@ static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift)* for the others its just a little faster. */ free_pgd_range (&tlb, old_start, old_end, new_end, - vma->vm_next ? vma->vm_next->vm_start :0 ); + vma->vm_next ? vma->vm_next->vm_start :USER_PGTABLES_CEILING ); }tlb_finish_mmu (&tlb, new_end, old_end);
fs/ext4/Kconfig +2 -1
@@ -82,4 +82,5 @@ config EXT4_DEBUG Enables run-time debugging support for the ext4 filesystem. If you select Y here, then you will be able to turn on debugging - with a command such as "echo 1 > /sys/kernel/debug/ext4/mballoc-debug" + with a command such as: + echo 1 > /sys/module/ext4/parameters/mballoc_debug
fs/ext4/ext4_jbd2.h +5 -1
@@ -164,16 +164,20 @@ static inline void ext4_journal_callback_add(handle_t *handle,* ext4_journal_callback_del: delete a registered callback * @handle: active journal transaction handle on which callback was registered * @jce: registered journal callback entry to unregister +* Return true if object was sucessfully removed */ -static inline void ext4_journal_callback_del (handle_t *handle, +static inline bool ext4_journal_callback_try_del (handle_t *handle,struct ext4_journal_cb_entry *jce) { +bool deleted;struct ext4_sb_info *sbi =EXT4_SB (handle->h_transaction->t_journal->j_private);spin_lock (&sbi->s_md_lock); + deleted = !list_empty (&jce->jce_list);list_del_init (&jce->jce_list);spin_unlock (&sbi->s_md_lock); +return deleted; }int
fs/ext4/mballoc.c +4 -4
@@ -4436,11 +4436,11 @@ ext4_mb_free_metadata(handle_t *handle, struct ext4_buddy *e4b, node =rb_prev (new_node);if (node) { entry = rb_entry(node, struct ext4_free_data, efd_node); -if (can_merge (entry, new_entry)) { +if (can_merge (entry, new_entry) && +ext4_journal_callback_try_del (handle, &entry->efd_jce)) { new_entry->efd_start_cluster = entry->efd_start_cluster; new_entry->efd_count += entry->efd_count;rb_erase (node, &(db->bb_free_root)); -ext4_journal_callback_del (handle, &entry->efd_jce);kmem_cache_free (ext4_free_data_cachep, entry); } }
@@ -4448,10 +4448,10 @@ ext4_mb_free_metadata(handle_t *handle, struct ext4_buddy *e4b, node =rb_next (new_node);if (node) { entry = rb_entry(node, struct ext4_free_data, efd_node); -if (can_merge (new_entry, entry)) { +if (can_merge (new_entry, entry) && +ext4_journal_callback_try_del (handle, &entry->efd_jce)) { new_entry->efd_count += entry->efd_count;rb_erase (node, &(db->bb_free_root)); -ext4_journal_callback_del (handle, &entry->efd_jce);kmem_cache_free (ext4_free_data_cachep, entry); } }
fs/ext4/resize.c +2 -0
@@ -1202,6 +1202,8 @@ static void ext4_update_super(struct super_block *sb,/* Update the global fs size fields */ sbi->s_groups_count += flex_gd->count; + sbi->s_blockfile_groups =min_t (ext4_group_t, sbi->s_groups_count, + (EXT4_MAX_BLOCK_FILE_PHYS /EXT4_BLOCKS_PER_GROUP (sb)));/* Update the reserved block counts only once the new group is * active. */
fs/ext4/super.c +5 -2
@@ -437,10 +437,13 @@ static void ext4_journal_commit_callback(journal_t *journal, transaction_t *txn)struct super_block *sb = journal->j_private;struct ext4_sb_info *sbi =EXT4_SB (sb);int error =is_journal_aborted (journal); -struct ext4_journal_cb_entry *jce, *tmp; +struct ext4_journal_cb_entry *jce; +BUG_ON (txn->t_state ==T_FINISHED );spin_lock (&sbi->s_md_lock); -list_for_each_entry_safe (jce, tmp, &txn->t_private_list, jce_list) { +while (!list_empty (&txn->t_private_list)) { + jce =list_entry (txn->t_private_list.next, + struct ext4_journal_cb_entry, jce_list);list_del_init (&jce->jce_list);spin_unlock (&sbi->s_md_lock); jce->jce_func (sb, jce, error);
fs/fscache/stats.c +1 -1
@@ -276,5 +276,5 @@ const struct file_operations fscache_stats_fops = { .open = fscache_stats_open, .read = seq_read, .llseek = seq_lseek, - .release = seq_release, + .release = single_release, };
fs/jbd2/commit.c +28 -22
80 lines not on this page · raw message
fs/lockd/clntlock.c +3 -0
@@ -144,6 +144,9 @@ int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout) timeout);if (ret <0 )return -ERESTARTSYS ; +/* Reset the lock status after a server reboot so we resend */ +if (block->b_status == nlm_lck_denied_grace_period) + block->b_status = nlm_lck_blocked; req->a_res.status = block->b_status;return 0 ; }
fs/lockd/clntproc.c +0 -3
@@ -551,9 +551,6 @@ again: status =nlmclnt_block (block, req,NLMCLNT_POLL_TIMEOUT );if (status <0 )break ; -/* Resend the blocking lock request after a server reboot */ -if (resp->status == nlm_lck_denied_grace_period) -continue ;if (resp->status != nlm_lck_blocked)break ; }
fs/nfs/nfs4proc.c +6 -0
@@ -1362,6 +1362,12 @@ int nfs4_open_delegation_recall(struct nfs_open_context *ctx, struct nfs4_statecase -ENOMEM : err =0 ; goto out; +case -NFS4ERR_DELAY : +case -NFS4ERR_GRACE : +set_bit (NFS_DELEGATED_STATE , &state->flags); +ssleep (1 ); + err = -EAGAIN ; + goto out; } err =nfs4_handle_exception (server, err, &exception); }while (exception.retry);
fs/nfsd/nfs4state.c +1 -7
@@ -213,13 +213,7 @@ static void __nfs4_file_put_access(struct nfs4_file *fp, int oflag) {if (atomic_dec_and_test (&fp->fi_access[oflag])) {nfs4_file_put_fd (fp, oflag); -/* -* It's also safe to get rid of the RDWR open *if* -* we no longer have need of the other kind of access -* or if we already have the other kind of open: -*/ -if (fp->fi_fds[1 -oflag] - ||atomic_read (&fp->fi_access[1 - oflag]) ==0 ) +if (atomic_read (&fp->fi_access[1 - oflag]) ==0 )nfs4_file_put_fd (fp,O_RDWR ); } }
fs/nfsd/nfs4xdr.c +5 -14
@@ -343,10 +343,7 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,all 32 bits of 'nseconds'. */ READ_BUF (12 ); len +=12 ; -READ32 (dummy32); -if (dummy32) -return nfserr_inval; -READ32 (iattr->ia_atime.tv_sec); +READ64 (iattr->ia_atime.tv_sec);READ32 (iattr->ia_atime.tv_nsec);if (iattr->ia_atime.tv_nsec >= (u32 )1000000000 )return nfserr_inval;
@@ -369,10 +366,7 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,all 32 bits of 'nseconds'. */ READ_BUF (12 ); len +=12 ; -READ32 (dummy32); -if (dummy32) -return nfserr_inval; -READ32 (iattr->ia_mtime.tv_sec); +READ64 (iattr->ia_mtime.tv_sec);READ32 (iattr->ia_mtime.tv_nsec);if (iattr->ia_mtime.tv_nsec >= (u32 )1000000000 )return nfserr_inval;
@@ -2371,8 +2365,7 @@ out_acl:if (bmval1 &FATTR4_WORD1_TIME_ACCESS ) {if ((buflen -=12 ) <0 ) goto out_resource; -WRITE32 (0 ); -WRITE32 (stat.atime.tv_sec); +WRITE64 ((s64 )stat.atime.tv_sec);WRITE32 (stat.atime.tv_nsec); }if (bmval1 &FATTR4_WORD1_TIME_DELTA ) {
@@ -2385,15 +2378,13 @@ out_acl:if (bmval1 &FATTR4_WORD1_TIME_METADATA ) {if ((buflen -=12 ) <0 ) goto out_resource; -WRITE32 (0 ); -WRITE32 (stat.ctime.tv_sec); +WRITE64 ((s64 )stat.ctime.tv_sec);WRITE32 (stat.ctime.tv_nsec); }if (bmval1 &FATTR4_WORD1_TIME_MODIFY ) {if ((buflen -=12 ) <0 ) goto out_resource; -WRITE32 (0 ); -WRITE32 (stat.mtime.tv_sec); +WRITE64 ((s64 )stat.mtime.tv_sec);WRITE32 (stat.mtime.tv_nsec); }if (bmval1 &FATTR4_WORD1_MOUNTED_ON_FILEID ) {
fs/sysfs/dir.c +11 -4
@@ -994,6 +994,7 @@ static int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir)enum kobj_ns_type type;const void *ns;ino_t ino; +loff_t off; type =sysfs_ns_type (parent_sd); ns =sysfs_info (dentry->d_sb)->ns[type];
@@ -1016,6 +1017,7 @@ static int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir)return 0 ; }mutex_lock (&sysfs_mutex); + off = filp->f_pos;for (pos =sysfs_dir_pos (ns, parent_sd, filp->f_pos, pos); pos; pos =sysfs_dir_next_pos (ns, parent_sd, filp->f_pos, pos)) {
@@ -1027,19 +1029,24 @@ static int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir) len =strlen (name); ino = pos->s_ino; type =dt_type (pos); - filp->f_pos = pos->s_hash; + off = filp->f_pos = pos->s_hash; filp->private_data =sysfs_get (pos);mutex_unlock (&sysfs_mutex); - ret =filldir (dirent, name, len, filp->f_pos, ino, type); + ret =filldir (dirent, name, len, off, ino, type);mutex_lock (&sysfs_mutex);if (ret <0 )break ; }mutex_unlock (&sysfs_mutex); -if ((filp->f_pos >1 ) && !pos) {/* EOF */ - filp->f_pos =INT_MAX ; + +/* don't reference last entry if its refcount is dropped */ +if (!pos) { filp->private_data =NULL ; + +/* EOF and not changed as 0 or 1 in read/write path */ +if (off == filp->f_pos && off >1 ) + filp->f_pos =INT_MAX ; }return 0 ; }
include/asm-generic/pgtable.h +10 -0
@@ -7,6 +7,16 @@#include <linux/mm_types.h> #include <linux/bug.h> +/* +* On almost all architectures and configurations, 0 can be used as the +* upper ceiling to free_pgtables(): on many architectures it has the same +* effect as using TASK_SIZE. However, there is one configuration which +* must impose a more careful limit, to avoid freeing kernel pgtables. +*/ +#ifndef USER_PGTABLES_CEILING +#define USER_PGTABLES_CEILING 0UL +#endif +#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS extern int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long address, pte_t *ptep,
include/linux/ipc_namespace.h +1 -1
@@ -42,8 +42,8 @@ struct ipc_namespace {size_t shm_ctlmax;size_t shm_ctlall; +unsigned long shm_tot;int shm_ctlmni; -int shm_tot;/* * Defines whether IPC_RMID is forced for _all_ shm segments regardless * of shmctl()
include/linux/jbd2.h +1 -0
@@ -470,6 +470,7 @@ struct transaction_sT_COMMIT ,T_COMMIT_DFLUSH ,T_COMMIT_JFLUSH , +T_COMMIT_CALLBACK , T_FINISHED } t_state;
ipc/shm.c +1 -1
@@ -450,7 +450,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)size_t size = params->u.size;int error;struct shmid_kernel *shp; -int numpages = (size +PAGE_SIZE -1 ) >>PAGE_SHIFT ; +size_t numpages = (size +PAGE_SIZE -1 ) >>PAGE_SHIFT ;struct file * file;char name[13 ];int id;
kernel/cgroup.c +1 -1
@@ -2020,7 +2020,7 @@ static int cgroup_attach_proc(struct cgroup *cgrp, struct task_struct *leader)if (!group)return -ENOMEM ;/* pre-allocate to guarantee space while iterating in rcu read-side. */ - retval =flex_array_prealloc (group,0 , group_size -1 ,GFP_KERNEL ); + retval =flex_array_prealloc (group,0 , group_size,GFP_KERNEL );if (retval) goto out_free_group_list;
kernel/hrtimer.c +6 -0
@@ -298,6 +298,10 @@ ktime_t ktime_sub_ns(const ktime_t kt, u64 nsec) }else {unsigned long rem =do_div (nsec,NSEC_PER_SEC ); +/* Make sure nsec fits into long */ +if (unlikely (nsec >KTIME_SEC_MAX )) +return (ktime_t ){ .tv64 =KTIME_MAX }; + tmp =ktime_set ((long )nsec, rem); }
@@ -1308,6 +1312,8 @@ retry: expires =ktime_sub (hrtimer_get_expires (timer), base->offset); +if (expires.tv64 <0 ) + expires.tv64 =KTIME_MAX ;if (expires.tv64 < expires_next.tv64) expires_next = expires;break ;
kernel/time/tick-broadcast.c +4 -0
@@ -66,6 +66,8 @@ static void tick_broadcast_start_periodic(struct clock_event_device *bc)*/ int tick_check_broadcast_device (struct clock_event_device *dev) { +struct clock_event_device *cur = tick_broadcast_device.evtdev; + if ((dev->features & CLOCK_EVT_FEAT_DUMMY) || (tick_broadcast_device.evtdev && tick_broadcast_device.evtdev->rating >= dev->rating) ||
@@ -73,6 +75,8 @@ int tick_check_broadcast_device(struct clock_event_device *dev)return 0 ;clockevents_exchange_device (tick_broadcast_device.evtdev, dev); +if (cur) + cur->event_handler = clockevents_handle_noop; tick_broadcast_device.evtdev = dev;if (!cpumask_empty (tick_get_broadcast_mask ()))tick_broadcast_start_periodic (dev);
kernel/time/tick-common.c +1 -0
@@ -323,6 +323,7 @@ static void tick_shutdown(unsigned int *cpup)*/ dev->mode =CLOCK_EVT_MODE_UNUSED ;clockevents_exchange_device (dev,NULL ); + dev->event_handler = clockevents_handle_noop; td->evtdev =NULL ; }raw_spin_unlock_irqrestore (&tick_device_lock, flags);
kernel/trace/ftrace.c +3 -2
@@ -624,7 +624,7 @@ int ftrace_profile_pages_init(struct ftrace_profile_stat *stat) pages =DIV_ROUND_UP (functions,PROFILES_PER_PAGE ); -for (i =0 ; i < pages; i++) { +for (i =1 ; i < pages; i++) { pg->next = (void *)get_zeroed_page (GFP_KERNEL );if (!pg->next) goto out_free;
@@ -3611,7 +3611,8 @@ out:if (fail)return -EINVAL ; - ftrace_graph_filter_enabled =1 ; + ftrace_graph_filter_enabled = !!(*idx); +return 0 ; }
kernel/trace/trace.c +2 -0
@@ -4717,6 +4717,8 @@ static __init int tracer_init_debugfs(void)trace_access_lock_init (); d_tracer =tracing_init_dentry (); +if (!d_tracer) +return 0 ;trace_create_file ("tracing_enabled" ,0644 , d_tracer, &global_trace, &tracing_ctrl_fops);
kernel/trace/trace_stack.c +69 -7
142 lines not on this page · raw message
kernel/trace/trace_stat.c +2 -0
@@ -307,6 +307,8 @@ static int tracing_stat_init(void)struct dentry *d_tracing; d_tracing =tracing_init_dentry (); +if (!d_tracing) +return 0 ; stat_dir =debugfs_create_dir ("trace_stat" , d_tracing);if (!stat_dir)
mm/mmap.c +2 -2
@@ -1920,7 +1920,7 @@ static void unmap_region(struct mm_struct *mm,unmap_vmas (&tlb, vma, start, end, &nr_accounted,NULL );vm_unacct_memory (nr_accounted);free_pgtables (&tlb, vma, prev ? prev->vm_end :FIRST_USER_ADDRESS , - next ? next->vm_start :0 ); + next ? next->vm_start :USER_PGTABLES_CEILING );tlb_finish_mmu (&tlb, start, end); }
@@ -2308,7 +2308,7 @@ void exit_mmap(struct mm_struct *mm)unmap_vmas (&tlb, vma,0 ,-1 , &nr_accounted,NULL );vm_unacct_memory (nr_accounted); -free_pgtables (&tlb, vma,FIRST_USER_ADDRESS ,0 ); +free_pgtables (&tlb, vma,FIRST_USER_ADDRESS ,USER_PGTABLES_CEILING );tlb_finish_mmu (&tlb,0 ,-1 );/*
net/wireless/reg.c +1 -1
@@ -862,7 +862,7 @@ static void handle_channel(struct wiphy *wiphy,return ;REG_DBG_PRINT ("Disabling freq %d MHz\n" , chan->center_freq); - chan->flags =IEEE80211_CHAN_DISABLED ; + chan->flags |=IEEE80211_CHAN_DISABLED ;return ; }
sound/soc/codecs/max98088.c +1 -1
@@ -2006,7 +2006,7 @@ static int max98088_probe(struct snd_soc_codec *codec) ret); goto err_access; } -dev_info (codec->dev,"revision %c\n" , ret +'A' ); +dev_info (codec->dev,"revision %c\n" , ret -0x40 +'A' );snd_soc_write (codec,M98088_REG_51_PWR_SYS ,M98088_PWRSV );
sound/usb/card.c +3 -1
@@ -611,7 +611,9 @@ int snd_usb_autoresume(struct snd_usb_audio *chip)int err = -ENODEV ;down_read (&chip->shutdown_rwsem); -if (!chip->shutdown && !chip->probing) +if (chip->probing) + err =0 ; +else if (!chip->shutdown) err =usb_autopm_get_interface (chip->pm_intf);up_read (&chip->shutdown_rwsem);
sound/usb/midi.c +2 -11
@@ -126,7 +126,6 @@ struct snd_usb_midi {struct snd_usb_midi_in_endpoint *in; } endpoints[MIDI_MAX_ENDPOINTS ];unsigned long input_triggered; -bool autopm_reference;unsigned int opened[2 ];unsigned char disconnected;unsigned char input_running;
@@ -1040,7 +1039,6 @@ static int substream_open(struct snd_rawmidi_substream *substream, int dir, {struct snd_usb_midi * umidi = substream->rmidi->private_data;struct snd_kcontrol *ctl; -int err;down_read (&umidi->disc_rwsem);if (umidi->disconnected) {
@@ -1051,13 +1049,6 @@ static int substream_open(struct snd_rawmidi_substream *substream, int dir,mutex_lock (&umidi->mutex);if (open) {if (!umidi->opened[0 ] && !umidi->opened[1 ]) { - err =usb_autopm_get_interface (umidi->iface); - umidi->autopm_reference = err >=0 ; -if (err <0 && err != -EACCES ) { -mutex_unlock (&umidi->mutex); -up_read (&umidi->disc_rwsem); -return -EIO ; - }if (umidi->roland_load_ctl) { ctl = umidi->roland_load_ctl; ctl->vd[0 ].access |=SNDRV_CTL_ELEM_ACCESS_INACTIVE ;
@@ -1080,8 +1071,6 @@ static int substream_open(struct snd_rawmidi_substream *substream, int dir,snd_ctl_notify (umidi->card,SNDRV_CTL_EVENT_MASK_INFO , &ctl->id); } -if (umidi->autopm_reference) -usb_autopm_put_interface (umidi->iface); } }mutex_unlock (&umidi->mutex);
@@ -2256,6 +2245,8 @@ int snd_usbmidi_create(struct snd_card *card,return err; } +usb_autopm_get_interface_no_resume (umidi->iface); +list_add_tail (&umidi->list, midi_list);return 0 ; }
sound/usb/stream.c +8 -0
@@ -168,6 +168,14 @@ static int parse_uac_endpoint_attributes(struct snd_usb_audio *chip,if (!csep && altsd->bNumEndpoints >=2 ) csep =snd_usb_find_desc (alts->endpoint[1 ].extra, alts->endpoint[1 ].extralen,NULL ,USB_DT_CS_ENDPOINT ); +/* +* If we can't locate the USB_DT_CS_ENDPOINT descriptor in the extra +* bytes after the first endpoint, go search the entire interface. +* Some devices have it directly *before* the standard endpoint. +*/ +if (!csep) + csep =snd_usb_find_desc (alts->extra, alts->extralen,NULL ,USB_DT_CS_ENDPOINT ); +if (!csep || csep->bLength <7 || csep->bDescriptorSubtype !=UAC_EP_GENERAL ) { snd_printk(KERN_WARNING "%d:%u:%d : no or invalid"