Skip to contentSkip to conversation

Linux 3.10.17

DISCUSSION Greg KH 1 participant 2 messages Oct 18, 2013 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 3.10.17 kernel.

All users of the 3.10 kernel series must upgrade.

The updated 3.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.10.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Makefile                                |    2 
 arch/arc/include/asm/delay.h            |    5 
 arch/arc/include/asm/sections.h         |    1 
 arch/arc/include/asm/spinlock.h         |    9 
 arch/arc/include/asm/uaccess.h          |    4 
 arch/arc/kernel/head.S                  |    7 
 arch/arc/kernel/irq.c                   |    3 
 arch/arc/kernel/ptrace.c                |    2 
 arch/arc/kernel/setup.c                 |    3 
 arch/arc/kernel/signal.c                |   25 -
 arch/arc/kernel/unaligned.c             |    6 
 arch/arm/include/asm/jump_label.h       |    2 
 arch/arm/kernel/process.c               |    2 
 arch/mips/include/asm/jump_label.h      |    2 
 arch/parisc/kernel/traps.c              |    6 
 arch/powerpc/include/asm/jump_label.h   |    2 
 arch/powerpc/kvm/book3s_hv_rmhandlers.S |    2 
 arch/s390/include/asm/jump_label.h      |    2 
 arch/sparc/include/asm/jump_label.h     |    2 
 arch/x86/include/asm/cpufeature.h       |    2 
 arch/x86/include/asm/e820.h             |    2 
 arch/x86/include/asm/jump_label.h       |    2 
 arch/x86/kernel/e820.c                  |    5 
 arch/x86/kernel/setup.c                 |   19 
 drivers/char/random.c                   |    3 
 drivers/gpu/drm/i915/intel_display.c    |    8 
 drivers/gpu/drm/radeon/evergreen.c      |    2 
 drivers/gpu/drm/radeon/evergreend.h     |    4 
 drivers/gpu/drm/radeon/r600d.h          |    2 
 drivers/gpu/drm/radeon/radeon_test.c    |    4 
 drivers/gpu/drm/radeon/sid.h            |    4 
 drivers/hwmon/applesmc.c                |   13 
 drivers/i2c/busses/i2c-omap.c           |    3 
 drivers/watchdog/ts72xx_wdt.c           |    3 
 fs/btrfs/inode.c                        |    2 
 fs/dcache.c                             |   11 
 fs/ext4/xattr.c                         |    2 
 fs/hugetlbfs/inode.c                    |    8 
 fs/statfs.c                             |    2 
 include/linux/compiler-gcc4.h           |   15 
 include/linux/dcache.h                  |    1 
 include/linux/ipc_namespace.h           |    2 
 include/linux/random.h                  |    1 
 include/linux/sem.h                     |    6 
 init/main.c                             |    2 
 ipc/msg.c                               |  281 ++++++++-----
 ipc/namespace.c                         |    7 
 ipc/sem.c                               |  660 +++++++++++++++++++++-----------
 ipc/shm.c                               |  288 ++++++++-----
 ipc/util.c                              |  140 ++----
 ipc/util.h                              |   34 +
 mm/shmem.c                              |    8 
 sound/pci/hda/patch_hdmi.c              |   18 
 sound/pci/hda/patch_realtek.c           |   37 +
 sound/usb/usx2y/usbusx2yaudio.c         |   22 -
 sound/usb/usx2y/usx2yhwdeppcm.c         |    7 
 56 files changed, 1061 insertions(+), 656 deletions(-)

Al Viro (1):

      cope with potentially long ->d_dname() output for shmem/hugetlb

Alex Deucher (1):
drm/radeon: fix typo in CP DMA register headers

Anssi Hannula (1):
ALSA: hda - hdmi: Fix channel map switch not taking effect

Chris Wilson (1):
drm/i915: Only apply DPMS to the encoder if enabled

Christian Ruppert (1):
ARC: Fix signal frame management for SA_SIGINFO

Dan Carpenter (2):
watchdog: ts72xx_wdt: locking bug in ioctl drm/radeon: forever loop on error in radeon_do_test_moves()

Daniel Mack (1):
ALSA: snd-usb-usx2y: remove bogus frame checks

Dave Jones (1):
ext4: fix memory leak in xattr

David Henningsson (2):
ALSA: hda - Fix microphone for Sony VAIO Pro 13 (Haswell model)
ALSA: hda - Fix mono speakers and headset mic on Dell Vostro 5470

Davidlohr Bueso (28):
ipc: move rcu lock out of ipc_addid
ipc: introduce ipc object locking helpers
ipc: close open coded spin lock calls
ipc: move locking out of ipcctl_pre_down_nolock ipc,msg: shorten critical region in msgctl_down ipc,msg: introduce msgctl_nolock
ipc,msg: introduce lockless functions to obtain the ipc object ipc,msg: make msgctl_nolock lockless
ipc,msg: shorten critical region in msgsnd
ipc,msg: shorten critical region in msgrcv
ipc: remove unused functions
ipc,shm: introduce lockless functions to obtain the ipc object ipc,shm: shorten critical region in shmctl_down
ipc: drop ipcctl_pre_down
ipc,shm: introduce shmctl_nolock
ipc,shm: make shmctl_nolock lockless
ipc,shm: shorten critical region for shmctl ipc,shm: cleanup do_shmat pasta
ipc,shm: shorten critical region for shmat
ipc: rename ids->rw_mutex
ipc,msg: drop msg_unlock
ipc: document general ipc locking scheme
ipc, shm: guard against non-existant vma in shmdt(2)
ipc: drop ipc_lock_by_ptr
ipc, shm: drop shm_lock_check
ipc: drop ipc_lock_check
ipc: fix race with LSMs
ipc,msg: prevent race with rmid in msgsnd,msgrcv

