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

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

Merge 4.14.2 into android-4.14



Changes in 4.14.2
	bio: ensure __bio_clone_fast copies bi_partno
	af_netlink: ensure that NLMSG_DONE never fails in dumps
	vxlan: fix the issue that neigh proxy blocks all icmpv6 packets
	net: cdc_ncm: GetNtbFormat endian fix
	fealnx: Fix building error on MIPS
	net/sctp: Always set scope_id in sctp_inet6_skb_msgname
	ima: do not update security.ima if appraisal status is not INTEGRITY_PASS
	serial: omap: Fix EFR write on RTS deassertion
	serial: 8250_fintek: Fix finding base_port with activated SuperIO
	tpm-dev-common: Reject too short writes
	rcu: Fix up pending cbs check in rcu_prepare_for_idle
	mm/pagewalk.c: report holes in hugetlb ranges
	ocfs2: fix cluster hang after a node dies
	ocfs2: should wait dio before inode lock in ocfs2_setattr()
	ipmi: fix unsigned long underflow
	mm/page_alloc.c: broken deferred calculation
	mm/page_ext.c: check if page_ext is not prepared
	coda: fix 'kernel memory exposure attempt' in fsync
	ipmi: Prefer ACPI system interfaces over SMBIOS ones
	Linux 4.14.2

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parents dc6bfa18 f9f0b03d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 14
SUBLEVEL = 1
SUBLEVEL = 2
EXTRAVERSION =
NAME = Petit Gorille

+1 −0
Original line number Diff line number Diff line
@@ -597,6 +597,7 @@ void __bio_clone_fast(struct bio *bio, struct bio *bio_src)
	 * so we don't set nor calculate new physical/hw segment counts here
	 */
	bio->bi_disk = bio_src->bi_disk;
	bio->bi_partno = bio_src->bi_partno;
	bio_set_flag(bio, BIO_CLONED);
	bio->bi_opf = bio_src->bi_opf;
	bio->bi_write_hint = bio_src->bi_write_hint;
+6 −4
Original line number Diff line number Diff line
@@ -4030,7 +4030,8 @@ smi_from_recv_msg(ipmi_smi_t intf, struct ipmi_recv_msg *recv_msg,
}

static void check_msg_timeout(ipmi_smi_t intf, struct seq_table *ent,
			      struct list_head *timeouts, long timeout_period,
			      struct list_head *timeouts,
			      unsigned long timeout_period,
			      int slot, unsigned long *flags,
			      unsigned int *waiting_msgs)
{
@@ -4043,8 +4044,8 @@ static void check_msg_timeout(ipmi_smi_t intf, struct seq_table *ent,
	if (!ent->inuse)
		return;

	if (timeout_period < ent->timeout) {
		ent->timeout -= timeout_period;
	if (ent->timeout > 0) {
		(*waiting_msgs)++;
		return;
	}
@@ -4110,7 +4111,8 @@ static void check_msg_timeout(ipmi_smi_t intf, struct seq_table *ent,
	}
}

static unsigned int ipmi_timeout_handler(ipmi_smi_t intf, long timeout_period)
static unsigned int ipmi_timeout_handler(ipmi_smi_t intf,
					 unsigned long timeout_period)
{
	struct list_head     timeouts;
	struct ipmi_recv_msg *msg, *msg2;
+23 −10
Original line number Diff line number Diff line
@@ -3424,7 +3424,7 @@ static inline void wait_for_timer_and_thread(struct smi_info *smi_info)
		del_timer_sync(&smi_info->si_timer);
}

static int is_new_interface(struct smi_info *info)
static struct smi_info *find_dup_si(struct smi_info *info)
{
	struct smi_info *e;

@@ -3439,25 +3439,37 @@ static int is_new_interface(struct smi_info *info)
			 */
			if (info->slave_addr && !e->slave_addr)
				e->slave_addr = info->slave_addr;
			return 0;
			return e;
		}
	}

	return 1;
	return NULL;
}

static int add_smi(struct smi_info *new_smi)
{
	int rv = 0;
	struct smi_info *dup;

	mutex_lock(&smi_infos_lock);
	if (!is_new_interface(new_smi)) {
		pr_info(PFX "%s-specified %s state machine: duplicate\n",
	dup = find_dup_si(new_smi);
	if (dup) {
		if (new_smi->addr_source == SI_ACPI &&
		    dup->addr_source == SI_SMBIOS) {
			/* We prefer ACPI over SMBIOS. */
			dev_info(dup->dev,
				 "Removing SMBIOS-specified %s state machine in favor of ACPI\n",
				 si_to_str[new_smi->si_type]);
			cleanup_one_si(dup);
		} else {
			dev_info(new_smi->dev,
				 "%s-specified %s state machine: duplicate\n",
				 ipmi_addr_src_to_str(new_smi->addr_source),
				 si_to_str[new_smi->si_type]);
			rv = -EBUSY;
			goto out_err;
		}
	}

	pr_info(PFX "Adding %s-specified %s state machine\n",
		ipmi_addr_src_to_str(new_smi->addr_source),
@@ -3865,6 +3877,7 @@ static void cleanup_one_si(struct smi_info *to_clean)
		poll(to_clean);
		schedule_timeout_uninterruptible(1);
	}
	if (to_clean->handlers)
		disable_si_irq(to_clean, false);
	while (to_clean->curr_msg || (to_clean->si_state != SI_NORMAL)) {
		poll(to_clean);
+6 −0
Original line number Diff line number Diff line
@@ -110,6 +110,12 @@ ssize_t tpm_common_write(struct file *file, const char __user *buf,
		return -EFAULT;
	}

	if (in_size < 6 ||
	    in_size < be32_to_cpu(*((__be32 *) (priv->data_buffer + 2)))) {
		mutex_unlock(&priv->buffer_mutex);
		return -EINVAL;
	}

	/* atomic tpm command send and result receive. We only hold the ops
	 * lock during this period so that the tpm can be unregistered even if
	 * the char dev is held open.
Loading