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

Commit 5a227d81 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge 4.9.325 into android-4.9-q



Changes in 4.9.325
	security,selinux,smack: kill security_task_wait hook
	xen/gntdev: Ignore failure to unmap INVALID_GRANT_HANDLE
	misc: rtsx_usb: fix use of dma mapped buffer for usb bulk transfer
	misc: rtsx_usb: use separate command and response buffers
	misc: rtsx_usb: set return value in rsp_buf alloc err path
	xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup()
	power/reset: arm-versatile: Fix refcount leak in versatile_reboot_probe
	perf/core: Fix data race between perf_event_set_output() and perf_mmap_close()
	ip: Fix a data-race around sysctl_fwmark_reflect.
	tcp/dccp: Fix a data-race around sysctl_tcp_fwmark_accept.
	tcp: Fix a data-race around sysctl_tcp_probe_threshold.
	i2c: cadence: Change large transfer count reset logic to be unconditional
	igmp: Fix data-races around sysctl_igmp_llm_reports.
	igmp: Fix a data-race around sysctl_igmp_max_memberships.
	tcp: Fix a data-race around sysctl_tcp_notsent_lowat.
	be2net: Fix buffer overflow in be_get_module_eeprom
	Revert "Revert "char/random: silence a lockdep splat with printk()""
	mm/mempolicy: fix uninit-value in mpol_rebind_policy()
	bpf: Make sure mac_header was set before using it
	ALSA: memalloc: Align buffer allocations in page size
	tty: drivers/tty/, stop using tty_schedule_flip()
	tty: the rest, stop using tty_schedule_flip()
	tty: drop tty_schedule_flip()
	tty: extract tty_flip_buffer_commit() from tty_flip_buffer_push()
	tty: use new tty_insert_flip_string_and_push_buffer() in pty_write()
	net: usb: ax88179_178a needs FLAG_SEND_ZLP
	Linux 4.9.325

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia0b4189557d82a2402819decbcf4eb3c7a204d86
parents b95f704b 9645f707
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
VERSION = 4
VERSION = 4
PATCHLEVEL = 9
PATCHLEVEL = 9
SUBLEVEL = 324
SUBLEVEL = 325
EXTRAVERSION =
EXTRAVERSION =
NAME = Roaring Lionus
NAME = Roaring Lionus


+1 −1
Original line number Original line Diff line number Diff line
@@ -58,7 +58,7 @@ srmcons_do_receive_chars(struct tty_port *port)
	} while((result.bits.status & 1) && (++loops < 10));
	} while((result.bits.status & 1) && (++loops < 10));


	if (count)
	if (count)
		tty_schedule_flip(port);
		tty_flip_buffer_push(port);


	return count;
	return count;
}
}
+2 −2
Original line number Original line Diff line number Diff line
@@ -184,7 +184,7 @@ static void __cold process_random_ready_list(void)


#define warn_unseeded_randomness() \
#define warn_unseeded_randomness() \
	if (IS_ENABLED(CONFIG_WARN_ALL_UNSEEDED_RANDOM) && !crng_ready()) \
	if (IS_ENABLED(CONFIG_WARN_ALL_UNSEEDED_RANDOM) && !crng_ready()) \
		pr_notice("%s called from %pS with crng_init=%d\n", \
		printk_deferred(KERN_NOTICE "random: %s called from %pS with crng_init=%d\n", \
				__func__, (void *)_RET_IP_, crng_init)
				__func__, (void *)_RET_IP_, crng_init)




+5 −25
Original line number Original line Diff line number Diff line
@@ -203,9 +203,9 @@ static inline bool cdns_is_holdquirk(struct cdns_i2c *id, bool hold_wrkaround)
 */
 */
