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

Commit 6784e569 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge 3.18.115 into android-3.18



Changes in 3.18.115
	n_tty: Fix stall at n_tty_receive_char_special().
	staging: android: ion: Return an ERR_PTR in ion_map_kernel
	x86/boot: Fix early command-line parsing when matching at end
	ubi: fastmap: Correctly handle interrupted erasures in EBA
	netfilter: ebtables: handle string from userspace with care
	atm: zatm: fix memcmp casting
	net: qmi_wwan: Add Netgear Aircard 779S
	net/sonic: Use dma_mapping_error()
	scsi: sg: mitigate read/write abuse
	cifs: Fix infinite loop when using hard mount option
	ext4: make sure bitmaps and the inode table don't overlap with bg descriptors
	ext4: clear i_data in ext4_inode_info when removing inline data
	ext4: add more mount time checks of the superblock
	HID: i2c-hid: Fix "incomplete report" noise
	HID: debug: check length before copy_to_user()
	media: cx25840: Use subdev host data for PLL override
	dm bufio: avoid sleeping while holding the dm_bufio lock
	dm bufio: drop the lock when doing GFP_NOIO allocation
	mtd: rawnand: mxc: set spare area size register explicitly
	mtd: cfi_cmdset_0002: Change definition naming to retry write operation
	mtd: cfi_cmdset_0002: Change erase functions to retry for error
	mtd: cfi_cmdset_0002: Change erase functions to check chip good only
	netfilter: nf_log: don't hold nf_log_mutex during user access
	Linux 3.18.115

Change-Id: I9defbf95d3615a840d06d9e886f28ccf7aba2d2b
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parents d5121ea1 ac35b668
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
VERSION = 3
PATCHLEVEL = 18
SUBLEVEL = 114
SUBLEVEL = 115
EXTRAVERSION =
NAME = Diseased Newt

+24 −10
Original line number Diff line number Diff line
@@ -21,12 +21,14 @@ static inline int myisspace(u8 c)
 * @option: option string to look for
 *
 * Returns the position of that @option (starts counting with 1)
 * or 0 on not found.
 * or 0 on not found.  @option will only be found if it is found
 * as an entire word in @cmdline.  For instance, if @option="car"
 * then a cmdline which contains "cart" will not match.
 */
int cmdline_find_option_bool(const char *cmdline, const char *option)
{
	char c;
	int len, pos = 0, wstart = 0;
	int pos = 0, wstart = 0;
	const char *opptr = NULL;
	enum {
		st_wordstart = 0,	/* Start of word/after whitespace */
@@ -37,11 +39,14 @@ int cmdline_find_option_bool(const char *cmdline, const char *option)
	if (!cmdline)
		return -1;      /* No command line */

	len = min_t(int, strlen(cmdline), COMMAND_LINE_SIZE);
	if (!len)
	if (!strlen(cmdline))
		return 0;

	while (len--) {
	/*
	 * This 'pos' check ensures we do not overrun
	 * a non-NULL-terminated 'cmdline'
	 */
	while (pos < COMMAND_LINE_SIZE) {
		c = *(char *)cmdline++;
		pos++;

@@ -58,17 +63,26 @@ int cmdline_find_option_bool(const char *cmdline, const char *option)
			/* fall through */

		case st_wordcmp:
			if (!*opptr)
			if (!*opptr) {
				/*
				 * We matched all the way to the end of the
				 * option we were looking for.  If the
				 * command-line has a space _or_ ends, then
				 * we matched!
				 */
				if (!c || myisspace(c))
					return wstart;
				else
					state = st_wordskip;
			else if (!c)
			} else if (!c) {
				/*
				 * Hit the NULL terminator on the end of
				 * cmdline.
				 */
				return 0;
			else if (c != *opptr++)
			} else if (c != *opptr++) {
				state = st_wordskip;
			else if (!len)		/* last word and is matching */
				return wstart;
			}
			break;

		case st_wordskip:
+2 −2
Original line number Diff line number Diff line
@@ -1148,8 +1148,8 @@ static void eprom_get_byte(struct zatm_dev *zatm_dev, unsigned char *byte,
}


static unsigned char eprom_try_esi(struct atm_dev *dev, unsigned short cmd,
				   int offset, int swap)
static int eprom_try_esi(struct atm_dev *dev, unsigned short cmd, int offset,
			 int swap)
{
	unsigned char buf[ZEPROM_SIZE];
	struct zatm_dev *zatm_dev;
+7 −1
Original line number Diff line number Diff line
@@ -1150,6 +1150,8 @@ copy_rest:
			goto out;
		if (list->tail > list->head) {
			len = list->tail - list->head;
			if (len > count)
				len = count;

			if (copy_to_user(buffer + ret, &list->hid_debug_buf[list->head], len)) {
				ret = -EFAULT;
@@ -1159,6 +1161,8 @@ copy_rest:
			list->head += len;
		} else {
			len = HID_DEBUG_BUFSIZE - list->head;
			if (len > count)
				len = count;

			if (copy_to_user(buffer, &list->hid_debug_buf[list->head], len)) {
				ret = -EFAULT;
@@ -1166,6 +1170,8 @@ copy_rest:
			}
			list->head = 0;
			ret += len;
			count -= len;
			if (count > 0)
				goto copy_rest;
		}

+1 −1
Original line number Diff line number Diff line
@@ -399,7 +399,7 @@ static void i2c_hid_get_input(struct i2c_hid *ihid)
		return;
	}

	if ((ret_size > size) || (ret_size <= 2)) {
	if ((ret_size > size) || (ret_size < 2)) {
		dev_err(&ihid->client->dev, "%s: incomplete report (%d/%d)\n",
			__func__, size, ret_size);
		return;
Loading