Greg Kroah-Hartman (1):

      Linux 3.10.17

Helge Deller (1):
parisc: fix interruption handler to respect pagefault_disable()

Henrik Rydberg (1):
hwmon: (applesmc) Always read until end of data

Ingo Molnar (1):
compiler/gcc4: Add quirk for 'asm goto' miscompilation bug

Josef Bacik (1):
Btrfs: use right root when checking for hash collision

Linn Crosetto (1):
x86: avoid remapping data in parse_setup_data()

Linus Torvalds (1):
vfs: allow O_PATH file descriptors for fstatfs()

Manfred Spraul (11):
ipc/util.c, ipc_rcu_alloc: cacheline align allocation ipc/sem.c: cacheline align the semaphore structures
ipc/sem: separate wait-for-zero and alter tasks into seperate queues ipc/sem.c: always use only one queue for alter operations ipc/sem.c: replace shared sem_otime with per-semaphore value ipc/sem.c: rename try_atomic_semop() to perform_atomic_semop(), docu update ipc/msg.c: Fix lost wakeup in msgsnd().
ipc/sem.c: fix race in sem_lock()
ipc/sem.c: optimize sem_lock()
ipc/sem.c: synchronize the proc interface
ipc/sem.c: update sem_otime for all operations

Mischa Jonker (2):
ARC: Fix __udelay calculation
ARC: Handle zero-overhead-loop in unaligned access handler

Noam Camus (1):
ARC: SMP failed to boot due to missing IVT setup

Paul Mackerras (1):
KVM: PPC: Book3S HV: Fix typo in saving DSCR

Russell King (1):
ARM: Fix the world famous typo with is_gate_vma()

Takashi Iwai (1):
ALSA: hda - Add fixup for ASUS N56VZ

Taras Kondratiuk (1):
i2c: omap: Clear ARDY bit twice

Theodore Ts'o (1):
random: run random_int_secret_init() run after all late_initcalls

Vineet Gupta (4):
ARC: Setup Vector Table Base in early boot
ARC: Fix 32-bit wrap around in access_ok()
ARC: Workaround spinlock livelock in SMP SystemC simulation
ARC: Ignore ptrace SETREGSET request for synthetic register "stop_pc"

wojciech kapuscinski (1):
drm/radeon: fix hw contexts for SUMO2 asics

author maintainer
#1 lore raw
Makefile +1 -1
index e9528d2..5c7d3d6 100644
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 10
-SUBLEVEL = 16
+SUBLEVEL = 17
 EXTRAVERSION =
 NAME = TOSSUG Baby Fish
 
arch/arc/include/asm/delay.h +2 -3
index 442ce5d..43de302 100644
@@ -53,11 +53,10 @@ static inline void __udelay(unsigned long usecs)
 {
 	unsigned long loops;
 
-	/* (long long) cast ensures 64 bit MPY - real or emulated
+	/* (u64) cast ensures 64 bit MPY - real or emulated
 	 * HZ * 4295 is pre-evaluated by gcc - hence only 2 mpy ops
 	 */
-	loops = ((long long)(usecs * 4295 * HZ) *
-		 (long long)(loops_per_jiffy)) >> 32;
+	loops = ((u64) usecs * 4295 * HZ * loops_per_jiffy) >> 32;
 
 	__delay(loops);
 }
arch/arc/include/asm/sections.h +0 -1
index 6fc1159..764f1e3 100644
@@ -11,7 +11,6 @@
 
 #include <asm-generic/sections.h>
 
-extern char _int_vec_base_lds[];
 extern char __arc_dccm_base[];
 extern char __dtb_start[];
 
arch/arc/include/asm/spinlock.h +8 -1
index f158197..b6a8c2d 100644
@@ -45,7 +45,14 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock)
 
 static inline void arch_spin_unlock(arch_spinlock_t *lock)
 {
-	lock->slock = __ARCH_SPIN_LOCK_UNLOCKED__;
+	unsigned int tmp = __ARCH_SPIN_LOCK_UNLOCKED__;
+
+	__asm__ __volatile__(
+	"	ex  %0, [%1]		\n"
+	: "+r" (tmp)
+	: "r"(&(lock->slock))
+	: "memory");
+
 	smp_mb();
 }
 
arch/arc/include/asm/uaccess.h +2 -2
index 3242082..30c9baf 100644
@@ -43,7 +43,7 @@
  * Because it essentially checks if buffer end is within limit and @len is
  * non-ngeative, which implies that buffer start will be within limit too.
  *
- * The reason for rewriting being, for majorit yof cases, @len is generally
+ * The reason for rewriting being, for majority of cases, @len is generally
  * compile time constant, causing first sub-expression to be compile time
  * subsumed.
  *
