Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02d722f1 authored by Srinivasarao P's avatar Srinivasarao P
Browse files

Merge android-4.4.161 (8e7f1965) into msm-4.4



* refs/heads/tmp-8e7f1965
  Linux 4.4.161
  ebtables: arpreply: Add the standard target sanity check
  ath10k: fix scan crash due to incorrect length calculation
  tcp: add tcp_ooo_try_coalesce() helper
  tcp: call tcp_drop() from tcp_data_queue_ofo()
  tcp: free batches of packets in tcp_prune_ofo_queue()
  tcp: fix a stale ooo_last_skb after a replace
  tcp: use an RB tree for ooo receive queue
  tcp: increment sk_drops for dropped rx packets
  ubifs: Check for name being NULL while mounting
  ucma: fix a use-after-free in ucma_resolve_ip()
  ARC: clone syscall to setp r25 as thread pointer
  powerpc/fadump: Return error when fadump registration fails
  ath10k: fix use-after-free in ath10k_wmi_cmd_send_nowait
  cgroup: Fix deadlock in cpu hotplug path
  ext4: always verify the magic number in xattr blocks
  of: unittest: Disable interrupt node tests for old world MAC systems
  USB: serial: simple: add Motorola Tetra MTP6550 id
  xhci: Add missing CAS workaround for Intel Sunrise Point xHCI
  dm cache: fix resize crash if user doesn't reload cache table
  PM / core: Clear the direct_complete flag on errors
  mac80211: fix setting IEEE80211_KEY_FLAG_RX_MGMT for AP mode keys
  PCI: Reprogram bridge prefetch registers on resume
  x86/vdso: Fix vDSO syscall fallback asm constraint regression
  x86/vdso: Fix asm constraints on vDSO syscall fallbacks
  fbdev/omapfb: fix omapfb_memory_read infoleak
  mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly

Change-Id: If31f9e57679a3b1deb1049c86aeaead5ccbd64a6
Signed-off-by: default avatarSrinivasarao P <spathi@codeaurora.org>
parents f25fed27 8e7f1965
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
VERSION = 4
PATCHLEVEL = 4
SUBLEVEL = 160
SUBLEVEL = 161
EXTRAVERSION =
NAME = Blurry Fish Butt

+20 −0
Original line number Diff line number Diff line
@@ -153,6 +153,26 @@ int copy_thread(unsigned long clone_flags,
		task_thread_info(current)->thr_ptr;
	}


	/*
	 * setup usermode thread pointer #1:
	 * when child is picked by scheduler, __switch_to() uses @c_callee to
	 * populate usermode callee regs: this works (despite being in a kernel
	 * function) since special return path for child @ret_from_fork()
	 * ensures those regs are not clobbered all the way to RTIE to usermode
	 */
	c_callee->r25 = task_thread_info(p)->thr_ptr;

#ifdef CONFIG_ARC_CURR_IN_REG
	/*
	 * setup usermode thread pointer #2:
	 * however for this special use of r25 in kernel, __switch_to() sets
	 * r25 for kernel needs and only in the final return path is usermode
	 * r25 setup, from pt_regs->user_r25. So set that up as well
	 */
	c_regs->user_r25 = c_callee->r25;
#endif

	return 0;
}

+15 −8
Original line number Diff line number Diff line
@@ -360,9 +360,9 @@ static int __init early_fadump_reserve_mem(char *p)
}
early_param("fadump_reserve_mem", early_fadump_reserve_mem);

static void register_fw_dump(struct fadump_mem_struct *fdm)
static int register_fw_dump(struct fadump_mem_struct *fdm)
{
	int rc;
	int rc, err;
	unsigned int wait_time;

	pr_debug("Registering for firmware-assisted kernel dump...\n");
@@ -379,7 +379,11 @@ static void register_fw_dump(struct fadump_mem_struct *fdm)

	} while (wait_time);

	err = -EIO;
	switch (rc) {
	default:
		pr_err("Failed to register. Unknown Error(%d).\n", rc);
		break;
	case -1:
		printk(KERN_ERR "Failed to register firmware-assisted kernel"
			" dump. Hardware Error(%d).\n", rc);
@@ -387,18 +391,22 @@ static void register_fw_dump(struct fadump_mem_struct *fdm)
	case -3:
		printk(KERN_ERR "Failed to register firmware-assisted kernel"
			" dump. Parameter Error(%d).\n", rc);
		err = -EINVAL;
		break;
	case -9:
		printk(KERN_ERR "firmware-assisted kernel dump is already "
			" registered.");
		fw_dump.dump_registered = 1;
		err = -EEXIST;
		break;
	case 0:
		printk(KERN_INFO "firmware-assisted kernel dump registration"
			" is successful\n");
		fw_dump.dump_registered = 1;
		err = 0;
		break;
	}
	return err;
}

