Linux 4.14.220
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.14.220 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 - arch/x86/include/asm/msr.h | 4 +- drivers/acpi/thermal.c | 55 ++++++++++++++++++++++++----------- drivers/base/core.c | 19 ++++++++++-- drivers/net/dsa/bcm_sf2.c | 8 +++-- drivers/net/ethernet/ibm/ibmvnic.c | 6 +++ drivers/phy/motorola/phy-cpcap-usb.c | 19 ++++++++---- drivers/scsi/ibmvscsi/ibmvfc.c | 4 +- drivers/scsi/libfc/fc_exch.c | 16 ++++++++-- drivers/scsi/scsi_transport_srp.c | 9 +++++ include/linux/kthread.h | 3 + kernel/kthread.c | 27 ++++++++++++++++- kernel/smpboot.c | 1 net/core/gen_estimator.c | 11 ++++--- net/mac80211/rx.c | 2 + net/sched/sch_api.c | 3 + tools/objtool/elf.c | 7 +++- 17 files changed, 154 insertions(+), 42 deletions(-)
Benjamin Gaignard (1):
base: core: Remove WARN_ON from link dependencies check
Brian King (1):
scsi: ibmvfc: Set default timeout to avoid crash during migration
Eric Dumazet (2):
net_sched: reject silly cell_log in qdisc_get_rtab()
net_sched: gen_estimator: support large ewma log
Felix Fietkau (1):
mac80211: fix fast-rx encryption check
Greg Kroah-Hartman (1):
Linux 4.14.220
Javed Hasan (1):
scsi: libfc: Avoid invoking response handler twice if ep is already completed
Josh Poimboeuf (1):
objtool: Don't fail on missing symbol table
Lijun Pan (1):
ibmvnic: Ensure that CRQ entry read are correctly ordered
Martin Wilck (1):
scsi: scsi_transport_srp: Don't block target in failfast state
Pan Bian (1):
net: dsa: bcm_sf2: put device node before return
Peter Zijlstra (2):
x86: __always_inline __{rd,wr}msr()
kthread: Extract KTHREAD_IS_PER_CPU
Rafael J. Wysocki (2):
ACPI: thermal: Do not call acpi_thermal_check() directly driver core: Extend device_is_dependent()
Tony Lindgren (1):
phy: cpcap-usb: Fix warning for missing regulator_disable
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 219 +SUBLEVEL = 220 EXTRAVERSION = NAME = Petit Gorille
arch/x86/include/asm/msr.h +2 -2
@@ -88,7 +88,7 @@ static inline void do_trace_rdpmc(unsigned int msr, u64 val, int failed) {}* think of extending them - you will be slapped with a stinking trout or a frozen * shark will reach you, wherever you are! You've been warned. */ -static inline unsigned long long notrace __rdmsr (unsigned int msr) +static __always_inline unsigned long long __rdmsr (unsigned int msr) {DECLARE_ARGS (val, low, high);
@@ -100,7 +100,7 @@ static inline unsigned long long notrace __rdmsr(unsigned int msr)return EAX_EDX_VAL (val, low, high); } -static inline void notrace __wrmsr(unsigned int msr, u32 low, u32 high) +static __always_inline void __wrmsr(unsigned int msr, u32 low, u32 high) { asmvolatile ("1: wrmsr\n" "2:\n"
drivers/acpi/thermal.c +38 -17
117 lines not on this page · raw message
drivers/base/core.c +17 -2
@@ -96,6 +96,16 @@ void device_links_read_unlock(int not_used) }#endif /* !CONFIG_SRCU */ +static bool device_is_ancestor (struct device *dev,struct device *target) +{ +while (target->parent) { + target = target->parent; +if (dev == target) +return true; + } +return false; +} +/** * device_is_dependent - Check if one device depends on another one * @dev: Device to check dependencies for.
@@ -109,7 +119,12 @@ static int device_is_dependent(struct device *dev, void *target)struct device_link *link;int ret; -if (WARN_ON (dev == target)) +/* +* The "ancestors" check is needed to catch the case when the target +* device has not been completely initialized yet and it is still +* missing from the list of children of its parent device. +*/ +if (dev == target ||device_is_ancestor (dev, target))return 1 ; ret =device_for_each_child (dev, target, device_is_dependent);
@@ -117,7 +132,7 @@ static int device_is_dependent(struct device *dev, void *target)return ret;list_for_each_entry (link, &dev->links.consumers, s_node) { -if (WARN_ON (link->consumer == target)) +if (link->consumer == target)return 1 ; ret =device_is_dependent (link->consumer, target);
drivers/net/dsa/bcm_sf2.c +6 -2
@@ -540,15 +540,19 @@ static int bcm_sf2_mdio_register(struct dsa_switch *ds)/* Find our integrated MDIO bus node */ dn =of_find_compatible_node (NULL ,NULL ,"brcm,unimac-mdio" ); priv->master_mii_bus =of_mdio_find_bus (dn); -if (!priv->master_mii_bus) +if (!priv->master_mii_bus) { +of_node_put (dn);return -EPROBE_DEFER ; + }get_device (&priv->master_mii_bus->dev); priv->master_mii_dn = dn; priv->slave_mii_bus =devm_mdiobus_alloc (ds->dev); -if (!priv->slave_mii_bus) +if (!priv->slave_mii_bus) { +of_node_put (dn);return -ENOMEM ; + } priv->slave_mii_bus->priv = priv; priv->slave_mii_bus->name ="sf2 slave mii" ;
drivers/net/ethernet/ibm/ibmvnic.c +6 -0
@@ -3682,6 +3682,12 @@ static void ibmvnic_tasklet(void *data)while (!done) {/* Pull all the valid messages off the CRQ */ while ((crq =ibmvnic_next_crq (adapter)) !=NULL ) { +/* This barrier makes sure ibmvnic_next_crq()'s +* crq->generic.first & IBMVNIC_CRQ_CMD_RSP is loaded +* before ibmvnic_handle_crq()'s +* switch(gen_crq->first) and switch(gen_crq->cmd). +*/ +dma_rmb ();ibmvnic_handle_crq (crq, adapter); crq->generic.first =0 ; }
drivers/phy/motorola/phy-cpcap-usb.c +13 -6
@@ -623,35 +623,42 @@ static int cpcap_usb_phy_probe(struct platform_device *pdev) generic_phy =devm_phy_create (ddata->dev,NULL , &ops);if (IS_ERR (generic_phy)) { error =PTR_ERR (generic_phy); -return PTR_ERR (generic_phy); + goto out_reg_disable; }phy_set_drvdata (generic_phy, ddata); phy_provider =devm_of_phy_provider_register (ddata->dev, of_phy_simple_xlate); -if (IS_ERR (phy_provider)) -return PTR_ERR (phy_provider); +if (IS_ERR (phy_provider)) { + error =PTR_ERR (phy_provider); + goto out_reg_disable; + } error =cpcap_usb_init_optional_pins (ddata);if (error) -return error; + goto out_reg_disable;cpcap_usb_init_optional_gpios (ddata); error =cpcap_usb_init_iio (ddata);if (error) -return error; + goto out_reg_disable; error =cpcap_usb_init_interrupts (pdev, ddata);if (error) -return error; + goto out_reg_disable;usb_add_phy_dev (&ddata->phy);atomic_set (&ddata->active,1 );schedule_delayed_work (&ddata->detect_work,msecs_to_jiffies (1 ));return 0 ; + +out_reg_disable: +regulator_disable (ddata->vusb); + +return error; }static int cpcap_usb_phy_remove (struct platform_device *pdev)
drivers/scsi/ibmvscsi/ibmvfc.c +3 -1
@@ -2891,8 +2891,10 @@ static int ibmvfc_slave_configure(struct scsi_device *sdev)unsigned long flags =0 ;spin_lock_irqsave (shost->host_lock, flags); -if (sdev->type ==TYPE_DISK ) +if (sdev->type ==TYPE_DISK ) { sdev->allow_restart =1 ; +blk_queue_rq_timeout (sdev->request_queue,120 *HZ ); + }spin_unlock_irqrestore (shost->host_lock, flags);return 0 ; }
drivers/scsi/libfc/fc_exch.c +14 -2
@@ -1631,8 +1631,13 @@ static void fc_exch_recv_seq_resp(struct fc_exch_mgr *mp, struct fc_frame *fp) rc =fc_exch_done_locked (ep);WARN_ON (fc_seq_exch (sp) != ep);spin_unlock_bh (&ep->ex_lock); -if (!rc) +if (!rc) {fc_exch_delete (ep); + }else { +FC_EXCH_DBG (ep,"ep is completed already," +"hence skip calling the resp\n" ); + goto skip_resp; + } }/*
@@ -1651,6 +1656,7 @@ static void fc_exch_recv_seq_resp(struct fc_exch_mgr *mp, struct fc_frame *fp)if (!fc_invoke_resp (ep, sp, fp))fc_frame_free (fp); +skip_resp:fc_exch_release (ep);return ; rel:
@@ -1907,10 +1913,16 @@ static void fc_exch_reset(struct fc_exch *ep)fc_exch_hold (ep); -if (!rc) +if (!rc) {fc_exch_delete (ep); + }else { +FC_EXCH_DBG (ep,"ep is completed already," +"hence skip calling the resp\n" ); + goto skip_resp; + }fc_invoke_resp (ep, sp,ERR_PTR (-FC_EX_CLOSED )); +skip_resp:fc_seq_set_resp (sp,NULL , ep->arg);fc_exch_release (ep); }
drivers/scsi/scsi_transport_srp.c +8 -1
@@ -555,7 +555,14 @@ int srp_reconnect_rport(struct srp_rport *rport) res =mutex_lock_interruptible (&rport->mutex);if (res) goto out; -scsi_target_block (&shost->shost_gendev); +if (rport->state !=SRP_RPORT_FAIL_FAST ) +/* +* sdev state must be SDEV_TRANSPORT_OFFLINE, transition +* to SDEV_BLOCK is illegal. Calling scsi_target_unblock() +* later is ok though, scsi_internal_device_unblock_nowait() +* treats SDEV_TRANSPORT_OFFLINE like SDEV_BLOCK. +*/ +scsi_target_block (&shost->shost_gendev); res = rport->state !=SRP_RPORT_LOST ? i->f->reconnect (rport) : -ENODEV ;pr_debug ("%s (state %d): transport.reconnect() returned %d\n" ,dev_name (&shost->shost_gendev), rport->state, res);
include/linux/kthread.h +3 -0
@@ -31,6 +31,9 @@ struct task_struct *kthread_create_on_cpu(int (*threadfn)(void *data),unsigned int cpu, const char *namefmt); +void kthread_set_per_cpu (struct task_struct *k,int cpu); +bool kthread_is_per_cpu (struct task_struct *k); +/** * kthread_run - create and wake a thread. * @threadfn: the function to run until signal_pending(current).
kernel/kthread.c +26 -1
@@ -433,11 +433,36 @@ struct task_struct *kthread_create_on_cpu(int (*threadfn)(void *data),return p;kthread_bind (p, cpu);/* CPU hotplug need to bind once again when unparking the thread. */ -set_bit (KTHREAD_IS_PER_CPU , &to_kthread (p)->flags);to_kthread (p)->cpu = cpu;return p; } +void kthread_set_per_cpu (struct task_struct *k,int cpu) +{ +struct kthread *kthread =to_kthread (k); +if (!kthread) +return ; + +WARN_ON_ONCE (!(k->flags &PF_NO_SETAFFINITY )); + +if (cpu <0 ) { +clear_bit (KTHREAD_IS_PER_CPU , &kthread->flags); +return ; + } + + kthread->cpu = cpu; +set_bit (KTHREAD_IS_PER_CPU , &kthread->flags); +} + +bool kthread_is_per_cpu (struct task_struct *k) +{ +struct kthread *kthread =to_kthread (k); +if (!kthread) +return false; + +return test_bit (KTHREAD_IS_PER_CPU , &kthread->flags); +} +/** * kthread_unpark - unpark a thread created by kthread_create(). * @k: thread created by kthread_create().
kernel/smpboot.c +1 -0
@@ -187,6 +187,7 @@ __smpboot_create_thread(struct smp_hotplug_thread *ht, unsigned int cpu)kfree (td);return PTR_ERR (tsk); } +kthread_set_per_cpu (tsk, cpu);/* * Park the thread so that it could start right on the CPU * when it is available.
net/core/gen_estimator.c +7 -4
@@ -84,11 +84,11 @@ static void est_timer(unsigned long arg)u64 rate, brate;est_fetch_counters (est, &b); - brate = (b.bytes - est->last_bytes) << (10 - est->ewma_log - est->intvl_log); - brate -= (est->avbps >> est->ewma_log); + brate = (b.bytes - est->last_bytes) << (10 - est->intvl_log); + brate = (brate >> est->ewma_log) - (est->avbps >> est->ewma_log); - rate = (u64)(b.packets - est->last_packets) << (10 - est->ewma_log - est->intvl_log); - rate -= (est->avpps >> est->ewma_log); + rate = (u64)(b.packets - est->last_packets) << (10 - est->intvl_log); + rate = (rate >> est->ewma_log) - (est->avpps >> est->ewma_log);write_seqcount_begin (&est->seq); est->avbps += brate;
@@ -147,6 +147,9 @@ int gen_new_estimator(struct gnet_stats_basic_packed *bstats,if (parm->interval <-2 || parm->interval >3 )return -EINVAL ; +if (parm->ewma_log ==0 || parm->ewma_log >=31 ) +return -EINVAL ; + est =kzalloc (sizeof (*est),GFP_KERNEL );if (!est)return -ENOBUFS ;
net/mac80211/rx.c +2 -0
@@ -3823,6 +3823,8 @@ void ieee80211_check_fast_rx(struct sta_info *sta)rcu_read_lock (); key =rcu_dereference (sta->ptk[sta->ptk_idx]); +if (!key) + key =rcu_dereference (sdata->default_unicast_key);if (key) {switch (key->conf.cipher) {case WLAN_CIPHER_SUITE_TKIP :
net/sched/sch_api.c +2 -1
@@ -397,7 +397,8 @@ struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, {struct qdisc_rate_table *rtab; -if (tab ==NULL || r->rate ==0 || r->cell_log ==0 || +if (tab ==NULL || r->rate ==0 || + r->cell_log ==0 || r->cell_log >=32 ||nla_len (tab) !=TC_RTAB_SIZE )return NULL ;
tools/objtool/elf.c +5 -2
@@ -226,8 +226,11 @@ static int read_symbols(struct elf *elf) symtab =find_section_by_name (elf,".symtab" );if (!symtab) { -WARN ("missing symbol table" ); -return -1 ; +/* +* A missing symbol table is actually possible if it's an empty +* .o file. This can happen for thunk_64.o. +*/ +return 0 ; } symbols_nr = symtab->sh.sh_size / symtab->sh.sh_entsize;