Linux 4.4.62
Greg KH
maintainerI'm announcing the release of the 4.4.62 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/mips/Kconfig | 1 arch/mips/include/asm/irq.h | 12 ++ arch/mips/include/asm/stackframe.h | 7 + arch/mips/kernel/asm-offsets.c | 1 arch/mips/kernel/genex.S | 81 ++++++++++++++++-- arch/mips/kernel/irq.c | 11 ++ arch/mips/kernel/process.c | 15 +++ block/blk-mq.c | 6 - drivers/crypto/caam/ctrl.c | 3 drivers/gpu/drm/i915/i915_drv.h | 2 drivers/gpu/drm/i915/i915_irq.c | 73 ++++++---------- drivers/gpu/drm/i915/intel_pm.c | 12 ++ drivers/mtd/bcm47xxpart.c | 10 -- drivers/net/ethernet/ibm/ibmveth.c | 65 ++++++++++++++ drivers/net/ethernet/ibm/ibmveth.h | 1 drivers/net/ethernet/mellanox/mlx4/cq.c | 38 ++++---- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 8 + drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 5 - drivers/usb/core/hub.c | 11 ++ drivers/usb/dwc3/gadget.c | 21 +++- net/packet/af_packet.c | 4 22 files changed, 293 insertions(+), 96 deletions(-)
Andrey Konovalov (1):
net/packet: fix overflow in check for priv area size
Chris Wilson (1):
drm/i915: Stop using RP_DOWN_EI on Baytrail
Eugenia Emantayev (1):
net/mlx4_en: Fix bad WQE issue
Gabriel Krisman Bertazi (1):
blk-mq: Avoid memory reclaim when remapping queues
Greg Kroah-Hartman (1):
Linux 4.4.62
Guenter Roeck (1):
usb: hub: Wait for connection to be reestablished after port reset
Horia Geantă (1):
crypto: caam - fix RNG deinstantiation error checking
Jack Morgenstein (2):
net/mlx4_core: Fix racy CQ (Completion Queue) free
net/mlx4_core: Fix when to save some qp context flags for dynamic VST to VGT transitions
Janusz Dziedzic (1):
usb: dwc3: gadget: delay unmap of bounced requests
Matt Redfearn (6):
MIPS: Introduce irq_stack
MIPS: Stack unwinding while on IRQ stack
MIPS: Only change $28 to thread_info if coming from user mode
MIPS: Switch to the irq_stack in interrupts
MIPS: Select HAVE_IRQ_EXIT_ON_IRQ_STACK
MIPS: IRQ Stack: Fix erroneous jal to plat_irq_dispatch
Mika Kuoppala (1):
drm/i915: Avoid tweaking evaluation thresholds on Baytrail v3
Rafał Miłecki (1):
mtd: bcm47xxpart: fix parsing first block after aligned TRX
Thomas Falcon (1):
ibmveth: set correct gso_size and gso_type
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 61 +SUBLEVEL = 62 EXTRAVERSION = NAME = Blurry Fish Butt
arch/mips/Kconfig +1 -0
@@ -9,6 +9,7 @@ config MIPS select HAVE_CONTEXT_TRACKING select HAVE_GENERIC_DMA_COHERENT select HAVE_IDE + select HAVE_IRQ_EXIT_ON_IRQ_STACK select HAVE_OPROFILE select HAVE_PERF_EVENTS select PERF_USE_VMALLOC
arch/mips/include/asm/irq.h +12 -0
@@ -17,6 +17,18 @@#include <irq.h> +#define IRQ_STACK_SIZE THREAD_SIZE + +extern void *irq_stack[NR_CPUS ]; + +static inline bool on_irq_stack (int cpu,unsigned long sp) +{ +unsigned long low = (unsigned long )irq_stack[cpu]; +unsigned long high = low +IRQ_STACK_SIZE ; + +return (low <= sp && sp <= high); +} +#ifdef CONFIG_I8259 static inline int irq_canonicalize (int irq) {
arch/mips/include/asm/stackframe.h +7 -0
@@ -216,12 +216,19 @@ LONG_S $25, PT_R25(sp) LONG_S $28, PT_R28(sp) LONG_S $31, PT_R31(sp) + + /* Set thread_info if we're coming from user mode */ + mfc0 k0, CP0_STATUS + sll k0, 3 /* extract cu0 bit */ + bltz k0, 9f + ori $28, sp, _THREAD_MASK xori $28, _THREAD_MASK #ifdef CONFIG_CPU_CAVIUM_OCTEON .set mips64 pref 0, 0($28) /* Prefetch the current pointer */ #endif +9: .set pop .endm
arch/mips/kernel/asm-offsets.c +1 -0
@@ -101,6 +101,7 @@ void output_thread_info_defines(void)OFFSET (TI_REGS , thread_info, regs);DEFINE (_THREAD_SIZE,THREAD_SIZE );DEFINE (_THREAD_MASK,THREAD_MASK ); +DEFINE (_IRQ_STACK_SIZE,IRQ_STACK_SIZE );BLANK (); }
arch/mips/kernel/genex.S +76 -5
93 lines not on this page · raw message
arch/mips/kernel/irq.c +11 -0
@@ -25,6 +25,8 @@#include <linux/atomic.h> #include <asm/uaccess.h> +void *irq_stack[NR_CPUS ]; +/* * 'what should we do if we get a hw irq event on an illegal vector'. * each architecture has to answer this themselves.
@@ -55,6 +57,15 @@ void __init init_IRQ(void)irq_set_noprobe (i);arch_init_irq (); + +for_each_possible_cpu (i) { +int irq_pages =IRQ_STACK_SIZE /PAGE_SIZE ; +void *s = (void *)__get_free_pages (GFP_KERNEL , irq_pages); + + irq_stack[i] = s; +pr_debug ("CPU%d IRQ stack at 0x%p - 0x%p\n" , i, + irq_stack[i], irq_stack[i] +IRQ_STACK_SIZE ); + } }#ifdef CONFIG_DEBUG_STACKOVERFLOW
arch/mips/kernel/process.c +14 -1
@@ -32,6 +32,7 @@#include <asm/cpu.h> #include <asm/dsp.h> #include <asm/fpu.h> +#include <asm/irq.h> #include <asm/msa.h> #include <asm/pgtable.h> #include <asm/mipsregs.h>
@@ -552,7 +553,19 @@ EXPORT_SYMBOL(unwind_stack_by_address);unsigned long unwind_stack (struct task_struct *task,unsigned long *sp,unsigned long pc,unsigned long *ra) { -unsigned long stack_page = (unsigned long )task_stack_page (task); +unsigned long stack_page =0 ; +int cpu; + +for_each_possible_cpu (cpu) { +if (on_irq_stack (cpu, *sp)) { + stack_page = (unsigned long )irq_stack[cpu]; +break ; + } + } + +if (!stack_page) + stack_page = (unsigned long )task_stack_page (task); +return unwind_stack_by_address (stack_page, sp, pc, ra); }#endif
block/blk-mq.c +3 -3
@@ -1470,7 +1470,7 @@ static struct blk_mq_tags *blk_mq_init_rq_map(struct blk_mq_tag_set *set,INIT_LIST_HEAD (&tags->page_list); tags->rqs =kzalloc_node (set->queue_depth *sizeof (struct request *), -GFP_KERNEL | __GFP_NOWARN | __GFP_NORETRY, +GFP_NOIO | __GFP_NOWARN | __GFP_NORETRY, set->numa_node);if (!tags->rqs) {blk_mq_free_tags (tags);
@@ -1496,7 +1496,7 @@ static struct blk_mq_tags *blk_mq_init_rq_map(struct blk_mq_tag_set *set, do { page = alloc_pages_node(set->numa_node, - GFP_KERNEL | __GFP_NOWARN | __GFP_NORETRY | __GFP_ZERO, + GFP_NOIO | __GFP_NOWARN | __GFP_NORETRY | __GFP_ZERO, this_order); if (page) break;
@@ -1517,7 +1517,7 @@ static struct blk_mq_tags *blk_mq_init_rq_map(struct blk_mq_tag_set *set,* Allow kmemleak to scan these pages as they contain pointers * to additional allocations like via ops->init_request(). */ -kmemleak_alloc (p,order_to_size (this_order),1 ,GFP_KERNEL ); +kmemleak_alloc (p,order_to_size (this_order),1 ,GFP_NOIO ); entries_per_page =order_to_size (this_order) / rq_size; to_do =min (entries_per_page, set->queue_depth - i); left -= to_do * rq_size;
drivers/crypto/caam/ctrl.c +2 -1
@@ -278,7 +278,8 @@ static int deinstantiate_rng(struct device *ctrldev, int state_handle_mask)/* Try to run it through DECO0 */ ret =run_descriptor_deco0 (ctrldev, desc, &status); -if (ret || status) { +if (ret || + (status && status !=JRSTA_SSRC_JUMP_HALT_CC )) {dev_err (ctrldev,"Failed to deinstantiate RNG4 SH%d\n" , sh_idx);
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -1159,7 +1159,7 @@ struct intel_gen6_power_mgmt {struct intel_rps_client semaphores, mmioflips;/* manual wa residency calculations */ -struct intel_rps_ei up_ei, down_ei; +struct intel_rps_ei ei;/* * Protects RPS/RC6 register access and PCU communication.
drivers/gpu/drm/i915/i915_irq.c +28 -45
103 lines not on this page · raw message
drivers/gpu/drm/i915/intel_pm.c +10 -2
@@ -4376,6 +4376,12 @@ static void gen6_set_rps_thresholds(struct drm_i915_private *dev_priv, u8 val)break ; } +/* When byt can survive without system hang with dynamic +* sw freq adjustments, this restriction can be lifted. +*/ +if (IS_VALLEYVIEW (dev_priv)) + goto skip_hw_write; +I915_WRITE (GEN6_RP_UP_EI ,GT_INTERVAL_FROM_US (dev_priv, ei_up)); I915_WRITE(GEN6_RP_UP_THRESHOLD,
@@ -4394,6 +4400,7 @@ static void gen6_set_rps_thresholds(struct drm_i915_private *dev_priv, u8 val)GEN6_RP_UP_BUSY_AVG | GEN6_RP_DOWN_IDLE_AVG); +skip_hw_write: dev_priv->rps.power = new_power; dev_priv->rps.up_threshold = threshold_up; dev_priv->rps.down_threshold = threshold_down;
@@ -4404,8 +4411,9 @@ static u32 gen6_rps_pm_mask(struct drm_i915_private *dev_priv, u8 val) {u32 mask =0 ; +/* We use UP_EI_EXPIRED interupts for both up/down in manual mode */ if (val > dev_priv->rps.min_freq_softlimit) - mask |=GEN6_PM_RP_DOWN_EI_EXPIRED |GEN6_PM_RP_DOWN_THRESHOLD |GEN6_PM_RP_DOWN_TIMEOUT ; + mask |=GEN6_PM_RP_UP_EI_EXPIRED |GEN6_PM_RP_DOWN_THRESHOLD |GEN6_PM_RP_DOWN_TIMEOUT ;if (val < dev_priv->rps.max_freq_softlimit) mask |=GEN6_PM_RP_UP_EI_EXPIRED |GEN6_PM_RP_UP_THRESHOLD ;
@@ -4509,7 +4517,7 @@ void gen6_rps_busy(struct drm_i915_private *dev_priv) {mutex_lock (&dev_priv->rps.hw_lock);if (dev_priv->rps.enabled) { -if (dev_priv->pm_rps_events & (GEN6_PM_RP_DOWN_EI_EXPIRED |GEN6_PM_RP_UP_EI_EXPIRED )) +if (dev_priv->pm_rps_events &GEN6_PM_RP_UP_EI_EXPIRED )gen6_rps_reset_ei (dev_priv);I915_WRITE (GEN6_PMINTRMSK ,gen6_rps_pm_mask (dev_priv, dev_priv->rps.cur_freq));
drivers/mtd/bcm47xxpart.c +4 -6
@@ -225,12 +225,10 @@ static int bcm47xxpart_parse(struct mtd_info *master, last_trx_part = curr_part -1 ; -/* -* We have whole TRX scanned, skip to the next part. Use -* roundown (not roundup), as the loop will increase -* offset in next step. -*/ - offset =rounddown (offset + trx->length, blocksize); +/* Jump to the end of TRX */ + offset =roundup (offset + trx->length, blocksize); +/* Next loop iteration will increase the offset */ + offset -= blocksize;continue ; }
drivers/net/ethernet/ibm/ibmveth.c +63 -2
108 lines not on this page · raw message
drivers/net/ethernet/ibm/ibmveth.h +1 -0
@@ -209,6 +209,7 @@ struct ibmveth_rx_q_entry {#define IBMVETH_RXQ_TOGGLE 0x80000000#define IBMVETH_RXQ_TOGGLE_SHIFT 31#define IBMVETH_RXQ_VALID 0x40000000 +#define IBMVETH_RXQ_LRG_PKT 0x04000000#define IBMVETH_RXQ_NO_CSUM 0x02000000#define IBMVETH_RXQ_CSUM_GOOD 0x01000000#define IBMVETH_RXQ_OFF_MASK 0x0000FFFF
drivers/net/ethernet/mellanox/mlx4/cq.c +20 -18
@@ -101,13 +101,19 @@ void mlx4_cq_completion(struct mlx4_dev *dev, u32 cqn) {struct mlx4_cq *cq; +rcu_read_lock (); cq =radix_tree_lookup (&mlx4_priv (dev)->cq_table.tree, cqn & (dev->caps.num_cqs -1 )); +rcu_read_unlock (); +if (!cq) {mlx4_dbg (dev,"Completion event for bogus CQ %08x\n" , cqn);return ; } +/* Acessing the CQ outside of rcu_read_lock is safe, because +* the CQ is freed only after interrupt handling is completed. +*/ ++cq->arm_sn; cq->comp (cq);
@@ -118,23 +124,19 @@ void mlx4_cq_event(struct mlx4_dev *dev, u32 cqn, int event_type)struct mlx4_cq_table *cq_table = &mlx4_priv (dev)->cq_table;struct mlx4_cq *cq; -spin_lock (&cq_table->lock); - +rcu_read_lock (); cq =radix_tree_lookup (&cq_table->tree, cqn & (dev->caps.num_cqs -1 )); -if (cq) -atomic_inc (&cq->refcount); - -spin_unlock (&cq_table->lock); +rcu_read_unlock ();if (!cq) { -mlx4_warn (dev,"Async event for bogus CQ %08x\n" , cqn); +mlx4_dbg (dev,"Async event for bogus CQ %08x\n" , cqn);return ; } +/* Acessing the CQ outside of rcu_read_lock is safe, because +* the CQ is freed only after interrupt handling is completed. +*/ cq->event (cq, event_type); - -if (atomic_dec_and_test (&cq->refcount)) -complete (&cq->free); } static int mlx4_SW2HW_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
@@ -301,9 +303,9 @@ int mlx4_cq_alloc(struct mlx4_dev *dev, int nent,if (err)return err; -spin_lock_irq (&cq_table->lock); +spin_lock (&cq_table->lock); err =radix_tree_insert (&cq_table->tree, cq->cqn, cq); -spin_unlock_irq (&cq_table->lock); +spin_unlock (&cq_table->lock);if (err) goto err_icm;
@@ -347,9 +349,9 @@ int mlx4_cq_alloc(struct mlx4_dev *dev, int nent,return 0 ; err_radix: -spin_lock_irq (&cq_table->lock); +spin_lock (&cq_table->lock);radix_tree_delete (&cq_table->tree, cq->cqn); -spin_unlock_irq (&cq_table->lock); +spin_unlock (&cq_table->lock); err_icm:mlx4_cq_free_icm (dev, cq->cqn);
@@ -368,15 +370,15 @@ void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq)if (err)mlx4_warn (dev,"HW2SW_CQ failed (%d) for CQN %06x\n" , err, cq->cqn); +spin_lock (&cq_table->lock); +radix_tree_delete (&cq_table->tree, cq->cqn); +spin_unlock (&cq_table->lock); +synchronize_irq (priv->eq_table.eq[MLX4_CQ_TO_EQ_VECTOR (cq->vector)].irq);if (priv->eq_table.eq[MLX4_CQ_TO_EQ_VECTOR (cq->vector)].irq != priv->eq_table.eq[MLX4_EQ_ASYNC ].irq)synchronize_irq (priv->eq_table.eq[MLX4_EQ_ASYNC ].irq); -spin_lock_irq (&cq_table->lock); -radix_tree_delete (&cq_table->tree, cq->cqn); -spin_unlock_irq (&cq_table->lock); -if (atomic_dec_and_test (&cq->refcount))complete (&cq->free);wait_for_completion (&cq->free);
drivers/net/ethernet/mellanox/mlx4/en_rx.c +7 -1
@@ -439,8 +439,14 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv) ring->cqn = priv->rx_cq[ring_ind]->mcq.cqn; ring->stride = stride; -if (ring->stride <=TXBB_SIZE ) +if (ring->stride <=TXBB_SIZE ) { +/* Stamp first unused send wqe */ +__be32 *ptr = (__be32 *)ring->buf; +__be32 stamp =cpu_to_be32 (1 <<STAMP_SHIFT ); + *ptr = stamp; +/* Move pointer to start of rx section */ ring->buf +=TXBB_SIZE ; + } ring->log_stride =ffs (ring->stride) -1 ; ring->buf_size = ring->size * ring->stride;
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +3 -2
@@ -2955,6 +2955,9 @@ int mlx4_RST2INIT_QP_wrapper(struct mlx4_dev *dev, int slave,put_res (dev, slave, srqn,RES_SRQ ); qp->srq = srq; } + +/* Save param3 for dynamic changes from VST back to VGT */ + qp->param3 = qpc->param3;put_res (dev, slave, rcqn,RES_CQ );put_res (dev, slave, mtt_base,RES_MTT );res_end_move (dev, slave,RES_QP , qpn);
@@ -3747,7 +3750,6 @@ int mlx4_INIT2RTR_QP_wrapper(struct mlx4_dev *dev, int slave,int qpn = vhcr->in_modifier &0x7fffff ;struct res_qp *qp;u8 orig_sched_queue; -__be32 orig_param3 = qpc->param3;u8 orig_vlan_control = qpc->pri_path.vlan_control;u8 orig_fvl_rx = qpc->pri_path.fvl_rx;u8 orig_pri_path_fl = qpc->pri_path.fl;
@@ -3789,7 +3791,6 @@ out:*/ if (!err) { qp->sched_queue = orig_sched_queue; - qp->param3 = orig_param3; qp->vlan_control = orig_vlan_control; qp->fvl_rx = orig_fvl_rx; qp->pri_path_fl = orig_pri_path_fl;
drivers/usb/core/hub.c +9 -2
@@ -2602,8 +2602,15 @@ static int hub_port_wait_reset(struct usb_hub *hub, int port1,if (ret <0 )return ret; -/* The port state is unknown until the reset completes. */ -if (!(portstatus &USB_PORT_STAT_RESET )) +/* +* The port state is unknown until the reset completes. +* +* On top of that, some chips may require additional time +* to re-establish a connection after the reset is complete, +* so also wait for the connection to be re-established. +*/ +if (!(portstatus &USB_PORT_STAT_RESET ) && + (portstatus &USB_PORT_STAT_CONNECTION ))break ;/* switch to the long delay after two short delay failures */
drivers/usb/dwc3/gadget.c +17 -4
@@ -235,6 +235,7 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req, int status) {struct dwc3 *dwc = dep->dwc; +unsigned int unmap_after_complete = false;int i;if (req->queued) {
@@ -259,11 +260,19 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,if (req->request.status == -EINPROGRESS ) req->request.status = status; -if (dwc->ep0_bounced && dep->number <=1 ) +/* +* NOTICE we don't want to unmap before calling ->complete() if we're +* dealing with a bounced ep0 request. If we unmap it here, we would end +* up overwritting the contents of req->buf and this could confuse the +* gadget driver. +*/ +if (dwc->ep0_bounced && dep->number <=1 ) { dwc->ep0_bounced = false; - -usb_gadget_unmap_request (&dwc->gadget, &req->request, - req->direction); + unmap_after_complete = true; + }else { +usb_gadget_unmap_request (&dwc->gadget, + &req->request, req->direction); + } dev_dbg(dwc->dev, "request %p from %s completed %d/%d ===> %d\n", req, dep->name, req->request.actual,
@@ -273,6 +282,10 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,spin_unlock (&dwc->lock);usb_gadget_giveback_request (&dep->endpoint, &req->request);spin_lock (&dwc->lock); + +if (unmap_after_complete) +usb_gadget_unmap_request (&dwc->gadget, + &req->request, req->direction); }int dwc3_send_gadget_generic_command (struct dwc3 *dwc,unsigned cmd,u32 param)
net/packet/af_packet.c +2 -2
@@ -4138,8 +4138,8 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,if (unlikely (!PAGE_ALIGNED (req->tp_block_size))) goto out;if (po->tp_version >=TPACKET_V3 && - (int )(req->tp_block_size - -BLK_PLUS_PRIV (req_u->req3.tp_sizeof_priv)) <=0 ) + req->tp_block_size <= +BLK_PLUS_PRIV ((u64 )req_u->req3.tp_sizeof_priv)) goto out;if (unlikely (req->tp_frame_size < po->tp_hdrlen + po->tp_reserve))