void crash_fadump(struct pt_regs *regs, const char *str)
@@ -997,7 +1005,7 @@ static unsigned long init_fadump_header(unsigned long addr)
	return addr;
}

static void register_fadump(void)
static int register_fadump(void)
{
	unsigned long addr;
	void *vaddr;
@@ -1008,7 +1016,7 @@ static void register_fadump(void)
	 * assisted dump.
	 */
	if (!fw_dump.reserve_dump_area_size)
		return;
		return -ENODEV;

	ret = fadump_setup_crash_memory_ranges();
	if (ret)
@@ -1023,7 +1031,7 @@ static void register_fadump(void)
	fadump_create_elfcore_headers(vaddr);

	/* register the future kernel dump with firmware. */
	register_fw_dump(&fdm);
	return register_fw_dump(&fdm);
}

static int fadump_unregister_dump(struct fadump_mem_struct *fdm)
@@ -1208,7 +1216,6 @@ static ssize_t fadump_register_store(struct kobject *kobj,
	switch (buf[0]) {
	case '0':
		if (fw_dump.dump_registered == 0) {
			ret = -EINVAL;
			goto unlock_out;
		}
		/* Un-register Firmware-assisted dump */
@@ -1216,11 +1223,11 @@ static ssize_t fadump_register_store(struct kobject *kobj,
		break;
	case '1':
		if (fw_dump.dump_registered == 1) {
			ret = -EINVAL;
			ret = -EEXIST;
			goto unlock_out;
		}
		/* Register Firmware-assisted dump */
		register_fadump();
		ret = register_fadump();
		break;
	default:
		ret = -EINVAL;
+14 −12
Original line number Diff line number Diff line
@@ -51,8 +51,9 @@ extern u8 pvclock_page
notrace static long vdso_fallback_gettime(long clock, struct timespec *ts)
{
	long ret;
	asm("syscall" : "=a" (ret) :
	    "0" (__NR_clock_gettime), "D" (clock), "S" (ts) : "memory");
	asm ("syscall" : "=a" (ret), "=m" (*ts) :
	     "0" (__NR_clock_gettime), "D" (clock), "S" (ts) :
	     "memory", "rcx", "r11");
	return ret;
}

@@ -60,8 +61,9 @@ notrace static long vdso_fallback_gtod(struct timeval *tv, struct timezone *tz)
{
	long ret;

	asm("syscall" : "=a" (ret) :
	    "0" (__NR_gettimeofday), "D" (tv), "S" (tz) : "memory");
	asm ("syscall" : "=a" (ret), "=m" (*tv), "=m" (*tz) :
	     "0" (__NR_gettimeofday), "D" (tv), "S" (tz) :
	     "memory", "rcx", "r11");
	return ret;
}

@@ -145,11 +147,11 @@ notrace static long vdso_fallback_gettime(long clock, struct timespec *ts)

	asm (
		"mov %%ebx, %%edx \n"
		"mov %2, %%ebx \n"
		"mov %[clock], %%ebx \n"
		"call __kernel_vsyscall \n"
		"mov %%edx, %%ebx \n"
		: "=a" (ret)
		: "0" (__NR_clock_gettime), "g" (clock), "c" (ts)
		: "=a" (ret), "=m" (*ts)
		: "0" (__NR_clock_gettime), [clock] "g" (clock), "c" (ts)
		: "memory", "edx");
	return ret;
}
@@ -160,11 +162,11 @@ notrace static long vdso_fallback_gtod(struct timeval *tv, struct timezone *tz)

	asm (
		"mov %%ebx, %%edx \n"
		"mov %2, %%ebx \n"
		"mov %[tv], %%ebx \n"
		"call __kernel_vsyscall \n"
		"mov %%edx, %%ebx \n"
		: "=a" (ret)
		: "0" (__NR_gettimeofday), "g" (tv), "c" (tz)
		: "=a" (ret), "=m" (*tv), "=m" (*tz)
		: "0" (__NR_gettimeofday), [tv] "g" (tv), "c" (tz)
		: "memory", "edx");
	return ret;
}
+4 −1
Original line number Diff line number Diff line
@@ -1359,8 +1359,10 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)

	dpm_wait_for_children(dev, async);

	if (async_error)
	if (async_error) {
		dev->power.direct_complete = false;
		goto Complete;
	}

	/*
	 * If a device configured to wake up the system from sleep states
@@ -1375,6 +1377,7 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
		pm_get_active_wakeup_sources(suspend_abort,
			MAX_SUSPEND_ABORT_LEN);
		log_suspend_abort_reason(suspend_abort);
		dev->power.direct_complete = false;
		async_error = -EBUSY;
		goto Complete;
	}
Loading