@@ -53,7 +53,7 @@
  *
  */
 #define __user_ok(addr, sz)	(((sz) <= TASK_SIZE) && \
-				 (((addr)+(sz)) <= get_fs()))
+				 ((addr) <= (get_fs() - (sz))))
 #define __access_ok(addr, sz)	(unlikely(__kernel_ok) || \
 				 likely(__user_ok((addr), (sz))))
 
arch/arc/kernel/head.S +7 -0
index 006dec3..0f944f0 100644
@@ -27,11 +27,16 @@ stext:
 	; Don't clobber r0-r4 yet. It might have bootloader provided info
 	;-------------------------------------------------------------------
 
+	sr	@_int_vec_base_lds, [AUX_INTR_VEC_BASE]
+
 #ifdef CONFIG_SMP
 	; Only Boot (Master) proceeds. Others wait in platform dependent way
 	;	IDENTITY Reg [ 3  2  1  0 ]
 	;	(cpu-id)             ^^^	=> Zero for UP ARC700
 	;					=> #Core-ID if SMP (Master 0)
+	; Note that non-boot CPUs might not land here if halt-on-reset and
+	; instead breath life from @first_lines_of_secondary, but we still
+	; need to make sure only boot cpu takes this path.
 	GET_CPU_ID  r5
 	cmp	r5, 0
 	jnz	arc_platform_smp_wait_to_boot
@@ -96,6 +101,8 @@ stext:
 
 first_lines_of_secondary:
 
+	sr	@_int_vec_base_lds, [AUX_INTR_VEC_BASE]
+
 	; setup per-cpu idle task as "current" on this CPU
 	ld	r0, [@secondary_idle_tsk]
 	SET_CURR_TASK_ON_CPU  r0, r1
arch/arc/kernel/irq.c +0 -3
index 8115fa5..a199471 100644
@@ -24,7 +24,6 @@
  * -Needed for each CPU (hence not foldable into init_IRQ)
  *
  * what it does ?
- * -setup Vector Table Base Reg - in case Linux not linked at 0x8000_0000
  * -Disable all IRQs (on CPU side)
  * -Optionally, setup the High priority Interrupts as Level 2 IRQs
  */
