Linux 3.10.55
Greg KH
maintainerI'm announcing the release of the 3.10.55 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/mips/cavium-octeon/setup.c | 18 arch/mips/include/asm/reg.h | 260 +++++++++----- arch/mips/include/asm/thread_info.h | 2 arch/mips/kernel/binfmt_elfo32.c | 32 - arch/mips/kernel/irq-gic.c | 6 arch/mips/kernel/ptrace.c | 3 arch/mips/kernel/scall32-o32.S | 2 arch/mips/kernel/scall64-64.S | 2 arch/mips/kernel/scall64-n32.S | 2 arch/mips/kernel/scall64-o32.S | 2 arch/mips/kernel/unaligned.c | 1 arch/mips/mm/c-r4k.c | 5 arch/mips/mm/tlbex.c | 1 arch/openrisc/kernel/entry.S | 59 +-- arch/openrisc/kernel/signal.c | 198 +++++----- arch/powerpc/include/asm/pte-hash64-64k.h | 32 + arch/powerpc/mm/numa.c | 2 arch/powerpc/platforms/pseries/hotplug-memory.c | 2 block/blk-cgroup.c | 7 drivers/acpi/acpica/utcopy.c | 6 drivers/acpi/processor_idle.c | 4 drivers/acpi/scan.c | 15 drivers/char/tpm/tpm.c | 69 ++- drivers/char/tpm/tpm.h | 3 drivers/char/tpm/tpm_tis.c | 31 + drivers/firmware/efi/vars.c | 8 drivers/infiniband/core/iwcm.c | 27 + drivers/infiniband/ulp/srp/ib_srp.c | 38 +- drivers/iommu/amd_iommu.c | 10 drivers/md/raid1.c | 8 drivers/md/raid10.c | 11 drivers/md/raid5.c | 2 drivers/media/media-device.c | 2 drivers/media/tuners/xc4000.c | 20 - drivers/media/tuners/xc5000.c | 22 - drivers/media/usb/au0828/au0828-video.c | 34 - drivers/mfd/omap-usb-host.c | 2 drivers/mtd/ftl.c | 1 drivers/mtd/nand/omap2.c | 2 drivers/regulator/arizona-ldo1.c | 2 drivers/scsi/bfa/bfa_ioc.h | 2 drivers/scsi/storvsc_drv.c | 19 + drivers/spi/spi-omap2-mcspi.c | 14 drivers/spi/spi-orion.c | 10 fs/cifs/cifsglob.h | 5 fs/cifs/file.c | 4 fs/cifs/inode.c | 6 fs/cifs/readdir.c | 4 fs/cifs/smb2file.c | 2 fs/cifs/smb2inode.c | 2 fs/cifs/smb2maperror.c | 2 fs/cifs/smb2ops.c | 2 fs/cifs/smb2pdu.c | 5 fs/dcache.c | 5 fs/namei.c | 4 fs/namespace.c | 59 ++- fs/proc/array.c | 11 fs/xfs/xfs_aops.c | 61 +++ fs/xfs/xfs_dquot.c | 3 fs/xfs/xfs_file.c | 21 + fs/xfs/xfs_qm.c | 8 include/linux/capability.h | 5 include/linux/ceph/messenger.h | 2 include/linux/mount.h | 9 kernel/audit.c | 2 kernel/capability.c | 4 kernel/smp.c | 2 kernel/trace/ring_buffer.c | 31 - net/bluetooth/l2cap_sock.c | 3 net/bluetooth/rfcomm/core.c | 7 net/bluetooth/rfcomm/sock.c | 3 net/bluetooth/sco.c | 6 net/ceph/auth_x.c | 256 +++++++------ net/ceph/messenger.c | 8 net/ceph/mon_client.c | 16 security/commoncap.c | 3 sound/soc/codecs/max98090.c | 2 sound/soc/codecs/wm_adsp.c | 2 sound/soc/pxa/pxa-ssp.c | 4 sound/soc/samsung/i2s.c | 16 sound/soc/soc-pcm.c | 1 tools/testing/selftests/Makefile | 1 tools/testing/selftests/mount/Makefile | 17 tools/testing/selftests/mount/unprivileged-remount-test.c | 242 +++++++++++++ 85 files changed, 1276 insertions(+), 570 deletions(-)
Aaro Koskinen (1):
MIPS: OCTEON: make get_system_type() thread-safe
Al Viro (1):
dcache.c: get rid of pointless macros
Alex Smith (1):
MIPS: asm/reg.h: Make 32- and 64-bit definitions available at the same time
Andrey Utkin (1):
powerpc/mm/numa: Fix break placement
Aneesh Kumar K.V (1):
powerpc/mm: Use read barrier when creating real_pte
Bart Van Assche (1):
IB/srp: Fix deadlock between host removal and multipathd
Ben Hutchings (1):
bfa: Fix undefined bit shift on big-endian architectures with 32-bit DMA address
Chris Mason (1):
xfs: don't zero partial page cache pages during O_DIRECT writes
Daniel Mack (1):
ASoC: pxa-ssp: drop SNDRV_PCM_FMTBIT_S24_LE
Dave Chinner (3):
xfs: quotacheck leaves dquot buffers without verifiers
xfs: don't dirty buffers beyond EOF
xfs: don't zero partial page cache pages during O_DIRECT writes
David E. Box (1):
ACPICA: Utilities: Fix memory leak in acpi_ut_copy_iobject_to_iobject
Eric Paris (1):
CAPABILITIES: remove undefined caps from all processes
Eric W. Biederman (5):
mnt: Only change user settable mount flags in remount
mnt: Move the test for MNT_LOCK_READONLY from change_mount_flags into do_remount
mnt: Correct permission checks in do_remount
mnt: Change the default remount atime from relatime to the existing value
mnt: Add tests for unprivileged remount cases that have found to be faulty
Gavin Shan (1):
powerpc/pseries: Failure on removing device node
Greg Kroah-Hartman (1):
Linux 3.10.55
Guenter Roeck (1):
firmware: Do not use WARN_ON(!spin_is_locked())
Huacai Chen (2):
MIPS: tlbex: Fix a missing statement for HUGETLB
MIPS: Remove BUG_ON(!is_fpu_owner()) in do_ade()
Ilya Dryomov (4):
libceph: set last_piece in ceph_msg_data_pages_cursor_init() correctly
libceph: add process_one_ticket() helper
libceph: do not hard code max auth ticket len
libceph: rename ceph_msg::front_max to front_alloc_len
Jarkko Nikula (1):
ASoC: max98090: Fix missing free_irq
Jarkko Sakkinen (1):
tpm: missing tpm_chip_put in tpm_get_random()
Jason Gunthorpe (1):
tpm: Provide a generic means to override the chip returned timeouts
Jeffrey Deans (1):
MIPS: GIC: Prevent array overrun
Jiri Kosina (1):
ACPI / cpuidle: fix deadlock between cpuidle_lock and cpu_hotplug.lock
Joerg Roedel (1):
iommu/amd: Fix cleanup_domain for mass device removal
Jonas Bonn (1):
openrisc: Rework signal handling
K. Y. Srinivasan (2):
Drivers: scsi: storvsc: Implement a eh_timed_out handler
drivers: scsi: storvsc: Correctly handle TEST_UNIT_READY failure
Kevin Hao (1):
mtd/ftl: fix the double free of the buffers allocated in build_maps()
Lan Tianyu (1):
ACPI: Run fixed event device notifications in process context
Linus Torvalds (1):
vfs: fix bad hashing of dentries
Mark A. Greer (1):
spi: omap2-mcspi: Configure hardware when slave driver changes mode
Markos Chandras (1):
MIPS: asm: thread_info: Add _TIF_SECCOMP flag
Mauro Carvalho Chehab (3):
media: xc5000: Fix get_frequency()
media: xc4000: Fix get_frequency()
media: au0828: Only alt setting logic when neededMichael Welling (1):
mfd: omap-usb-host: Fix improper mask use.
NeilBrown (4):
md/raid6: avoid data corruption during recovery of double-degraded RAID6 md/raid10: fix memory leak when reshaping a RAID10. md/raid10: Fix memory leak when raid10 reshape completes. md/raid1,raid10: always abort recover on write error.
Nikesh Oswal (1):
regulator: arizona-ldo1: remove bypass functionality
Paul Burton (1):
MIPS: Prevent user from setting FCSR cause bits
Pavel Shilovsky (5):
CIFS: Fix STATUS_CANNOT_DELETE error mapping for SMB2
CIFS: Fix async reading on reconnects
CIFS: Fix wrong directory attributes after rename
CIFS: Fix wrong filename length for SMB2
CIFS: Fix wrong restart readdir for SMB1
Praveen Diwakar (1):
ASoC: wm_adsp: Add missing MODULE_LICENSE
Qiao Zhou (1):
ASoC: pcm: fix dpcm_path_put in dpcm runtime update
Ralf Baechle (2):
MIPS: Cleanup flags in syscall flags handlers.
MIPS: Fix accessing to per-cpu data when flushing the cache
Roger Quadros (1):
mtd: nand: omap: Fix 1-bit Hamming code scheme, omap_calculate_ecc()
Sage Weil (1):
libceph: gracefully handle large reply messages from the mon
Salva Peiró (1):
media: media-device: Remove duplicated memset() in media_enum_entities()
Sasha Levin (1):
kernel/smp.c:on_each_cpu_cond(): fix warning in fallback path
Steve French (1):
CIFS: Possible null ptr deref in SMB2_tcon
Steve Wise (1):
RDMA/iwcm: Use a default listen backlog if needed
Steven Rostedt (Red Hat) (2):
ring-buffer: Always reset iterator to reader page
ring-buffer: Up rb_iter_peek() loop count to 3
Sylwester Nawrocki (1):
ASoC: samsung: Correct I2S DAI suspend/resume ops
Tejun Heo (1):
blkcg: don't call into policy draining if root_blkg is already gone
Thomas Petazzoni (1):
spi: orion: fix incorrect handling of cell-index DT property
Vignesh Raman (1):
Bluetooth: Avoid use of session socket after the session gets freed
Vladimir Davydov (1):
Bluetooth: never linger on process exit
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 10 -SUBLEVEL = 54 +SUBLEVEL = 55 EXTRAVERSION = NAME = TOSSUG Baby Fish
arch/mips/cavium-octeon/setup.c +13 -5
@@ -463,6 +463,18 @@ static void octeon_halt(void)octeon_kill_core (NULL ); } +static char __read_mostly octeon_system_type[80 ]; + +static int __init init_octeon_system_type (void ) +{ +snprintf (octeon_system_type,sizeof (octeon_system_type),"%s (%s)" , +cvmx_board_type_to_string (octeon_bootinfo->board_type), +octeon_model_get_string (read_c0_prid ())); + +return 0 ; +} +early_initcall (init_octeon_system_type); +/** * Handle all the error condition interrupts that might occur. *
@@ -482,11 +494,7 @@ static irqreturn_t octeon_rlm_interrupt(int cpl, void *dev_id)*/ const char *octeon_board_type_string (void ) { -static char name[80 ]; -sprintf (name,"%s (%s)" , -cvmx_board_type_to_string (octeon_bootinfo->board_type), -octeon_model_get_string (read_c0_prid ())); -return name; +return octeon_system_type; }const char *get_system_type (void )
arch/mips/include/asm/reg.h +169 -91
285 lines not on this page · raw message
arch/mips/include/asm/thread_info.h +2 -0
@@ -131,6 +131,8 @@ static inline struct thread_info *current_thread_info(void)#define _TIF_FPUBOUND (1<<TIF_FPUBOUND)#define _TIF_LOAD_WATCH (1<<TIF_LOAD_WATCH) +#define _TIF_WORK_SYSCALL_ENTRY (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SECCOMP) +/* work to do in syscall_trace_leave() */ #define _TIF_WORK_SYSCALL_EXIT (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT)
arch/mips/kernel/binfmt_elfo32.c +13 -19
@@ -58,12 +58,6 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];#include <asm/processor.h> -/* -* When this file is selected, we are definitely running a 64bit kernel. -* So using the right regs define in asm/reg.h -*/ -#define WANT_COMPAT_REG_H -/* These MUST be defined before elf.h gets included */ extern void elf32_core_copy_regs (elf_gregset_t grp,struct pt_regs *regs);#define ELF_CORE_COPY_REGS (_dest, _regs) elf32_core_copy_regs(_dest, _regs);
@@ -135,21 +129,21 @@ void elf32_core_copy_regs(elf_gregset_t grp, struct pt_regs *regs) {int i; -for (i =0 ; i <EF_R0 ; i++) +for (i =0 ; i <MIPS32_EF_R0 ; i++) grp[i] =0 ; - grp[EF_R0 ] =0 ; + grp[MIPS32_EF_R0 ] =0 ;for (i =1 ; i <=31 ; i++) - grp[EF_R0 + i] = (elf_greg_t ) regs->regs[i]; - grp[EF_R26 ] =0 ; - grp[EF_R27 ] =0 ; - grp[EF_LO ] = (elf_greg_t ) regs->lo; - grp[EF_HI ] = (elf_greg_t ) regs->hi; - grp[EF_CP0_EPC ] = (elf_greg_t ) regs->cp0_epc; - grp[EF_CP0_BADVADDR ] = (elf_greg_t ) regs->cp0_badvaddr; - grp[EF_CP0_STATUS ] = (elf_greg_t ) regs->cp0_status; - grp[EF_CP0_CAUSE ] = (elf_greg_t ) regs->cp0_cause; -#ifdef EF_UNUSED0 - grp[EF_UNUSED0 ] =0 ; + grp[MIPS32_EF_R0 + i] = (elf_greg_t ) regs->regs[i]; + grp[MIPS32_EF_R26 ] =0 ; + grp[MIPS32_EF_R27 ] =0 ; + grp[MIPS32_EF_LO ] = (elf_greg_t ) regs->lo; + grp[MIPS32_EF_HI ] = (elf_greg_t ) regs->hi; + grp[MIPS32_EF_CP0_EPC ] = (elf_greg_t ) regs->cp0_epc; + grp[MIPS32_EF_CP0_BADVADDR ] = (elf_greg_t ) regs->cp0_badvaddr; + grp[MIPS32_EF_CP0_STATUS ] = (elf_greg_t ) regs->cp0_status; + grp[MIPS32_EF_CP0_CAUSE ] = (elf_greg_t ) regs->cp0_cause; +#ifdef MIPS32_EF_UNUSED0 + grp[MIPS32_EF_UNUSED0 ] =0 ;#endif }
arch/mips/kernel/irq-gic.c +4 -2
@@ -256,11 +256,13 @@ static void __init gic_setup_intr(unsigned int intr, unsigned int cpu,/* Setup Intr to Pin mapping */ if (pin &GIC_MAP_TO_NMI_MSK ) { +int i; +GICWRITE (GIC_REG_ADDR (SHARED ,GIC_SH_MAP_TO_PIN (intr)), pin);/* FIXME: hack to route NMI to all cpu's */ -for (cpu =0 ; cpu <NR_CPUS ; cpu +=32 ) { +for (i =0 ; i <NR_CPUS ; i +=32 ) {GICWRITE (GIC_REG_ADDR (SHARED , -GIC_SH_MAP_TO_VPE_REG_OFF (intr, cpu)), +GIC_SH_MAP_TO_VPE_REG_OFF (intr, i)),0xffffffff ); } }else {
arch/mips/kernel/ptrace.c +2 -1
@@ -161,6 +161,7 @@ int ptrace_setfpregs(struct task_struct *child, __u32 __user *data)__get_user (fregs[i], i + (__u64 __user *) data);__get_user (child->thread.fpu.fcr31, data +64 ); + child->thread.fpu.fcr31 &= ~FPU_CSR_ALL_X ;/* FIR may not be written. */
@@ -451,7 +452,7 @@ long arch_ptrace(struct task_struct *child, long request,break ;#endif case FPC_CSR : - child->thread.fpu.fcr31 = data; + child->thread.fpu.fcr31 = data & ~FPU_CSR_ALL_X ;break ; case DSP_BASE ... DSP_BASE + 5: {dspreg_t *dregs;
arch/mips/kernel/scall32-o32.S +1 -1
@@ -52,7 +52,7 @@ NESTED(handle_sys, PT_SIZE, sp) stack_done: lw t0, TI_FLAGS($28) # syscall tracing enabled? - li t1, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT + li t1, _TIF_WORK_SYSCALL_ENTRY and t0, t1 bnez t0, syscall_trace_entry # -> yes
arch/mips/kernel/scall64-64.S +1 -1
@@ -54,7 +54,7 @@ NESTED(handle_sys64, PT_SIZE, sp) sd a3, PT_R26(sp) # save a3 for syscall restarting - li t1, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT + li t1, _TIF_WORK_SYSCALL_ENTRY LONG_L t0, TI_FLAGS($28) # syscall tracing enabled? and t0, t1, t0 bnez t0, syscall_trace_entry
arch/mips/kernel/scall64-n32.S +1 -1
@@ -47,7 +47,7 @@ NESTED(handle_sysn32, PT_SIZE, sp) sd a3, PT_R26(sp) # save a3 for syscall restarting - li t1, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT + li t1, _TIF_WORK_SYSCALL_ENTRY LONG_L t0, TI_FLAGS($28) # syscall tracing enabled? and t0, t1, t0 bnez t0, n32_syscall_trace_entry
arch/mips/kernel/scall64-o32.S +1 -1
@@ -81,7 +81,7 @@ NESTED(handle_sys, PT_SIZE, sp) PTR 4b, bad_stack .previous - li t1, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT + li t1, _TIF_WORK_SYSCALL_ENTRY LONG_L t0, TI_FLAGS($28) # syscall tracing enabled? and t0, t1, t0 bnez t0, trace_a_syscall
arch/mips/kernel/unaligned.c +0 -1
@@ -604,7 +604,6 @@ static void emulate_load_store_insn(struct pt_regs *regs,case sdc1_op:die_if_kernel ("Unaligned FP access in kernel code" , regs);BUG_ON (!used_math ()); -BUG_ON (!is_fpu_owner ());lose_fpu (1 );/* Save FPU state for the emulator. */ res = fpu_emulator_cop1Handler(regs, ¤t->thread.fpu, 1,
arch/mips/mm/c-r4k.c +5 -0
@@ -12,6 +12,7 @@#include <linux/highmem.h> #include <linux/kernel.h> #include <linux/linkage.h> +#include <linux/preempt.h> #include <linux/sched.h> #include <linux/smp.h> #include <linux/mm.h>
@@ -601,6 +602,7 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size)/* Catch bad driver code */ BUG_ON (size ==0 ); +preempt_disable ();if (cpu_has_inclusive_pcaches) {if (size >= scache_size)r4k_blast_scache ();
@@ -621,6 +623,7 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size)R4600_HIT_CACHEOP_WAR_IMPL ;blast_dcache_range (addr, addr + size); } +preempt_enable ();bc_wback_inv (addr, size);__sync ();
@@ -631,6 +634,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size)/* Catch bad driver code */ BUG_ON (size ==0 ); +preempt_disable ();if (cpu_has_inclusive_pcaches) {if (size >= scache_size)r4k_blast_scache ();
@@ -655,6 +659,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size)R4600_HIT_CACHEOP_WAR_IMPL ;blast_inv_dcache_range (addr, addr + size); } +preempt_enable ();bc_inv (addr, size);__sync ();
arch/mips/mm/tlbex.c +1 -0
@@ -1329,6 +1329,7 @@ static void __cpuinit build_r4000_tlb_refill_handler(void) }#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT uasm_l_tlb_huge_update (&l, p); +UASM_i_LW (&p,K0 ,0 ,K1 );build_huge_update_entries (&p, htlb_info.huge_pte,K1 );build_huge_tlb_write_entry (&p, &l, &r,K0 , tlb_random, htlb_info.restore_scratch);
arch/openrisc/kernel/entry.S +33 -26
70 lines not on this page · raw message
arch/openrisc/kernel/signal.c +106 -92
291 lines not on this page · raw message
arch/powerpc/include/asm/pte-hash64-64k.h +27 -5
@@ -40,17 +40,39 @@#ifndef __ASSEMBLY__ +#include <asm/barrier.h> /* for smp_rmb() */ +/* * With 64K pages on hash table, we have a special PTE format that * uses a second "half" of the page table to encode sub-page information * in order to deal with 64K made of 4K HW pages. Thus we override the * generic accessors and iterators here */ -#define __real_pte (e,p) ((real_pte_t) { \ - (e), (pte_val(e) & _PAGE_COMBO) ? \ - (pte_val(*((p) + PTRS_PER_PTE))) : 0 }) -#define __rpte_to_hidx (r,index) ((pte_val((r).pte) & _PAGE_COMBO) ? \ - (((r).hidx >> ((index)<<2)) & 0xf) : ((pte_val((r).pte) >> 12) & 0xf)) +#define __real_pte __real_pte +static inline real_pte_t __real_pte (pte_t pte,pte_t *ptep) +{ +real_pte_t rpte; + + rpte.pte = pte; + rpte.hidx =0 ; +if (pte_val (pte) & _PAGE_COMBO) { +/* +* Make sure we order the hidx load against the _PAGE_COMBO +* check. The store side ordering is done in __hash_page_4K +*/ +smp_rmb (); + rpte.hidx =pte_val (*((ptep) +PTRS_PER_PTE )); + } +return rpte; +} + +static inline unsigned long __rpte_to_hidx (real_pte_t rpte,unsigned long index) +{ +if ((pte_val (rpte.pte) & _PAGE_COMBO)) +return (rpte.hidx >> (index<<2 )) &0xf ; +return (pte_val (rpte.pte) >>12 ) &0xf ; +} +#define __rpte_to_pte (r) ((r).pte)#define __rpte_sub_valid (rpte, index) \ (pte_val(rpte.pte) & (_PAGE_HPTE_SUB0 >> (index)))
arch/powerpc/mm/numa.c +1 -1
@@ -586,8 +586,8 @@ static int __cpuinit cpu_numa_callback(struct notifier_block *nfb,case CPU_UP_CANCELED :case CPU_UP_CANCELED_FROZEN :unmap_cpu_from_node (lcpu); -break ; ret =NOTIFY_OK ; +break ;#endif }return ret;
arch/powerpc/platforms/pseries/hotplug-memory.c +1 -1
@@ -158,7 +158,7 @@ static int pseries_remove_memory(struct device_node *np)static inline int pseries_remove_memblock (unsigned long base,unsigned int memblock_size) { -return -EOPNOTSUPP ; +return 0 ; }static inline int pseries_remove_memory (struct device_node *np) {
block/blk-cgroup.c +7 -0
@@ -883,6 +883,13 @@ void blkcg_drain_queue(struct request_queue *q)if (!q->root_blkg)return ; +/* +* @q could be exiting and already have destroyed all blkgs as +* indicated by NULL root_blkg. If so, don't confuse policies. +*/ +if (!q->root_blkg) +return ; +blk_throtl_drain (q); }
drivers/acpi/acpica/utcopy.c +6 -0
@@ -998,5 +998,11 @@ acpi_ut_copy_iobject_to_iobject(union acpi_operand_object *source_desc, status =acpi_ut_copy_simple_object (source_desc, *dest_desc); } +/* Delete the allocated object if copy failed */ + +if (ACPI_FAILURE (status)) { +acpi_ut_remove_reference (*dest_desc); + } +return_ACPI_STATUS (status); }
drivers/acpi/processor_idle.c +2 -2
@@ -1101,9 +1101,9 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)if (pr->id ==0 &&cpuidle_get_driver () == &acpi_idle_driver) { -cpuidle_pause_and_lock ();/* Protect against cpu-hotplug */ get_online_cpus (); +cpuidle_pause_and_lock ();/* Disable all cpuidle devices */ for_each_online_cpu (cpu) {
@@ -1130,8 +1130,8 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)cpuidle_enable_device (dev); } } -put_online_cpus ();cpuidle_resume_and_unlock (); +put_online_cpus (); }return 0 ;
drivers/acpi/scan.c +10 -5
@@ -769,12 +769,17 @@ static void acpi_device_notify(acpi_handle handle, u32 event, void *data) device->driver->ops.notify (device, event); } -static acpi_status acpi_device_notify_fixed (void *data) +static void acpi_device_notify_fixed (void *data) {struct acpi_device *device = data;/* Fixed hardware devices have no handles */ acpi_device_notify (NULL ,ACPI_FIXED_HARDWARE_EVENT , device); +} + +static acpi_status acpi_device_fixed_event (void *data) +{ +acpi_os_execute (OSL_NOTIFY_HANDLER , acpi_device_notify_fixed, data);return AE_OK ; }
@@ -785,12 +790,12 @@ static int acpi_device_install_notify_handler(struct acpi_device *device)if (device->device_type ==ACPI_BUS_TYPE_POWER_BUTTON ) status =acpi_install_fixed_event_handler (ACPI_EVENT_POWER_BUTTON , - acpi_device_notify_fixed, + acpi_device_fixed_event, device);else if (device->device_type ==ACPI_BUS_TYPE_SLEEP_BUTTON ) status =acpi_install_fixed_event_handler (ACPI_EVENT_SLEEP_BUTTON , - acpi_device_notify_fixed, + acpi_device_fixed_event, device);else status = acpi_install_notify_handler(device->handle,
@@ -807,10 +812,10 @@ static void acpi_device_remove_notify_handler(struct acpi_device *device) {if (device->device_type ==ACPI_BUS_TYPE_POWER_BUTTON )acpi_remove_fixed_event_handler (ACPI_EVENT_POWER_BUTTON , - acpi_device_notify_fixed); + acpi_device_fixed_event);else if (device->device_type ==ACPI_BUS_TYPE_SLEEP_BUTTON )acpi_remove_fixed_event_handler (ACPI_EVENT_SLEEP_BUTTON , - acpi_device_notify_fixed); + acpi_device_fixed_event);else acpi_remove_notify_handler (device->handle,ACPI_DEVICE_NOTIFY , acpi_device_notify);
drivers/char/tpm/tpm.c +45 -24
100 lines not on this page · raw message
drivers/char/tpm/tpm.h +3 -0
@@ -95,6 +95,9 @@ struct tpm_vendor_specific {int (*send) (struct tpm_chip *,u8 *,size_t );void (*cancel) (struct tpm_chip *);u8 (*status) (struct tpm_chip *); +bool (*update_timeouts)(struct tpm_chip *chip, +unsigned long *timeout_cap); +void (*release) (struct device *);struct miscdevice miscdev;struct attribute_group *attr_group;
drivers/char/tpm/tpm_tis.c +31 -0
@@ -373,6 +373,36 @@ out_err:return rc; } +struct tis_vendor_timeout_override { +u32 did_vid; +unsigned long timeout_us[4 ]; +}; + +static const struct tis_vendor_timeout_override vendor_timeout_overrides[] = { +/* Atmel 3204 */ + {0x32041114 , { (TIS_SHORT_TIMEOUT *1000 ), (TIS_LONG_TIMEOUT *1000 ), + (TIS_SHORT_TIMEOUT *1000 ), (TIS_SHORT_TIMEOUT *1000 ) } }, +}; + +static bool tpm_tis_update_timeouts (struct tpm_chip *chip, +unsigned long *timeout_cap) +{ +int i; +u32 did_vid; + + did_vid =ioread32 (chip->vendor.iobase +TPM_DID_VID (0 )); + +for (i =0 ; i !=ARRAY_SIZE (vendor_timeout_overrides); i++) { +if (vendor_timeout_overrides[i].did_vid != did_vid) +continue ; +memcpy (timeout_cap, vendor_timeout_overrides[i].timeout_us, +sizeof (vendor_timeout_overrides[i].timeout_us)); +return true; + } + +return false; +} +/* * Early probing for iTPM with STS_DATA_EXPECT flaw. * Try sending command without itpm flag set and if that
@@ -475,6 +505,7 @@ static struct tpm_vendor_specific tpm_tis = { .recv = tpm_tis_recv, .send = tpm_tis_send, .cancel = tpm_tis_ready, + .update_timeouts = tpm_tis_update_timeouts, .req_complete_mask = TPM_STS_DATA_AVAIL | TPM_STS_VALID, .req_complete_val = TPM_STS_DATA_AVAIL | TPM_STS_VALID, .req_canceled = tpm_tis_req_canceled,
drivers/firmware/efi/vars.c +4 -4
@@ -481,7 +481,7 @@ EXPORT_SYMBOL_GPL(efivar_entry_remove);*/ static void efivar_entry_list_del_unlock (struct efivar_entry *entry) { -WARN_ON (!spin_is_locked (&__efivars->lock)); +lockdep_assert_held (&__efivars->lock);list_del (&entry->list);spin_unlock_irq (&__efivars->lock);
@@ -507,7 +507,7 @@ int __efivar_entry_delete(struct efivar_entry *entry)const struct efivar_operations *ops = __efivars->ops;efi_status_t status; -WARN_ON (!spin_is_locked (&__efivars->lock)); +lockdep_assert_held (&__efivars->lock); status = ops->set_variable(entry->var.VariableName, &entry->var.VendorGuid,
@@ -667,7 +667,7 @@ struct efivar_entry *efivar_entry_find(efi_char16_t *name, efi_guid_t guid,int strsize1, strsize2;bool found = false; -WARN_ON (!spin_is_locked (&__efivars->lock)); +lockdep_assert_held (&__efivars->lock);list_for_each_entry_safe (entry, n, head, list) { strsize1 =ucs2_strsize (name,1024 );
@@ -731,7 +731,7 @@ int __efivar_entry_get(struct efivar_entry *entry, u32 *attributes,const struct efivar_operations *ops = __efivars->ops;efi_status_t status; -WARN_ON (!spin_is_locked (&__efivars->lock)); +lockdep_assert_held (&__efivars->lock); status = ops->get_variable(entry->var.VariableName, &entry->var.VendorGuid,
drivers/infiniband/core/iwcm.c +27 -0
@@ -46,6 +46,7 @@#include <linux/completion.h> #include <linux/slab.h> #include <linux/module.h> +#include <linux/sysctl.h> #include <rdma/iw_cm.h> #include <rdma/ib_addr.h>
@@ -65,6 +66,20 @@ struct iwcm_work {struct list_head free_list; }; +static unsigned int default_backlog =256 ; + +static struct ctl_table_header *iwcm_ctl_table_hdr; +static struct ctl_table iwcm_ctl_table[] = { + { + .procname ="default_backlog" , + .data = &default_backlog, + .maxlen =sizeof (default_backlog), + .mode =0644 , + .proc_handler = proc_dointvec, + }, + { } +}; +/* * The following services provide a mechanism for pre-allocating iwcm_work * elements. The design pre-allocates them based on the cm_id type:
@@ -419,6 +434,9 @@ int iw_cm_listen(struct iw_cm_id *cm_id, int backlog) cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); +if (!backlog) + backlog = default_backlog; + ret =alloc_work_entries (cm_id_priv, backlog);if (ret)return ret;
@@ -1024,11 +1042,20 @@ static int __init iw_cm_init(void)if (!iwcm_wq)return -ENOMEM ; + iwcm_ctl_table_hdr =register_net_sysctl (&init_net,"net/iw_cm" , + iwcm_ctl_table); +if (!iwcm_ctl_table_hdr) { +pr_err ("iw_cm: couldn't register sysctl paths\n" ); +destroy_workqueue (iwcm_wq); +return -ENOMEM ; + } +return 0 ; } static void __exit iw_cm_cleanup(void) { +unregister_net_sysctl_table (iwcm_ctl_table_hdr);destroy_workqueue (iwcm_wq); }
drivers/infiniband/ulp/srp/ib_srp.c +28 -10
@@ -93,6 +93,7 @@ static void srp_send_completion(struct ib_cq *cq, void *target_ptr);static int srp_cm_handler (struct ib_cm_id *cm_id,struct ib_cm_event *event);static struct scsi_transport_template *ib_srp_transport_template; +static struct workqueue_struct *srp_remove_wq;static struct ib_client srp_client = { .name ="srp" ,
@@ -456,7 +457,7 @@ static bool srp_queue_remove_work(struct srp_target_port *target)spin_unlock_irq (&target->lock);if (changed) -queue_work (system_long_wq, &target->remove_work); +queue_work (srp_remove_wq, &target->remove_work);return changed; }
@@ -2530,9 +2531,10 @@ static void srp_remove_one(struct ib_device *device)spin_unlock (&host->target_lock);/* -* Wait for target port removal tasks. +* Wait for tl_err and target port removal tasks. */ flush_workqueue (system_long_wq); +flush_workqueue (srp_remove_wq);kfree (host); }
@@ -2577,16 +2579,22 @@ static int __init srp_init_module(void) indirect_sg_entries = cmd_sg_entries; } + srp_remove_wq =create_workqueue ("srp_remove" ); +if (IS_ERR (srp_remove_wq)) { + ret =PTR_ERR (srp_remove_wq); + goto out; + } + + ret = -ENOMEM ; ib_srp_transport_template =srp_attach_transport (&ib_srp_transport_functions);if (!ib_srp_transport_template) -return -ENOMEM ; + goto destroy_wq; ret =class_register (&srp_class);if (ret) {pr_err ("couldn't register class infiniband_srp\n" ); -srp_release_transport (ib_srp_transport_template); -return ret; + goto release_tr; }ib_sa_register_client (&srp_sa_client);
@@ -2594,13 +2602,22 @@ static int __init srp_init_module(void) ret =ib_register_client (&srp_client);if (ret) {pr_err ("couldn't register IB client\n" ); -srp_release_transport (ib_srp_transport_template); -ib_sa_unregister_client (&srp_sa_client); -class_unregister (&srp_class); -return ret; + goto unreg_sa; } -return 0 ; +out: +return ret; + +unreg_sa: +ib_sa_unregister_client (&srp_sa_client); +class_unregister (&srp_class); + +release_tr: +srp_release_transport (ib_srp_transport_template); + +destroy_wq: +destroy_workqueue (srp_remove_wq); + goto out; } static void __exit srp_cleanup_module(void)
@@ -2609,6 +2626,7 @@ static void __exit srp_cleanup_module(void)ib_sa_unregister_client (&srp_sa_client);class_unregister (&srp_class);srp_release_transport (ib_srp_transport_template); +destroy_workqueue (srp_remove_wq); }module_init (srp_init_module);
drivers/iommu/amd_iommu.c +6 -4
@@ -3187,14 +3187,16 @@ free_domains:static void cleanup_domain (struct protection_domain *domain) { -struct iommu_dev_data *dev_data, *next; +struct iommu_dev_data *entry;unsigned long flags;write_lock_irqsave (&amd_iommu_devtable_lock, flags); -list_for_each_entry_safe (dev_data, next, &domain->dev_list, list) { -__detach_device (dev_data); -atomic_set (&dev_data->bind,0 ); +while (!list_empty (&domain->dev_list)) { + entry =list_first_entry (&domain->dev_list, + struct iommu_dev_data, list); +__detach_device (entry); +atomic_set (&entry->bind,0 ); }write_unlock_irqrestore (&amd_iommu_devtable_lock, flags);
drivers/md/raid1.c +4 -4
@@ -1406,12 +1406,12 @@ static void error(struct mddev *mddev, struct md_rdev *rdev) mddev->degraded++;set_bit (Faulty, &rdev->flags);spin_unlock_irqrestore (&conf->device_lock, flags); -/* -* if recovery is running, make sure it aborts. -*/ -set_bit (MD_RECOVERY_INTR , &mddev->recovery); }else set_bit (Faulty, &rdev->flags); +/* +* if recovery is running, make sure it aborts. +*/ +set_bit (MD_RECOVERY_INTR , &mddev->recovery);set_bit (MD_CHANGE_DEVS , &mddev->flags);printk (KERN_ALERT "md/raid1:%s: Disk failure on %s, disabling device.\n"
drivers/md/raid10.c +6 -5
@@ -1681,11 +1681,11 @@ static void error(struct mddev *mddev, struct md_rdev *rdev)spin_lock_irqsave (&conf->device_lock, flags); mddev->degraded++;spin_unlock_irqrestore (&conf->device_lock, flags); -/* -* if recovery is running, make sure it aborts. -*/ -set_bit (MD_RECOVERY_INTR , &mddev->recovery); } +/* +* If recovery is running, make sure it aborts. +*/ +set_bit (MD_RECOVERY_INTR , &mddev->recovery);set_bit (Blocked, &rdev->flags);set_bit (Faulty, &rdev->flags);set_bit (MD_CHANGE_DEVS , &mddev->flags);
@@ -2948,6 +2948,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr,*/ if (test_bit (MD_RECOVERY_RESHAPE , &mddev->recovery)) {end_reshape (conf); +close_sync (conf);return 0 ; }
@@ -4398,7 +4399,7 @@ read_more: read_bio->bi_private = r10_bio; read_bio->bi_end_io = end_sync_read; read_bio->bi_rw =READ ; - read_bio->bi_flags &= ~(BIO_POOL_MASK -1 ); + read_bio->bi_flags &= (~0UL <<BIO_RESET_BITS ); read_bio->bi_flags |=1 <<BIO_UPTODATE ; read_bio->bi_vcnt =0 ; read_bio->bi_size =0 ;
drivers/md/raid5.c +2 -0
@@ -3561,6 +3561,8 @@ static void handle_stripe(struct stripe_head *sh)set_bit (R5_Wantwrite, &dev->flags);if (prexor)continue ; +if (s.failed >1 ) +continue ;if (!test_bit (R5_Insync, &dev->flags) || ((i == sh->pd_idx || i == sh->qd_idx) && s.failed ==0 ))
drivers/media/media-device.c +0 -2
@@ -106,8 +106,6 @@ static long media_device_enum_entities(struct media_device *mdev,if (ent->name) {strncpy (u_ent.name, ent->name,sizeof (u_ent.name)); u_ent.name[sizeof (u_ent.name) -1 ] ='\0' ; - }else { -memset (u_ent.name,0 ,sizeof (u_ent.name)); } u_ent.type = ent->type; u_ent.revision = ent->revision;
drivers/media/tuners/xc4000.c +11 -9
@@ -93,7 +93,7 @@ struct xc4000_priv {struct firmware_description *firm;int firm_size;u32 if_khz; -u32 freq_hz; +u32 freq_hz, freq_offset;u32 bandwidth;u8 video_standard;u8 rf_mode;
@@ -1157,14 +1157,14 @@ static int xc4000_set_params(struct dvb_frontend *fe)case SYS_ATSC :dprintk (1 ,"%s() VSB modulation\n" , __func__); priv->rf_mode =XC_RF_MODE_AIR ; - priv->freq_hz = c->frequency -1750000 ; + priv->freq_offset =1750000 ; priv->video_standard =XC4000_DTV6 ; type =DTV6 ;break ;case SYS_DVBC_ANNEX_B :dprintk (1 ,"%s() QAM modulation\n" , __func__); priv->rf_mode =XC_RF_MODE_CABLE ; - priv->freq_hz = c->frequency -1750000 ; + priv->freq_offset =1750000 ; priv->video_standard =XC4000_DTV6 ; type =DTV6 ;break ;
@@ -1173,23 +1173,23 @@ static int xc4000_set_params(struct dvb_frontend *fe)dprintk (1 ,"%s() OFDM\n" , __func__);if (bw ==0 ) {if (c->frequency <400000000 ) { - priv->freq_hz = c->frequency -2250000 ; + priv->freq_offset =2250000 ; }else { - priv->freq_hz = c->frequency -2750000 ; + priv->freq_offset =2750000 ; } priv->video_standard =XC4000_DTV7_8 ; type =DTV78 ; }else if (bw <=6000000 ) { priv->video_standard =XC4000_DTV6 ; - priv->freq_hz = c->frequency -1750000 ; + priv->freq_offset =1750000 ; type =DTV6 ; }else if (bw <=7000000 ) { priv->video_standard =XC4000_DTV7 ; - priv->freq_hz = c->frequency -2250000 ; + priv->freq_offset =2250000 ; type =DTV7 ; }else { priv->video_standard =XC4000_DTV8 ; - priv->freq_hz = c->frequency -2750000 ; + priv->freq_offset =2750000 ; type =DTV8 ; } priv->rf_mode =XC_RF_MODE_AIR ;
@@ -1200,6 +1200,8 @@ static int xc4000_set_params(struct dvb_frontend *fe) goto fail; } + priv->freq_hz = c->frequency - priv->freq_offset; +dprintk (1 ,"%s() frequency=%d (compensated)\n" , __func__, priv->freq_hz);
@@ -1520,7 +1522,7 @@ static int xc4000_get_frequency(struct dvb_frontend *fe, u32 *freq) {struct xc4000_priv *priv = fe->tuner_priv; - *freq = priv->freq_hz; + *freq = priv->freq_hz + priv->freq_offset;if (debug) {mutex_lock (&priv->lock);
drivers/media/tuners/xc5000.c +12 -10
@@ -55,7 +55,7 @@ struct xc5000_priv {u32 if_khz;u16 xtal_khz; -u32 freq_hz; +u32 freq_hz, freq_offset;u32 bandwidth;u8 video_standard;u8 rf_mode;
@@ -755,13 +755,13 @@ static int xc5000_set_params(struct dvb_frontend *fe)case SYS_ATSC :dprintk (1 ,"%s() VSB modulation\n" , __func__); priv->rf_mode =XC_RF_MODE_AIR ; - priv->freq_hz = freq -1750000 ; + priv->freq_offset =1750000 ; priv->video_standard =DTV6 ;break ;case SYS_DVBC_ANNEX_B :dprintk (1 ,"%s() QAM modulation\n" , __func__); priv->rf_mode =XC_RF_MODE_CABLE ; - priv->freq_hz = freq -1750000 ; + priv->freq_offset =1750000 ; priv->video_standard =DTV6 ;break ;case SYS_ISDBT :
@@ -776,15 +776,15 @@ static int xc5000_set_params(struct dvb_frontend *fe)switch (bw) {case 6000000 : priv->video_standard =DTV6 ; - priv->freq_hz = freq -1750000 ; + priv->freq_offset =1750000 ;break ;case 7000000 : priv->video_standard =DTV7 ; - priv->freq_hz = freq -2250000 ; + priv->freq_offset =2250000 ;break ;case 8000000 : priv->video_standard =DTV8 ; - priv->freq_hz = freq -2750000 ; + priv->freq_offset =2750000 ;break ;default :printk (KERN_ERR "xc5000 bandwidth not set!\n" );
@@ -798,15 +798,15 @@ static int xc5000_set_params(struct dvb_frontend *fe) priv->rf_mode =XC_RF_MODE_CABLE ;if (bw <=6000000 ) { priv->video_standard =DTV6 ; - priv->freq_hz = freq -1750000 ; + priv->freq_offset =1750000 ; b =6 ; }else if (bw <=7000000 ) { priv->video_standard =DTV7 ; - priv->freq_hz = freq -2250000 ; + priv->freq_offset =2250000 ; b =7 ; }else { priv->video_standard =DTV7_8 ; - priv->freq_hz = freq -2750000 ; + priv->freq_offset =2750000 ; b =8 ; } dprintk(1, "%s() Bandwidth %dMHz (%d)\n", __func__,
@@ -817,6 +817,8 @@ static int xc5000_set_params(struct dvb_frontend *fe)return -EINVAL ; } + priv->freq_hz = freq - priv->freq_offset; +dprintk (1 ,"%s() frequency=%d (compensated to %d)\n" , __func__, freq, priv->freq_hz);
@@ -1067,7 +1069,7 @@ static int xc5000_get_frequency(struct dvb_frontend *fe, u32 *freq) {struct xc5000_priv *priv = fe->tuner_priv;dprintk (1 ,"%s()\n" , __func__); - *freq = priv->freq_hz; + *freq = priv->freq_hz + priv->freq_offset;return 0 ; }
drivers/media/usb/au0828/au0828-video.c +17 -17
@@ -788,11 +788,27 @@ static int au0828_i2s_init(struct au0828_dev *dev)/* * Auvitek au0828 analog stream enable -* Please set interface0 to AS5 before enable the stream */ static int au0828_analog_stream_enable (struct au0828_dev *d) { +struct usb_interface *iface; +int ret; +dprintk (1 ,"au0828_analog_stream_enable called\n" ); + + iface =usb_ifnum_to_if (d->usbdev,0 ); +if (iface && iface->cur_altsetting->desc.bAlternateSetting !=5 ) { +dprintk (1 ,"Changing intf#0 to alt 5\n" ); +/* set au0828 interface0 to AS5 here again */ + ret =usb_set_interface (d->usbdev,0 ,5 ); +if (ret <0 ) { +printk (KERN_INFO "Au0828 can't set alt setting to 5!\n" ); +return -EBUSY ; + } + } + +/* FIXME: size should be calculated using d->width, d->height */ +au0828_writereg (d,AU0828_SENSORCTRL_VBI_103 ,0x00 );au0828_writereg (d,0x106 ,0x00 );/* set x position */
@@ -1003,15 +1019,6 @@ static int au0828_v4l2_open(struct file *filp)return -ERESTARTSYS ; }if (dev->users ==0 ) { -/* set au0828 interface0 to AS5 here again */ - ret =usb_set_interface (dev->usbdev,0 ,5 ); -if (ret <0 ) { -mutex_unlock (&dev->lock); -printk (KERN_INFO "Au0828 can't set alternate to 5!\n" ); -kfree (fh); -return -EBUSY ; - } -au0828_analog_stream_enable (dev);au0828_analog_stream_reset (dev);
@@ -1253,13 +1260,6 @@ static int au0828_set_format(struct au0828_dev *dev, unsigned int cmd, } } -/* set au0828 interface0 to AS5 here again */ - ret =usb_set_interface (dev->usbdev,0 ,5 ); -if (ret <0 ) { -printk (KERN_INFO "Au0828 can't set alt setting to 5!\n" ); -return -EBUSY ; - } -au0828_analog_stream_enable (dev);return 0 ;
drivers/mfd/omap-usb-host.c +1 -1
@@ -445,7 +445,7 @@ static unsigned omap_usbhs_rev1_hostconfig(struct usbhs_hcd_omap *omap,for (i =0 ; i < omap->nports; i++) {if (is_ehci_phy_mode (pdata->port_mode[i])) { - reg &=OMAP_UHH_HOSTCONFIG_ULPI_BYPASS ; + reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_BYPASS ;break ; } }
drivers/mtd/ftl.c +0 -1
@@ -1075,7 +1075,6 @@ static void ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)return ; } -ftl_freepart (partition);kfree (partition); }
drivers/mtd/nand/omap2.c +1 -1
@@ -948,7 +948,7 @@ static int omap_calculate_ecc(struct mtd_info *mtd, const u_char *dat,u32 val; val =readl (info->reg.gpmc_ecc_config); -if (((val >>ECC_CONFIG_CS_SHIFT ) & ~CS_MASK ) != info->gpmc_cs) +if (((val >>ECC_CONFIG_CS_SHIFT ) &CS_MASK ) != info->gpmc_cs)return -EINVAL ;/* read ecc result */
drivers/regulator/arizona-ldo1.c +0 -2
@@ -141,8 +141,6 @@ static struct regulator_ops arizona_ldo1_ops = { .map_voltage = regulator_map_voltage_linear, .get_voltage_sel = regulator_get_voltage_sel_regmap, .set_voltage_sel = regulator_set_voltage_sel_regmap, - .get_bypass = regulator_get_bypass_regmap, - .set_bypass = regulator_set_bypass_regmap, };static const struct regulator_desc arizona_ldo1 = {
drivers/scsi/bfa/bfa_ioc.h +1 -1
@@ -72,7 +72,7 @@ struct bfa_sge_s { } while (0)#define bfa_swap_words (_x) ( \ - ((_x) << 32) | ((_x) >> 32)) + ((u64)(_x) << 32) | ((u64)(_x) >> 32))#ifdef __BIG_ENDIAN#define bfa_sge_to_be (_x)
drivers/scsi/storvsc_drv.c +19 -0
@@ -33,6 +33,7 @@#include <linux/device.h> #include <linux/hyperv.h> #include <linux/mempool.h> +#include <linux/blkdev.h> #include <scsi/scsi.h> #include <scsi/scsi_cmnd.h> #include <scsi/scsi_host.h>
@@ -803,6 +804,13 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb,case ATA_12 :set_host_byte (scmnd,DID_PASSTHROUGH );break ; +/* +* On Some Windows hosts TEST_UNIT_READY command can return +* SRB_STATUS_ERROR, let the upper level code deal with it +* based on the sense information. +*/ +case TEST_UNIT_READY : +break ;default :set_host_byte (scmnd,DID_TARGET_FAILURE ); }
@@ -1285,6 +1293,16 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)return SUCCESS ; } +/* +* The host guarantees to respond to each command, although I/O latencies might +* be unbounded on Azure. Reset the timer unconditionally to give the host a +* chance to perform EH. +*/ +static enum blk_eh_timer_return storvsc_eh_timed_out (struct scsi_cmnd *scmnd) +{ +return BLK_EH_RESET_TIMER ; +} +static bool storvsc_scsi_cmd_ok (struct scsi_cmnd *scmnd) {bool allowed = true;
@@ -1444,6 +1462,7 @@ static struct scsi_host_template scsi_driver = { .bios_param = storvsc_get_chs, .queuecommand = storvsc_queuecommand, .eh_host_reset_handler = storvsc_host_reset_handler, + .eh_timed_out = storvsc_eh_timed_out, .slave_alloc = storvsc_device_alloc, .slave_destroy = storvsc_device_destroy, .slave_configure = storvsc_device_configure,
drivers/spi/spi-omap2-mcspi.c +14 -0
@@ -136,6 +136,7 @@ struct omap2_mcspi_cs {void __iomem *base;unsigned long phys;int word_len; +u16 mode;struct list_head node;/* Context save and restore shadow register */ u32 chconf0;
@@ -801,6 +802,8 @@ static int omap2_mcspi_setup_transfer(struct spi_device *spi,mcspi_write_chconf0 (spi, l); + cs->mode = spi->mode; + dev_dbg(&spi->dev, "setup: speed %d, sample %s edge, clk %s\n", OMAP2_MCSPI_MAX_FREQ >> div, (spi->mode & SPI_CPHA) ? "trailing" : "leading",
@@ -871,6 +874,7 @@ static int omap2_mcspi_setup(struct spi_device *spi)return -ENOMEM ; cs->base = mcspi->base + spi->chip_select *0x14 ; cs->phys = mcspi->phys + spi->chip_select *0x14 ; + cs->mode =0 ; cs->chconf0 =0 ; spi->controller_state = cs;/* Link this to context save list */
@@ -1043,6 +1047,16 @@ static void omap2_mcspi_work(struct omap2_mcspi *mcspi, struct spi_message *m)mcspi_read_cs_reg (spi,OMAP2_MCSPI_MODULCTRL ); } +/* +* The slave driver could have changed spi->mode in which case +* it will be different from cs->mode (the current hardware setup). +* If so, set par_override (even though its not a parity issue) so +* omap2_mcspi_setup_transfer will be called to configure the hardware +* with the correct mode on the first iteration of the loop below. +*/ +if (spi->mode != cs->mode) + par_override =1 ; +omap2_mcspi_set_enable (spi,0 ); m->status = status;
drivers/spi/spi-orion.c +4 -6
@@ -403,8 +403,6 @@ static int orion_spi_probe(struct platform_device *pdev)struct resource *r;unsigned long tclk_hz;int status =0 ; -const u32 *iprop; -int size; master =spi_alloc_master (&pdev->dev,sizeof *spi);if (master ==NULL ) {
@@ -415,10 +413,10 @@ static int orion_spi_probe(struct platform_device *pdev)if (pdev->id !=-1 ) master->bus_num = pdev->id;if (pdev->dev.of_node) { - iprop =of_get_property (pdev->dev.of_node,"cell-index" , - &size); -if (iprop && size ==sizeof (*iprop)) - master->bus_num = *iprop; +u32 cell_index; +if (!of_property_read_u32 (pdev->dev.of_node,"cell-index" , + &cell_index)) + master->bus_num = cell_index; }/* we support only mode 0, and no options */
fs/cifs/cifsglob.h +0 -5
@@ -74,11 +74,6 @@#define SERVER_NAME_LENGTH 40#define SERVER_NAME_LEN_WITH_NULL (SERVER_NAME_LENGTH + 1) -/* used to define string lengths for reversing unicode strings */ -/* (256+1)*2 = 514 */ -/* (max path length + 1 for null) * 2 for unicode */ -#define MAX_NAME 514 -/* SMB echo "timeout" -- FIXME: tunable? */ #define SMB_ECHO_INTERVAL (60 * HZ)
fs/cifs/file.c +2 -2
@@ -2809,7 +2809,7 @@ cifs_uncached_read_into_pages(struct TCP_Server_Info *server, total_read += result; } -return total_read >0 ? total_read : result; +return total_read >0 && result != -EAGAIN ? total_read : result; } static ssize_t
@@ -3232,7 +3232,7 @@ cifs_readpages_read_into_pages(struct TCP_Server_Info *server, total_read += result; } -return total_read >0 ? total_read : result; +return total_read >0 && result != -EAGAIN ? total_read : result; } static int cifs_readpages(struct file *file, struct address_space *mapping,
fs/cifs/inode.c +6 -0
@@ -1647,6 +1647,12 @@ unlink_target: target_dentry, to_name); } +/* force revalidate to go get info when needed */ +CIFS_I (source_dir)->time =CIFS_I (target_dir)->time =0 ; + + source_dir->i_ctime = source_dir->i_mtime = target_dir->i_ctime = + target_dir->i_mtime =current_fs_time (source_dir->i_sb); + cifs_rename_exit:kfree (info_buf_source);kfree (from_name);
fs/cifs/readdir.c +2 -2
@@ -585,8 +585,8 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon,if (!cfile->srch_inf.endOfSearch && !cfile->invalidHandle) { cfile->invalidHandle = true;spin_unlock (&cifs_file_list_lock); -if (server->ops->close) - server->ops->close (xid, tcon, &cfile->fid); +if (server->ops->close_dir) + server->ops->close_dir (xid, tcon, &cfile->fid); }else spin_unlock (&cifs_file_list_lock);if (cfile->srch_inf.ntwrk_buf_start) {
fs/cifs/smb2file.c +1 -1
@@ -73,7 +73,7 @@ smb2_open_file(const unsigned int xid, struct cifs_tcon *tcon, const char *path, goto out; } - smb2_data =kzalloc (sizeof (struct smb2_file_all_info ) +MAX_NAME *2 , + smb2_data =kzalloc (sizeof (struct smb2_file_all_info ) +PATH_MAX *2 ,GFP_KERNEL );if (smb2_data ==NULL ) { rc = -ENOMEM ;
fs/cifs/smb2inode.c +1 -1
@@ -123,7 +123,7 @@ smb2_query_path_info(const unsigned int xid, struct cifs_tcon *tcon, *adjust_tz = false; - smb2_data =kzalloc (sizeof (struct smb2_file_all_info ) +MAX_NAME *2 , + smb2_data =kzalloc (sizeof (struct smb2_file_all_info ) +PATH_MAX *2 ,GFP_KERNEL );if (smb2_data ==NULL )return -ENOMEM ;
fs/cifs/smb2maperror.c +1 -1
@@ -605,7 +605,7 @@ static const struct status_to_posix_error smb2_error_map_table[] = { {STATUS_MAPPED_FILE_SIZE_ZERO, -EIO, "STATUS_MAPPED_FILE_SIZE_ZERO"}, {STATUS_TOO_MANY_OPENED_FILES, -EMFILE, "STATUS_TOO_MANY_OPENED_FILES"}, {STATUS_CANCELLED, -EIO, "STATUS_CANCELLED"}, - {STATUS_CANNOT_DELETE, -EIO, "STATUS_CANNOT_DELETE"}, + {STATUS_CANNOT_DELETE, -EACCES, "STATUS_CANNOT_DELETE"}, {STATUS_INVALID_COMPUTER_NAME, -EIO, "STATUS_INVALID_COMPUTER_NAME"}, {STATUS_FILE_DELETED, -EIO, "STATUS_FILE_DELETED"}, {STATUS_SPECIAL_ACCOUNT, -EIO, "STATUS_SPECIAL_ACCOUNT"},
fs/cifs/smb2ops.c +1 -1
@@ -243,7 +243,7 @@ smb2_query_file_info(const unsigned int xid, struct cifs_tcon *tcon,int rc;struct smb2_file_all_info *smb2_data; - smb2_data =kzalloc (sizeof (struct smb2_file_all_info ) +MAX_NAME *2 , + smb2_data =kzalloc (sizeof (struct smb2_file_all_info ) +PATH_MAX *2 ,GFP_KERNEL );if (smb2_data ==NULL )return -ENOMEM ;
fs/cifs/smb2pdu.c +3 -2
@@ -809,7 +809,8 @@ tcon_exit: tcon_error_exit:if (rsp->hdr.Status ==STATUS_BAD_NETWORK_NAME ) {cifs_dbg (VFS ,"BAD_NETWORK_NAME: %s\n" , tree); - tcon->bad_network_name = true; +if (tcon) + tcon->bad_network_name = true; } goto tcon_exit; }
@@ -1203,7 +1204,7 @@ SMB2_query_info(const unsigned int xid, struct cifs_tcon *tcon, {return query_info (xid, tcon, persistent_fid, volatile_fid,FILE_ALL_INFORMATION , -sizeof (struct smb2_file_all_info ) +MAX_NAME *2 , +sizeof (struct smb2_file_all_info ) +PATH_MAX *2 ,sizeof (struct smb2_file_all_info ), data); }
fs/dcache.c +1 -4
@@ -96,8 +96,6 @@ static struct kmem_cache *dentry_cache __read_mostly;* This hash-function tries to avoid losing too many bits of hash * information, yet avoid using a prime hash-size or similar. */ -#define D_HASHBITS d_hash_shift -#define D_HASHMASK d_hash_maskstatic unsigned int d_hash_mask__read_mostly ;static unsigned int d_hash_shift__read_mostly ;
@@ -108,8 +106,7 @@ static inline struct hlist_bl_head *d_hash(const struct dentry *parent, unsigned int hash) { hash += (unsigned long ) parent /L1_CACHE_BYTES ; - hash = hash + (hash >>D_HASHBITS ); -return dentry_hashtable + (hash &D_HASHMASK ); +return dentry_hashtable +hash_32 (hash, d_hash_shift); }/* Statistics gathering. */
fs/namei.c +2 -2
@@ -34,6 +34,7 @@#include <linux/device_cgroup.h> #include <linux/fs_struct.h> #include <linux/posix_acl.h> +#include <linux/hash.h> #include <asm/uaccess.h> #include "internal.h"
@@ -1647,8 +1648,7 @@ static inline int can_lookup(struct inode *inode)static inline unsigned int fold_hash (unsigned long hash) { - hash += hash >> (8 *sizeof (int )); -return hash; +return hash_64 (hash,32 ); }#else /* 32-bit case */
fs/namespace.c +52 -7
95 lines not on this page · raw message
fs/proc/array.c +1 -10
@@ -304,15 +304,11 @@ static void render_cap_t(struct seq_file *m, const char *header,seq_puts (m, header);CAP_FOR_EACH_U32 (__capi) {seq_printf (m,"%08x" , - a->cap[(_KERNEL_CAPABILITY_U32S-1 ) - __capi]); + a->cap[CAP_LAST_U32 - __capi]); }seq_putc (m,'\n' ); } -/* Remove non-existent capabilities */ -#define NORM_CAPS (v) (v.cap[CAP_TO_INDEX(CAP_LAST_CAP)] &= \ - CAP_TO_MASK(CAP_LAST_CAP + 1) - 1) -static inline void task_cap (struct seq_file *m,struct task_struct *p) {const struct cred *cred;
@@ -326,11 +322,6 @@ static inline void task_cap(struct seq_file *m, struct task_struct *p) cap_bset = cred->cap_bset;rcu_read_unlock (); -NORM_CAPS (cap_inheritable); -NORM_CAPS (cap_permitted); -NORM_CAPS (cap_effective); -NORM_CAPS (cap_bset); -render_cap_t (m,"CapInh:\t" , &cap_inheritable);render_cap_t (m,"CapPrm:\t" , &cap_permitted);render_cap_t (m,"CapEff:\t" , &cap_effective);
fs/xfs/xfs_aops.c +61 -0
72 lines not on this page · raw message
fs/xfs/xfs_dquot.c +2 -1
@@ -1104,7 +1104,8 @@ xfs_qm_dqflush(* Get the buffer containing the on-disk dquot */ error =xfs_trans_read_buf (mp,NULL , mp->m_ddev_targp, dqp->q_blkno, - mp->m_quotainfo->qi_dqchunklen,0 , &bp,NULL ); + mp->m_quotainfo->qi_dqchunklen,0 , &bp, + &xfs_dquot_buf_ops);if (error) goto out_unlock;
fs/xfs/xfs_file.c +19 -2
@@ -298,7 +298,16 @@ xfs_file_aio_read(xfs_rw_iunlock (ip,XFS_IOLOCK_EXCL );return ret; } -truncate_pagecache_range (VFS_I (ip), pos,-1 ); + +/* +* Invalidate whole pages. This can return an error if +* we fail to invalidate a page, but this should never +* happen on XFS. Warn if it does fail. +*/ + ret =invalidate_inode_pages2_range (VFS_I (ip)->i_mapping, + pos >>PAGE_CACHE_SHIFT ,-1 ); +WARN_ON_ONCE (ret); + ret =0 ; }xfs_rw_ilock_demote (ip,XFS_IOLOCK_EXCL ); }
@@ -677,7 +686,15 @@ xfs_file_dio_aio_write( pos, -1);if (ret) goto out; -truncate_pagecache_range (VFS_I (ip), pos,-1 ); +/* +* Invalidate whole pages. This can return an error if +* we fail to invalidate a page, but this should never +* happen on XFS. Warn if it does fail. +*/ + ret =invalidate_inode_pages2_range (VFS_I (ip)->i_mapping, + pos >>PAGE_CACHE_SHIFT ,-1 ); +WARN_ON_ONCE (ret); + ret =0 ; }/*
fs/xfs/xfs_qm.c +7 -1
@@ -935,6 +935,12 @@ xfs_qm_dqiter_bufs(if (error)break ; +/* +* A corrupt buffer might not have a verifier attached, so +* make sure we have the correct one attached before writeback +* occurs. +*/ + bp->b_ops = &xfs_dquot_buf_ops;xfs_qm_reset_dqcounts (mp, bp, firstid, type);xfs_buf_delwri_queue (bp, buffer_list);xfs_buf_relse (bp);
@@ -1018,7 +1024,7 @@ xfs_qm_dqiterate(xfs_buf_readahead (mp->m_ddev_targp,XFS_FSB_TO_DADDR (mp, rablkno), mp->m_quotainfo->qi_dqchunklen, -NULL ); + &xfs_dquot_buf_ops); rablkno++; } }
include/linux/capability.h +4 -1
@@ -78,8 +78,11 @@ extern const kernel_cap_t __cap_init_eff_set;# error Fix up hand-coded capability macro initializers#else /* HAND-CODED capability initializers */ +#define CAP_LAST_U32 ((_KERNEL_CAPABILITY_U32S) - 1) +#define CAP_LAST_U32_VALID_MASK (CAP_TO_MASK(CAP_LAST_CAP + 1) -1) +# define CAP_EMPTY_SET ((kernel_cap_t){{ 0, 0 }}) -# define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }}) +# define CAP_FULL_SET ((kernel_cap_t){{ ~0, CAP_LAST_U32_VALID_MASK }})# define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \ | CAP_TO_MASK(CAP_LINUX_IMMUTABLE), \ CAP_FS_MASK_B1 } })
include/linux/ceph/messenger.h +1 -1
@@ -157,7 +157,7 @@ struct ceph_msg {bool front_is_vmalloc;bool more_to_follow;bool needs_out_seq; -int front_max; +int front_alloc_len;unsigned long ack_stamp;/* tx: when we were acked */ struct ceph_msgpool *pool;
include/linux/mount.h +8 -1
@@ -42,11 +42,18 @@ struct mnt_namespace;* flag, consider how it interacts with shared mounts. */ #define MNT_SHARED_MASK (MNT_UNBINDABLE) -#define MNT_PROPAGATION_MASK (MNT_SHARED | MNT_UNBINDABLE) +#define MNT_USER_SETTABLE_MASK (MNT_NOSUID | MNT_NODEV | MNT_NOEXEC \ + | MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME \ + | MNT_READONLY) +#define MNT_ATIME_MASK (MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME )#define MNT_INTERNAL 0x4000 +#define MNT_LOCK_ATIME 0x040000 +#define MNT_LOCK_NOEXEC 0x080000 +#define MNT_LOCK_NOSUID 0x100000 +#define MNT_LOCK_NODEV 0x200000#define MNT_LOCK_READONLY 0x400000struct vfsmount {
kernel/audit.c +1 -1
@@ -1412,7 +1412,7 @@ void audit_log_cap(struct audit_buffer *ab, char *prefix, kernel_cap_t *cap)audit_log_format (ab," %s=" , prefix);CAP_FOR_EACH_U32 (i) {audit_log_format (ab,"%08x" , - cap->cap[(_KERNEL_CAPABILITY_U32S-1 ) - i]); + cap->cap[CAP_LAST_U32 - i]); } }
kernel/capability.c +4 -0
@@ -268,6 +268,10 @@ SYSCALL_DEFINE2(capset, cap_user_header_t, header, const cap_user_data_t, data) i++; } + effective.cap[CAP_LAST_U32 ] &=CAP_LAST_U32_VALID_MASK ; + permitted.cap[CAP_LAST_U32 ] &=CAP_LAST_U32_VALID_MASK ; + inheritable.cap[CAP_LAST_U32 ] &=CAP_LAST_U32_VALID_MASK ; + new =prepare_creds ();if (!new)return -ENOMEM ;
kernel/smp.c +1 -1
@@ -658,7 +658,7 @@ void on_each_cpu_cond(bool (*cond_func)(int cpu, void *info),if (cond_func (cpu, info)) { ret =smp_call_function_single (cpu, func, info, wait); -WARN_ON_ONCE (!ret); +WARN_ON_ONCE (ret); }preempt_enable (); }
kernel/trace/ring_buffer.c +14 -17
@@ -1980,7 +1980,7 @@ rb_add_time_stamp(struct ring_buffer_event *event, u64 delta)/** * rb_update_event - update event type and data -* @event: the even to update +* @event: the event to update * @type: the type of event * @length: the size of the event field in the ring buffer *
@@ -3353,21 +3353,16 @@ static void rb_iter_reset(struct ring_buffer_iter *iter)struct ring_buffer_per_cpu *cpu_buffer = iter->cpu_buffer;/* Iterator usage is expected to have record disabled */ -if (list_empty (&cpu_buffer->reader_page->list)) { - iter->head_page =rb_set_head_page (cpu_buffer); -if (unlikely (!iter->head_page)) -return ; - iter->head = iter->head_page->read; - }else { - iter->head_page = cpu_buffer->reader_page; - iter->head = cpu_buffer->reader_page->read; - } + iter->head_page = cpu_buffer->reader_page; + iter->head = cpu_buffer->reader_page->read; + + iter->cache_reader_page = iter->head_page; + iter->cache_read = iter->head; +if (iter->head) iter->read_stamp = cpu_buffer->read_stamp;else iter->read_stamp = iter->head_page->page->time_stamp; - iter->cache_reader_page = cpu_buffer->reader_page; - iter->cache_read = cpu_buffer->read; }/**
@@ -3760,12 +3755,14 @@ rb_iter_peek(struct ring_buffer_iter *iter, u64 *ts)return NULL ;/* -* We repeat when a time extend is encountered. -* Since the time extend is always attached to a data event, -* we should never loop more than once. -* (We never hit the following condition more than twice). +* We repeat when a time extend is encountered or we hit +* the end of the page. Since the time extend is always attached +* to a data event, we should never loop more than three times. +* Once for going to next page, once on time extend, and +* finally once to get the event. +* (We never hit the following condition more than thrice). */ -if (RB_WARN_ON (cpu_buffer, ++nr_loops >2 )) +if (RB_WARN_ON (cpu_buffer, ++nr_loops >3 ))return NULL ;if (rb_per_cpu_empty (cpu_buffer))
net/bluetooth/l2cap_sock.c +2 -1
@@ -887,7 +887,8 @@ static int l2cap_sock_shutdown(struct socket *sock, int how)l2cap_chan_close (chan,0 );lock_sock (sk); -if (sock_flag (sk,SOCK_LINGER ) && sk->sk_lingertime) +if (sock_flag (sk,SOCK_LINGER ) && sk->sk_lingertime && + !(current->flags &PF_EXITING )) err =bt_sock_wait_state (sk,BT_CLOSED , sk->sk_lingertime); }
net/bluetooth/rfcomm/core.c +5 -2
@@ -1857,10 +1857,13 @@ static struct rfcomm_session *rfcomm_process_rx(struct rfcomm_session *s)/* Get data directly from socket receive queue without copying it. */ while ((skb =skb_dequeue (&sk->sk_receive_queue))) {skb_orphan (skb); -if (!skb_linearize (skb)) +if (!skb_linearize (skb)) { s =rfcomm_recv_frame (s, skb); -else +if (!s) +break ; + }else {kfree_skb (skb); + } }if (s && (sk->sk_state ==BT_CLOSED ))
net/bluetooth/rfcomm/sock.c +2 -1
@@ -887,7 +887,8 @@ static int rfcomm_sock_shutdown(struct socket *sock, int how) sk->sk_shutdown =SHUTDOWN_MASK ;__rfcomm_sock_close (sk); -if (sock_flag (sk,SOCK_LINGER ) && sk->sk_lingertime) +if (sock_flag (sk,SOCK_LINGER ) && sk->sk_lingertime && + !(current->flags &PF_EXITING )) err =bt_sock_wait_state (sk,BT_CLOSED , sk->sk_lingertime); }release_sock (sk);
net/bluetooth/sco.c +4 -2
@@ -858,7 +858,8 @@ static int sco_sock_shutdown(struct socket *sock, int how)sco_sock_clear_timer (sk);__sco_sock_close (sk); -if (sock_flag (sk,SOCK_LINGER ) && sk->sk_lingertime) +if (sock_flag (sk,SOCK_LINGER ) && sk->sk_lingertime && + !(current->flags &PF_EXITING )) err =bt_sock_wait_state (sk,BT_CLOSED , sk->sk_lingertime); }
@@ -878,7 +879,8 @@ static int sco_sock_release(struct socket *sock)sco_sock_close (sk); -if (sock_flag (sk,SOCK_LINGER ) && sk->sk_lingertime) { +if (sock_flag (sk,SOCK_LINGER ) && sk->sk_lingertime && + !(current->flags &PF_EXITING )) {lock_sock (sk); err =bt_sock_wait_state (sk,BT_CLOSED , sk->sk_lingertime);release_sock (sk);
net/ceph/auth_x.c +135 -121
316 lines not on this page · raw message
net/ceph/messenger.c +4 -4
@@ -904,7 +904,7 @@ static void ceph_msg_data_pages_cursor_init(struct ceph_msg_data_cursor *cursor,BUG_ON (page_count > (int )USHRT_MAX ); cursor->page_count = (unsigned short )page_count;BUG_ON (length >SIZE_MAX - cursor->page_offset); - cursor->last_piece = (size_t )cursor->page_offset + length <=PAGE_SIZE ; + cursor->last_piece = cursor->page_offset + cursor->resid <=PAGE_SIZE ; } static struct page *
@@ -3144,7 +3144,7 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags,INIT_LIST_HEAD (&m->data);/* front */ - m->front_max = front_len; + m->front_alloc_len = front_len;if (front_len) {if (front_len >PAGE_CACHE_SIZE ) { m->front.iov_base = __vmalloc(front_len, flags,
@@ -3319,8 +3319,8 @@ EXPORT_SYMBOL(ceph_msg_last_put);void ceph_msg_dump (struct ceph_msg *msg) { -pr_debug ("msg_dump %p (front_max %d length %zd)\n" , msg, - msg->front_max, msg->data_length); +pr_debug ("msg_dump %p (front_alloc_len %d length %zd)\n" , msg, + msg->front_alloc_len, msg->data_length);print_hex_dump (KERN_DEBUG ,"header: " ,DUMP_PREFIX_OFFSET ,16 ,1 , &msg->hdr,sizeof (msg->hdr), true);
net/ceph/mon_client.c +12 -4
@@ -152,7 +152,7 @@ static int __open_session(struct ceph_mon_client *monc)/* initiatiate authentication handshake */ ret =ceph_auth_build_hello (monc->auth, monc->m_auth->front.iov_base, - monc->m_auth->front_max); + monc->m_auth->front_alloc_len);__send_prepared_auth_request (monc, ret); }else {dout ("open_session mon%d already open\n" , monc->cur_mon);
@@ -196,7 +196,7 @@ static void __send_subscribe(struct ceph_mon_client *monc)int num; p = msg->front.iov_base; - end = p + msg->front_max; + end = p + msg->front_alloc_len; num =1 + !!monc->want_next_osdmap + !!monc->want_mdsmap;ceph_encode_32 (&p, num);
@@ -897,7 +897,7 @@ static void handle_auth_reply(struct ceph_mon_client *monc, ret =ceph_handle_auth_reply (monc->auth, msg->front.iov_base, msg->front.iov_len, monc->m_auth->front.iov_base, - monc->m_auth->front_max); + monc->m_auth->front_alloc_len);if (ret <0 ) { monc->client->auth_err = ret;wake_up_all (&monc->client->auth_wq);
@@ -939,7 +939,7 @@ static int __validate_auth(struct ceph_mon_client *monc)return 0 ; ret =ceph_build_auth (monc->auth, monc->m_auth->front.iov_base, - monc->m_auth->front_max); + monc->m_auth->front_alloc_len);if (ret <=0 )return ret;/* either an error, or no need to authenticate */ __send_prepared_auth_request (monc, ret);
@@ -1041,7 +1041,15 @@ static struct ceph_msg *mon_alloc_msg(struct ceph_connection *con,if (!m) {pr_info ("alloc_msg unknown type %d\n" , type); *skip =1 ; + }else if (front_len > m->front_alloc_len) { +pr_warning ("mon_alloc_msg front %d > prealloc %d (%u#%llu)\n" , + front_len, m->front_alloc_len, + (unsigned int )con->peer_name.type, +le64_to_cpu (con->peer_name.num)); +ceph_msg_put (m); + m =ceph_msg_new (type, front_len,GFP_NOFS , false); } +return m; }
security/commoncap.c +3 -0
@@ -421,6 +421,9 @@ int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data cpu_caps->inheritable.cap[i] =le32_to_cpu (caps.data[i].inheritable); } + cpu_caps->permitted.cap[CAP_LAST_U32 ] &=CAP_LAST_U32_VALID_MASK ; + cpu_caps->inheritable.cap[CAP_LAST_U32 ] &=CAP_LAST_U32_VALID_MASK ; +return 0 ; }
sound/soc/codecs/max98090.c +1 -1
@@ -2234,7 +2234,7 @@ static int max98090_probe(struct snd_soc_codec *codec)/* Register for interrupts */ dev_dbg (codec->dev,"irq = %d\n" , max98090->irq); - ret =request_threaded_irq (max98090->irq,NULL , + ret =devm_request_threaded_irq (codec->dev, max98090->irq,NULL , max98090_interrupt,IRQF_TRIGGER_FALLING |IRQF_ONESHOT ,"max98090_interrupt" , codec);if (ret <0 ) {
sound/soc/codecs/wm_adsp.c +2 -0
@@ -1284,3 +1284,5 @@ int wm_adsp2_init(struct wm_adsp *adsp, bool dvfs)return 0 ; }EXPORT_SYMBOL_GPL (wm_adsp2_init); + +MODULE_LICENSE ("GPL v2" );
sound/soc/pxa/pxa-ssp.c +1 -3
@@ -757,9 +757,7 @@ static int pxa_ssp_remove(struct snd_soc_dai *dai) SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \ SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) -#define PXA_SSP_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\ - SNDRV_PCM_FMTBIT_S24_LE | \ - SNDRV_PCM_FMTBIT_S32_LE) +#define PXA_SSP_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE)static const struct snd_soc_dai_ops pxa_ssp_dai_ops = { .startup = pxa_ssp_startup,
sound/soc/samsung/i2s.c +6 -10
@@ -853,11 +853,9 @@ static int i2s_suspend(struct snd_soc_dai *dai) {struct i2s_dai *i2s =to_info (dai); -if (dai->active) { - i2s->suspend_i2smod =readl (i2s->addr +I2SMOD ); - i2s->suspend_i2scon =readl (i2s->addr +I2SCON ); - i2s->suspend_i2spsr =readl (i2s->addr +I2SPSR ); - } + i2s->suspend_i2smod =readl (i2s->addr +I2SMOD ); + i2s->suspend_i2scon =readl (i2s->addr +I2SCON ); + i2s->suspend_i2spsr =readl (i2s->addr +I2SPSR );return 0 ; }
@@ -866,11 +864,9 @@ static int i2s_resume(struct snd_soc_dai *dai) {struct i2s_dai *i2s =to_info (dai); -if (dai->active) { -writel (i2s->suspend_i2scon, i2s->addr +I2SCON ); -writel (i2s->suspend_i2smod, i2s->addr +I2SMOD ); -writel (i2s->suspend_i2spsr, i2s->addr +I2SPSR ); - } +writel (i2s->suspend_i2scon, i2s->addr +I2SCON ); +writel (i2s->suspend_i2smod, i2s->addr +I2SMOD ); +writel (i2s->suspend_i2spsr, i2s->addr +I2SPSR );return 0 ; }
sound/soc/soc-pcm.c +1 -0
@@ -1886,6 +1886,7 @@ int soc_dpcm_runtime_update(struct snd_soc_dapm_widget *widget)dpcm_be_disconnect (fe,SNDRV_PCM_STREAM_PLAYBACK ); } +dpcm_path_put (&list); capture:/* skip if FE doesn't have capture capability */ if (!fe->cpu_dai->driver->capture.channels_min)
tools/testing/selftests/Makefile +1 -0
@@ -4,6 +4,7 @@ TARGETS += efivarfs TARGETS += kcmp TARGETS += memory-hotplug TARGETS += mqueue +TARGETS += mount TARGETS += net TARGETS += ptrace TARGETS += vm
tools/testing/selftests/mount/Makefile new file +17 -0
@@ -0,0 +1,17 @@ +# Makefile for mount selftests. + +all: unprivileged-remount-test + +unprivileged-remount-test: unprivileged-remount-test.c + gcc -Wall -O2 unprivileged-remount-test.c -o unprivileged-remount-test + +# Allow specific tests to be selected. +test_unprivileged_remount: unprivileged-remount-test + @if [ -f /proc/self/uid_map ] ; then ./unprivileged-remount-test ; fi + +run_tests: all test_unprivileged_remount + +clean: + rm -f unprivileged-remount-test + +.PHONY: all test_unprivileged_remount
tools/testing/selftests/mount/unprivileged-remount-test.c new file +242 -0
219 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.