static irqreturn_t cdns_i2c_isr(int irq, void *ptr)
static irqreturn_t cdns_i2c_isr(int irq, void *ptr)
{
{
	unsigned int isr_status, avail_bytes, updatetx;
	unsigned int isr_status, avail_bytes;
	unsigned int bytes_to_send;
	unsigned int bytes_to_send;
	bool hold_quirk;
	bool updatetx;
	struct cdns_i2c *id = ptr;
	struct cdns_i2c *id = ptr;
	/* Signal completion only after everything is updated */
	/* Signal completion only after everything is updated */
	int done_flag = 0;
	int done_flag = 0;
@@ -224,11 +224,7 @@ static irqreturn_t cdns_i2c_isr(int irq, void *ptr)
	 * Check if transfer size register needs to be updated again for a
	 * Check if transfer size register needs to be updated again for a
	 * large data receive operation.
	 * large data receive operation.
	 */
	 */
	updatetx = 0;
	updatetx = id->recv_count > id->curr_recv_count;
	if (id->recv_count > id->curr_recv_count)
		updatetx = 1;

	hold_quirk = (id->quirks & CDNS_I2C_BROKEN_HOLD_BIT) && updatetx;


	/* When receiving, handle data interrupt and completion interrupt */
	/* When receiving, handle data interrupt and completion interrupt */
	if (id->p_recv_buf &&
	if (id->p_recv_buf &&
@@ -251,7 +247,7 @@ static irqreturn_t cdns_i2c_isr(int irq, void *ptr)
			id->recv_count--;
			id->recv_count--;
			id->curr_recv_count--;
			id->curr_recv_count--;


			if (cdns_is_holdquirk(id, hold_quirk))
			if (cdns_is_holdquirk(id, updatetx))
				break;
				break;
		}
		}


@@ -262,7 +258,7 @@ static irqreturn_t cdns_i2c_isr(int irq, void *ptr)
		 * maintain transfer size non-zero while performing a large
		 * maintain transfer size non-zero while performing a large
		 * receive operation.
		 * receive operation.
		 */
		 */
		if (cdns_is_holdquirk(id, hold_quirk)) {
		if (cdns_is_holdquirk(id, updatetx)) {
			/* wait while fifo is full */
			/* wait while fifo is full */
			while (cdns_i2c_readreg(CDNS_I2C_XFER_SIZE_OFFSET) !=
			while (cdns_i2c_readreg(CDNS_I2C_XFER_SIZE_OFFSET) !=
			       (id->curr_recv_count - CDNS_I2C_FIFO_DEPTH))
			       (id->curr_recv_count - CDNS_I2C_FIFO_DEPTH))
@@ -284,22 +280,6 @@ static irqreturn_t cdns_i2c_isr(int irq, void *ptr)
						  CDNS_I2C_XFER_SIZE_OFFSET);
						  CDNS_I2C_XFER_SIZE_OFFSET);
				id->curr_recv_count = id->recv_count;
				id->curr_recv_count = id->recv_count;
			}
			}
		} else if (id->recv_count && !hold_quirk &&
						!id->curr_recv_count) {

			/* Set the slave address in address register*/
			cdns_i2c_writereg(id->p_msg->addr & CDNS_I2C_ADDR_MASK,
						CDNS_I2C_ADDR_OFFSET);

			if (id->recv_count > CDNS_I2C_TRANSFER_SIZE) {
				cdns_i2c_writereg(CDNS_I2C_TRANSFER_SIZE,
						CDNS_I2C_XFER_SIZE_OFFSET);
				id->curr_recv_count = CDNS_I2C_TRANSFER_SIZE;
			} else {
				cdns_i2c_writereg(id->recv_count,
						CDNS_I2C_XFER_SIZE_OFFSET);
				id->curr_recv_count = id->recv_count;
			}
		}
		}


		/* Clear hold (if not repeated start) and signal completion */
		/* Clear hold (if not repeated start) and signal completion */
+19 −8
Original line number Original line Diff line number Diff line
@@ -642,16 +642,20 @@ static int rtsx_usb_probe(struct usb_interface *intf,


	ucr->pusb_dev = usb_dev;
	ucr->pusb_dev = usb_dev;


	ucr->iobuf = usb_alloc_coherent(ucr->pusb_dev, IOBUF_SIZE,
	ucr->cmd_buf = kmalloc(IOBUF_SIZE, GFP_KERNEL);
			GFP_KERNEL, &ucr->iobuf_dma);
	if (!ucr->cmd_buf)
	if (!ucr->iobuf)
		return -ENOMEM;
		return -ENOMEM;


	ucr->rsp_buf = kmalloc(IOBUF_SIZE, GFP_KERNEL);
	if (!ucr->rsp_buf) {
		ret = -ENOMEM;
		goto out_free_cmd_buf;
	}

	usb_set_intfdata(intf, ucr);
	usb_set_intfdata(intf, ucr);


	ucr->vendor_id = id->idVendor;
	ucr->vendor_id = id->idVendor;
	ucr->product_id = id->idProduct;
	ucr->product_id = id->idProduct;
	ucr->cmd_buf = ucr->rsp_buf = ucr->iobuf;


	mutex_init(&ucr->dev_mutex);
	mutex_init(&ucr->dev_mutex);


@@ -679,8 +683,11 @@ static int rtsx_usb_probe(struct usb_interface *intf,


out_init_fail:
out_init_fail:
	usb_set_intfdata(ucr->pusb_intf, NULL);
	usb_set_intfdata(ucr->pusb_intf, NULL);
	usb_free_coherent(ucr->pusb_dev, IOBUF_SIZE, ucr->iobuf,
	kfree(ucr->rsp_buf);
			ucr->iobuf_dma);
	ucr->rsp_buf = NULL;
out_free_cmd_buf:
	kfree(ucr->cmd_buf);
	ucr->cmd_buf = NULL;
	return ret;
	return ret;
}
}


@@ -693,8 +700,12 @@ static void rtsx_usb_disconnect(struct usb_interface *intf)
	mfd_remove_devices(&intf->dev);
	mfd_remove_devices(&intf->dev);


	usb_set_intfdata(ucr->pusb_intf, NULL);
	usb_set_intfdata(ucr->pusb_intf, NULL);
	usb_free_coherent(ucr->pusb_dev, IOBUF_SIZE, ucr->iobuf,

			ucr->iobuf_dma);
	kfree(ucr->cmd_buf);
	ucr->cmd_buf = NULL;

	kfree(ucr->rsp_buf);
	ucr->rsp_buf = NULL;
}
}


#ifdef CONFIG_PM
#ifdef CONFIG_PM
Loading