@@ -32,8 +31,6 @@ void __cpuinit arc_init_IRQ(void)
 {
 	int level_mask = 0;
 
-	write_aux_reg(AUX_INTR_VEC_BASE, _int_vec_base_lds);
-
 	/* Disable all IRQs: enable them as devices request */
 	write_aux_reg(AUX_IENABLE, 0);
 
arch/arc/kernel/ptrace.c +1 -1
index c6a81c5..0851604 100644
@@ -92,7 +92,7 @@ static int genregs_set(struct task_struct *target,
 	REG_IN_CHUNK(scratch, callee, ptregs);	/* pt_regs[bta..orig_r8] */
 	REG_IN_CHUNK(callee, efa, cregs);	/* callee_regs[r25..r13] */
 	REG_IGNORE_ONE(efa);			/* efa update invalid */
-	REG_IN_ONE(stop_pc, &ptregs->ret);	/* stop_pc: PC update */
+	REG_IGNORE_ONE(stop_pc);			/* PC updated via @ret */
 
 	return ret;
 }
arch/arc/kernel/setup.c +0 -3
index b2b3731..2d7786b 100644
@@ -47,10 +47,7 @@ void __cpuinit read_arc_build_cfg_regs(void)
 	READ_BCR(AUX_IDENTITY, cpu->core);
 
 	cpu->timers = read_aux_reg(ARC_REG_TIMERS_BCR);
-
 	cpu->vec_base = read_aux_reg(AUX_INTR_VEC_BASE);
-	if (cpu->vec_base == 0)
-		cpu->vec_base = (unsigned int)_int_vec_base_lds;
 
 	READ_BCR(ARC_REG_D_UNCACH_BCR, uncached_space);
 	cpu->uncached_base = uncached_space.start << 24;
arch/arc/kernel/signal.c +13 -12
index ee6ef2f..7e95e1a 100644
@@ -101,7 +101,6 @@ SYSCALL_DEFINE0(rt_sigreturn)
 {
 	struct rt_sigframe __user *sf;
 	unsigned int magic;
-	int err;
 	struct pt_regs *regs = current_pt_regs();
 
 	/* Always make any pending restarted system calls return -EINTR */
@@ -119,15 +118,16 @@ SYSCALL_DEFINE0(rt_sigreturn)
 	if (!access_ok(VERIFY_READ, sf, sizeof(*sf)))
 		goto badframe;
 
-	err = restore_usr_regs(regs, sf);
-	err |= __get_user(magic, &sf->sigret_magic);
-	if (err)
+	if (__get_user(magic, &sf->sigret_magic))
 		goto badframe;
 
 	if (unlikely(is_do_ss_needed(magic)))
 		if (restore_altstack(&sf->uc.uc_stack))
 			goto badframe;
 
+	if (restore_usr_regs(regs, sf))
+		goto badframe;
+
 	/* Don't restart from sigreturn */
 	syscall_wont_restart(regs);
 
@@ -191,6 +191,15 @@ setup_rt_frame(int signo, struct k_sigaction *ka, siginfo_t *info,
 		return 1;
 
 	/*
+	 * w/o SA_SIGINFO, struct ucontext is partially populated (only
+	 * uc_mcontext/uc_sigmask) for kernel's normal user state preservation
+	 * during signal handler execution. This works for SA_SIGINFO as well
+	 * although the semantics are now overloaded (the same reg state can be
+	 * inspected by userland: but are they allowed to fiddle with it ?
+	 */
+	err |= stash_usr_regs(sf, regs, set);
+
+	/*
 	 * SA_SIGINFO requires 3 args to signal handler:
 	 *  #1: sig-no (common to any handler)
 	 *  #2: struct siginfo
@@ -213,14 +222,6 @@ setup_rt_frame(int signo, struct k_sigaction *ka, siginfo_t *info,
 		magic = MAGIC_SIGALTSTK;
 	}
 
-	/*
-	 * w/o SA_SIGINFO, struct ucontext is partially populated (only
-	 * uc_mcontext/uc_sigmask) for kernel's normal user state preservation
-	 * during signal handler execution. This works for SA_SIGINFO as well
-	 * although the semantics are now overloaded (the same reg state can be
-	 * inspected by userland: but are they allowed to fiddle with it ?
-	 */
-	err |= stash_usr_regs(sf, regs, set);
 	err |= __put_user(magic, &sf->sigret_magic);
 	if (err)
 		return err;
arch/arc/kernel/unaligned.c +6 -0
index 4cd8163..116d3e0 100644
@@ -233,6 +233,12 @@ int misaligned_fixup(unsigned long address, struct pt_regs *regs,
 		regs->status32 &= ~STATUS_DE_MASK;
 	} else {
 		regs->ret += state.instr_len;
+
+		/* handle zero-overhead-loop */
+		if ((regs->ret == regs->lp_end) && (regs->lp_count)) {
+			regs->ret = regs->lp_start;
+			regs->lp_count--;
+		}
 	}
 
 	return 0;
arch/arm/include/asm/jump_label.h +1 -1
index bfc198c..863c892 100644
@@ -16,7 +16,7 @@
 
 static __always_inline bool arch_static_branch(struct static_key *key)
 {
-	asm goto("1:\n\t"
+	asm_volatile_goto("1:\n\t"
 		 JUMP_LABEL_NOP "\n\t"
 		 ".pushsection __jump_table,  \"aw\"\n\t"
 		 ".word 1b, %l[l_yes], %c0\n\t"
arch/arm/kernel/process.c +1 -1
index 5bc2615..ab1fe3b 100644
@@ -466,7 +466,7 @@ int in_gate_area_no_mm(unsigned long addr)
 {
 	return in_gate_area(NULL, addr);
 }
-#define is_gate_vma(vma)	((vma) = &gate_vma)
+#define is_gate_vma(vma)	((vma) == &gate_vma)
 #else
 #define is_gate_vma(vma)	0
 #endif
arch/mips/include/asm/jump_label.h +1 -1
index 4d6d77e..e194f95 100644
@@ -22,7 +22,7 @@
 
 static __always_inline bool arch_static_branch(struct static_key *key)
 {
-	asm goto("1:\tnop\n\t"
+	asm_volatile_goto("1:\tnop\n\t"
 		"nop\n\t"
 		".pushsection __jump_table,  \"aw\"\n\t"
 		WORD_INSN " 1b, %l[l_yes], %0\n\t"
arch/parisc/kernel/traps.c +3 -3
index 04e47c6..b3f87a3 100644
@@ -805,14 +805,14 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
 	else {
 
 	    /*
-	     * The kernel should never fault on its own address space.
+	     * The kernel should never fault on its own address space,
+	     * unless pagefault_disable() was called before.
 	     */
 
-	    if (fault_space == 0) 
+	    if (fault_space == 0 && !in_atomic())
 	    {
 		pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC);
 		parisc_terminate("Kernel Fault", regs, code, fault_address);
-	
 	    }
 	}
 
arch/powerpc/include/asm/jump_label.h +1 -1
index ae098c4..f016bb6 100644
@@ -19,7 +19,7 @@
 
 static __always_inline bool arch_static_branch(struct static_key *key)
 {
-	asm goto("1:\n\t"
+	asm_volatile_goto("1:\n\t"
 		 "nop\n\t"
 		 ".pushsection __jump_table,  \"aw\"\n\t"
 		 JUMP_ENTRY_TYPE "1b, %l[l_yes], %c0\n\t"
arch/powerpc/kvm/book3s_hv_rmhandlers.S +1 -1
index b02f91e..7bcd4d6 100644
@@ -1054,7 +1054,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206)
 BEGIN_FTR_SECTION
 	mfspr	r8, SPRN_DSCR
 	ld	r7, HSTATE_DSCR(r13)
-	std	r8, VCPU_DSCR(r7)
+	std	r8, VCPU_DSCR(r9)
 	mtspr	SPRN_DSCR, r7
 END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206)
 
arch/s390/include/asm/jump_label.h +1 -1
index 6c32190..346b1c8 100644
@@ -15,7 +15,7 @@
 
 static __always_inline bool arch_static_branch(struct static_key *key)
 {
-	asm goto("0:	brcl 0,0\n"
+	asm_volatile_goto("0:	brcl 0,0\n"
 		".pushsection __jump_table, \"aw\"\n"
 		ASM_ALIGN "\n"
 		ASM_PTR " 0b, %l[label], %0\n"
arch/sparc/include/asm/jump_label.h +1 -1
index 5080d16..ec2e2e2 100644
@@ -9,7 +9,7 @@
 
 static __always_inline bool arch_static_branch(struct static_key *key)
 {
-		asm goto("1:\n\t"
+		asm_volatile_goto("1:\n\t"
 			 "nop\n\t"
 			 "nop\n\t"
 			 ".pushsection __jump_table,  \"aw\"\n\t"
arch/x86/include/asm/cpufeature.h +1 -1
index e99ac27..4af181d 100644
@@ -365,7 +365,7 @@ extern const char * const x86_power_flags[32];
 static __always_inline __pure bool __static_cpu_has(u16 bit)
 {
 #if __GNUC__ > 4 || __GNUC_MINOR__ >= 5
-		asm goto("1: jmp %l[t_no]\n"
+		asm_volatile_goto("1: jmp %l[t_no]\n"
 			 "2:\n"
 			 ".section .altinstructions,\"a\"\n"
 			 " .long 1b - .\n"
arch/x86/include/asm/e820.h +1 -1
index cccd07f..779c2ef 100644
@@ -29,7 +29,7 @@ extern void e820_setup_gap(void);
 extern int e820_search_gap(unsigned long *gapstart, unsigned long *gapsize,
 			unsigned long start_addr, unsigned long long end_addr);
 struct setup_data;
-extern void parse_e820_ext(struct setup_data *data);
+extern void parse_e820_ext(u64 phys_addr, u32 data_len);
 
 #if defined(CONFIG_X86_64) || \
 	(defined(CONFIG_X86_32) && defined(CONFIG_HIBERNATION))
arch/x86/include/asm/jump_label.h +1 -1
index 3a16c14..0297669 100644
@@ -13,7 +13,7 @@
 
 static __always_inline bool arch_static_branch(struct static_key *key)
 {
-	asm goto("1:"
+	asm_volatile_goto("1:"
 		STATIC_KEY_INITIAL_NOP
 		".pushsection __jump_table,  \"aw\" \n\t"
 		_ASM_ALIGN "\n\t"
arch/x86/kernel/e820.c +4 -1
index d32abea..174da5f 100644
@@ -658,15 +658,18 @@ __init void e820_setup_gap(void)
  * boot_params.e820_map, others are passed via SETUP_E820_EXT node of
  * linked list of struct setup_data, which is parsed here.
  */
-void __init parse_e820_ext(struct setup_data *sdata)
+void __init parse_e820_ext(u64 phys_addr, u32 data_len)
 {
 	int entries;
 	struct e820entry *extmap;
+	struct setup_data *sdata;
 
+	sdata = early_memremap(phys_addr, data_len);
 	entries = sdata->len / sizeof(struct e820entry);
 	extmap = (struct e820entry *)(sdata->data);
 	__append_e820_map(extmap, entries);
 	sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
+	early_iounmap(sdata, data_len);
 	printk(KERN_INFO "e820: extended physical RAM map:\n");
 	e820_print_map("extended");
 }
arch/x86/kernel/setup.c +8 -11
index 56f7fcf..91964c6 100644
@@ -426,25 +426,23 @@ static void __init reserve_initrd(void)
 static void __init parse_setup_data(void)
 {
 	struct setup_data *data;
-	u64 pa_data;
+	u64 pa_data, pa_next;
 
 	pa_data = boot_params.hdr.setup_data;
 	while (pa_data) {
-		u32 data_len, map_len;
+		u32 data_len, map_len, data_type;
 
 		map_len = max(PAGE_SIZE - (pa_data & ~PAGE_MASK),
 			      (u64)sizeof(struct setup_data));
 		data = early_memremap(pa_data, map_len);
 		data_len = data->len + sizeof(struct setup_data);
-		if (data_len > map_len) {
-			early_iounmap(data, map_len);
-			data = early_memremap(pa_data, data_len);
-			map_len = data_len;
-		}
+		data_type = data->type;
+		pa_next = data->next;
+		early_iounmap(data, map_len);
 
-		switch (data->type) {
+		switch (data_type) {
 		case SETUP_E820_EXT:
-			parse_e820_ext(data);
+			parse_e820_ext(pa_data, data_len);
 			break;
 		case SETUP_DTB:
 			add_dtb(pa_data);
@@ -452,8 +450,7 @@ static void __init parse_setup_data(void)
 		default:
 			break;
 		}
-		pa_data = data->next;
-		early_iounmap(data, map_len);
+		pa_data = pa_next;
 	}
 }
 
drivers/char/random.c +1 -2
index 35487e8..81eefa1 100644
@@ -1462,12 +1462,11 @@ ctl_table random_table[] = {
 
 static u32 random_int_secret[MD5_MESSAGE_BYTES / 4] ____cacheline_aligned;
 
-static int __init random_int_secret_init(void)
+int random_int_secret_init(void)
 {
 	get_random_bytes(random_int_secret, sizeof(random_int_secret));
 	return 0;
 }
-late_initcall(random_int_secret_init);
 
 /*
  * Get a random word for internal kernel use only. Similar to urandom but
drivers/gpu/drm/i915/intel_display.c +2 -6
index 2667d6d..ab95259 100644
@@ -3946,8 +3946,6 @@ static void intel_connector_check_state(struct intel_connector *connector)
  * consider. */
 void intel_connector_dpms(struct drm_connector *connector, int mode)
 {
-	struct intel_encoder *encoder = intel_attached_encoder(connector);
-
 	/* All the simple cases only support two dpms states. */
 	if (mode != DRM_MODE_DPMS_ON)
 		mode = DRM_MODE_DPMS_OFF;
@@ -3958,10 +3956,8 @@ void intel_connector_dpms(struct drm_connector *connector, int mode)
 	connector->dpms = mode;
 
 	/* Only need to change hw state when actually enabled */
-	if (encoder->base.crtc)
-		intel_encoder_dpms(encoder, mode);
-	else
-		WARN_ON(encoder->connectors_active != false);
+	if (connector->encoder)
+		intel_encoder_dpms(to_intel_encoder(connector->encoder), mode);
 
 	intel_modeset_check_state(connector->dev);
 }
drivers/gpu/drm/radeon/evergreen.c +1 -1
index 2068df1..8b6b0ba 100644
@@ -2990,7 +2990,7 @@ static void evergreen_gpu_init(struct radeon_device *rdev)
 		rdev->config.evergreen.sx_max_export_size = 256;
 		rdev->config.evergreen.sx_max_export_pos_size = 64;
 		rdev->config.evergreen.sx_max_export_smx_size = 192;
-		rdev->config.evergreen.max_hw_contexts = 8;
+		rdev->config.evergreen.max_hw_contexts = 4;
 		rdev->config.evergreen.sq_num_cf_insts = 2;
 
 		rdev->config.evergreen.sc_prim_fifo_size = 0x40;
drivers/gpu/drm/radeon/evergreend.h +2 -2
index 9490972..150e318 100644
@@ -1104,7 +1104,7 @@
  * 6. COMMAND [29:22] | BYTE_COUNT [20:0]
  */
 #              define PACKET3_CP_DMA_DST_SEL(x)    ((x) << 20)
-                /* 0 - SRC_ADDR
+                /* 0 - DST_ADDR
 		 * 1 - GDS
 		 */
 #              define PACKET3_CP_DMA_ENGINE(x)     ((x) << 27)
@@ -1119,7 +1119,7 @@
 #              define PACKET3_CP_DMA_CP_SYNC       (1 << 31)
 /* COMMAND */
 #              define PACKET3_CP_DMA_DIS_WC        (1 << 21)
-#              define PACKET3_CP_DMA_CMD_SRC_SWAP(x) ((x) << 23)
+#              define PACKET3_CP_DMA_CMD_SRC_SWAP(x) ((x) << 22)
                 /* 0 - none
 		 * 1 - 8 in 16
 		 * 2 - 8 in 32
drivers/gpu/drm/radeon/r600d.h +1 -1
index 79df558..2fd2241 100644
@@ -1259,7 +1259,7 @@
  */
 #              define PACKET3_CP_DMA_CP_SYNC       (1 << 31)
 /* COMMAND */
-#              define PACKET3_CP_DMA_CMD_SRC_SWAP(x) ((x) << 23)
+#              define PACKET3_CP_DMA_CMD_SRC_SWAP(x) ((x) << 22)
                 /* 0 - none
 		 * 1 - 8 in 16
 		 * 2 - 8 in 32
drivers/gpu/drm/radeon/radeon_test.c +2 -2
index bbed4af..f9ebf2b 100644
@@ -37,8 +37,8 @@ static void radeon_do_test_moves(struct radeon_device *rdev, int flag)
 	struct radeon_bo **gtt_obj = NULL;
 	struct radeon_fence *fence = NULL;
 	uint64_t gtt_addr, vram_addr;
-	unsigned i, n, size;
-	int r, ring;
+	unsigned n, size;
+	int i, r, ring;
 
 	switch (flag) {
 	case RADEON_TEST_COPY_DMA:
drivers/gpu/drm/radeon/sid.h +2 -2
index 8c68e67..495f41f 100644
@@ -928,7 +928,7 @@
  * 6. COMMAND [30:21] | BYTE_COUNT [20:0]
  */
 #              define PACKET3_CP_DMA_DST_SEL(x)    ((x) << 20)
-                /* 0 - SRC_ADDR
+                /* 0 - DST_ADDR
 		 * 1 - GDS
 		 */
 #              define PACKET3_CP_DMA_ENGINE(x)     ((x) << 27)
@@ -943,7 +943,7 @@
 #              define PACKET3_CP_DMA_CP_SYNC       (1 << 31)
 /* COMMAND */
 #              define PACKET3_CP_DMA_DIS_WC        (1 << 21)
-#              define PACKET3_CP_DMA_CMD_SRC_SWAP(x) ((x) << 23)
+#              define PACKET3_CP_DMA_CMD_SRC_SWAP(x) ((x) << 22)
                 /* 0 - none
 		 * 1 - 8 in 16
 		 * 2 - 8 in 32
drivers/hwmon/applesmc.c +13 -0
index 98814d1..3288f13 100644
@@ -230,6 +230,7 @@ static int send_argument(const char *key)
 
 static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len)
 {
+	u8 status, data = 0;
 	int i;
 
 	if (send_command(cmd) || send_argument(key)) {
@@ -237,6 +238,7 @@ static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len)
 		return -EIO;
 	}
 
+	/* This has no effect on newer (2012) SMCs */
 	if (send_byte(len, APPLESMC_DATA_PORT)) {
 		pr_warn("%.4s: read len fail\n", key);
 		return -EIO;
@@ -250,6 +252,17 @@ static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len)
 		buffer[i] = inb(APPLESMC_DATA_PORT);
 	}
 
+	/* Read the data port until bit0 is cleared */
+	for (i = 0; i < 16; i++) {
+		udelay(APPLESMC_MIN_WAIT);
+		status = inb(APPLESMC_CMD_PORT);
+		if (!(status & 0x01))
+			break;
+		data = inb(APPLESMC_DATA_PORT);
+	}
+	if (i)
+		pr_warn("flushed %d bytes, last value is: %d\n", i, data);
+
 	return 0;
 }
 
drivers/i2c/busses/i2c-omap.c +3 -0
index e02f9e3..b06be8e 100644
@@ -941,6 +941,9 @@ omap_i2c_isr_thread(int this_irq, void *dev_id)
 		/*
 		 * ProDB0017052: Clear ARDY bit twice
 		 */
+		if (stat & OMAP_I2C_STAT_ARDY)
+			omap_i2c_ack_stat(dev, OMAP_I2C_STAT_ARDY);
+
 		if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK |
 					OMAP_I2C_STAT_AL)) {
 			omap_i2c_ack_stat(dev, (OMAP_I2C_STAT_RRDY |
drivers/watchdog/ts72xx_wdt.c +2 -1
index b8a9245..9ad2bd3 100644
@@ -310,7 +310,8 @@ static long ts72xx_wdt_ioctl(struct file *file, unsigned int cmd,
 
 	case WDIOC_GETSTATUS:
 	case WDIOC_GETBOOTSTATUS:
-		return put_user(0, p);
+		error = put_user(0, p);
+		break;
 
 	case WDIOC_KEEPALIVE:
 		ts72xx_wdt_kick(wdt);
fs/btrfs/inode.c +1 -1
index 17f3064..1e2288d 100644
@@ -8146,7 +8146,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
 
 
 	/* check for collisions, even if the  name isn't there */
-	ret = btrfs_check_dir_item_collision(root, new_dir->i_ino,
+	ret = btrfs_check_dir_item_collision(dest, new_dir->i_ino,
 			     new_dentry->d_name.name,
 			     new_dentry->d_name.len);
 
fs/dcache.c +11 -0
index f09b908..da89cdf 100644
@@ -2724,6 +2724,17 @@ char *dynamic_dname(struct dentry *dentry, char *buffer, int buflen,
 	return memcpy(buffer, temp, sz);
 }
 
+char *simple_dname(struct dentry *dentry, char *buffer, int buflen)
+{
+	char *end = buffer + buflen;
+	/* these dentries are never renamed, so d_lock is not needed */
+	if (prepend(&end, &buflen, " (deleted)", 11) ||
+	    prepend_name(&end, &buflen, &dentry->d_name) ||
+	    prepend(&end, &buflen, "/", 1))
+		end = ERR_PTR(-ENAMETOOLONG);
+	return end;
+}
+
 /*
  * Write full pathname from the root of the filesystem into the buffer.
  */
fs/ext4/xattr.c +2 -0
index c081e34..03e9beb 100644
@@ -1350,6 +1350,8 @@ retry:
 				    s_min_extra_isize) {
 					tried_min_extra_isize++;
 					new_extra_isize = s_min_extra_isize;
+					kfree(is); is = NULL;
+					kfree(bs); bs = NULL;
 					goto retry;
 				}
 				error = -1;
fs/hugetlbfs/inode.c +1 -7
index a3f868a..4e5f332 100644
@@ -916,14 +916,8 @@ static int get_hstate_idx(int page_size_log)
 	return h - hstates;
 }
 
-static char *hugetlb_dname(struct dentry *dentry, char *buffer, int buflen)
-{
-	return dynamic_dname(dentry, buffer, buflen, "/%s (deleted)",
-				dentry->d_name.name);
-}
-
 static struct dentry_operations anon_ops = {
-	.d_dname = hugetlb_dname
+	.d_dname = simple_dname
 };
 
 /*
fs/statfs.c +1 -1
index c219e733..083dc0a 100644
@@ -94,7 +94,7 @@ retry:
 
 int fd_statfs(int fd, struct kstatfs *st)
 {
-	struct fd f = fdget(fd);
+	struct fd f = fdget_raw(fd);
 	int error = -EBADF;
 	if (f.file) {
 		error = vfs_statfs(&f.file->f_path, st);
include/linux/compiler-gcc4.h +15 -0
index 842de22..ded4299 100644
@@ -65,6 +65,21 @@
 #define __visible __attribute__((externally_visible))
 #endif
 
+/*
+ * GCC 'asm goto' miscompiles certain code sequences:
+ *
+ *   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
+ *
+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
+ * Fixed in GCC 4.8.2 and later versions.
+ *
+ * (asm goto is automatically volatile - the naming reflects this.)
+ */
+#if GCC_VERSION <= 40801
+# define asm_volatile_goto(x...)	do { asm goto(x); asm (""); } while (0)
+#else
+# define asm_volatile_goto(x...)	do { asm goto(x); } while (0)
+#endif
 
 #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
 #if GCC_VERSION >= 40400
include/linux/dcache.h +1 -0
index 1a6bb81..9be5ac9 100644
@@ -332,6 +332,7 @@ extern int d_validate(struct dentry *, struct dentry *);
  * helper function for dentry_operations.d_dname() members
  */
 extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
+extern char *simple_dname(struct dentry *, char *, int);
 
 extern char *__d_path(const struct path *, const struct path *, char *, int);
 extern char *d_absolute_path(const struct path *, char *, int);
include/linux/ipc_namespace.h +1 -1
index c4d870b..19c19a5 100644
@@ -22,7 +22,7 @@ struct ipc_ids {
 	int in_use;
 	unsigned short seq;
 	unsigned short seq_max;
-	struct rw_semaphore rw_mutex;
+	struct rw_semaphore rwsem;
 	struct idr ipcs_idr;
 	int next_id;
 };
include/linux/random.h +1 -0
index 3b9377d..6312dd9 100644
@@ -17,6 +17,7 @@ extern void add_interrupt_randomness(int irq, int irq_flags);
 extern void get_random_bytes(void *buf, int nbytes);
 extern void get_random_bytes_arch(void *buf, int nbytes);
 void generate_random_uuid(unsigned char uuid_out[16]);
+extern int random_int_secret_init(void);
 
 #ifndef MODULE
 extern const struct file_operations random_fops, urandom_fops;
include/linux/sem.h +4 -2
index 53d4265..976ce3a 100644
@@ -12,10 +12,12 @@ struct task_struct;
 struct sem_array {
 	struct kern_ipc_perm	____cacheline_aligned_in_smp
 				sem_perm;	/* permissions .. see ipc.h */
-	time_t			sem_otime;	/* last semop time */
 	time_t			sem_ctime;	/* last change time */
 	struct sem		*sem_base;	/* ptr to first semaphore in array */
-	struct list_head	sem_pending;	/* pending operations to be processed */
+	struct list_head	pending_alter;	/* pending operations */
+						/* that alter the array */
+	struct list_head	pending_const;	/* pending complex operations */
+						/* that do not alter semvals */
 	struct list_head	list_id;	/* undo requests on this array */
 	int			sem_nsems;	/* no. of semaphores in array */
 	int			complex_count;	/* pending complex operations */
init/main.c +2 -0
index 9484f4b..e83ac04 100644
@@ -74,6 +74,7 @@
 #include <linux/ptrace.h>
 #include <linux/blkdev.h>
 #include <linux/elevator.h>
+#include <linux/random.h>
 
 #include <asm/io.h>
 #include <asm/bugs.h>
@@ -777,6 +778,7 @@ static void __init do_basic_setup(void)
 	do_ctors();
 	usermodehelper_enable();
 	do_initcalls();
+	random_int_secret_init();
 }
 
 static void __init do_pre_smp_initcalls(void)
ipc/msg.c +174 -107

589 lines not on this page · raw message

ipc/namespace.c +4 -3
index 7ee61bf..aba9a58 100644
@@ -81,7 +81,7 @@ void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids,
 	int next_id;
 	int total, in_use;
 
-	down_write(&ids->rw_mutex);
+	down_write(&ids->rwsem);
 
 	in_use = ids->in_use;
 
@@ -89,11 +89,12 @@ void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids,
 		perm = idr_find(&ids->ipcs_idr, next_id);
 		if (perm == NULL)
 			continue;
-		ipc_lock_by_ptr(perm);
+		rcu_read_lock();
+		ipc_lock_object(perm);
 		free(ns, perm);
 		total++;
 	}
-	up_write(&ids->rw_mutex);
+	up_write(&ids->rwsem);
 }
 
 static void free_ipc_ns(struct ipc_namespace *ns)
ipc/sem.c +453 -207

1,052 lines not on this page · raw message

ipc/shm.c +175 -113

616 lines not on this page · raw message

ipc/util.c +50 -90

115 lines not on this page · raw message

ipc/util.h +21 -13
index 2b0bdd5..f2f5036 100644

Lines of this file are not shown. View the raw message.

mm/shmem.c +1 -7
index 5e6a842..509b393 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_hdmi.c +8 -10
index b5375ed..aecf088 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_realtek.c +37 -0
index 458cf89..21b6649 100644

Lines of this file are not shown. View the raw message.

sound/usb/usx2y/usbusx2yaudio.c +3 -19
index 0ce90337..cd69a80 100644

Lines of this file are not shown. View the raw message.

sound/usb/usx2y/usx2yhwdeppcm.c +1 -6
index f2a1acd..814d0e8 100644

Lines of this file are not shown. View the 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.