Linux 4.4.126
Greg KH
maintainerI'm announcing the release of the 4.4.126 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 - drivers/net/ethernet/arc/emac_rockchip.c | 6 +++-- drivers/net/ethernet/broadcom/bcmsysport.c | 33 +++++++++++++---------------- drivers/net/ethernet/broadcom/bcmsysport.h | 2 - drivers/net/ethernet/freescale/fec_main.c | 2 + drivers/net/ethernet/ti/cpsw.c | 3 +- drivers/net/team/team.c | 4 +-- drivers/s390/net/qeth_core_main.c | 21 +++++++++++++----- drivers/s390/net/qeth_l2_main.c | 2 - drivers/s390/net/qeth_l3_main.c | 2 - drivers/scsi/sg.c | 5 ++-- kernel/irq/manage.c | 4 --- net/core/skbuff.c | 2 - net/dccp/proto.c | 5 ++++ net/ieee802154/6lowpan/core.c | 12 +++++++--- net/ipv4/inet_fragment.c | 3 ++ net/ipv4/ip_sockglue.c | 6 +++-- net/ipv6/ndisc.c | 3 +- net/iucv/af_iucv.c | 4 ++- net/l2tp/l2tp_core.c | 8 +++++-- net/netlink/genetlink.c | 2 - 21 files changed, 81 insertions(+), 50 deletions(-)
Alexey Kodanev (1):
dccp: check sk for closed state in dccp_sendmsg()
Arkadi Sharshevsky (1):
team: Fix double free in error path
Arvind Yadav (1):
net/iucv: Free memory obtained by kzalloc
Christophe JAILLET (1):
net: ethernet: arc: Fix a potential memory leak if an optional regulator is deferred
David Ahern (1):
net: Only honor ifindex in IP_PKTINFO if non-0
Eric Dumazet (2):
l2tp: do not accept arbitrary sockets
ieee802154: 6lowpan: fix possible NULL deref in lowpan_device_event()
Florian Fainelli (2):
net: fec: Fix unbalanced PM runtime calls
net: systemport: Rewrite __bcm_sysport_tx_reclaim()
Greg Kroah-Hartman (2):
Revert "genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs" Linux 4.4.126
Johannes Thumshirn (1):
scsi: sg: don't return bogus Sg_requests
Julian Wiedmann (4):
s390/qeth: free netdevice when removing a card s390/qeth: when thread completes, wake up all waiters s390/qeth: lock read device while queueing next buffer s390/qeth: on channel error, reject further cmd requests
Kirill Tkhai (1):
net: Fix hlist corruptions in inet_evict_bucket()
Lorenzo Bianconi (1):
ipv6: fix access to non-linear packet in ndisc_fill_redirect_hdr_option()
Nicolas Dichtel (1):
netlink: avoid a double skb free in genlmsg_mcast()
SZ Lin (林上智) (1):
net: ethernet: ti: cpsw: add check for in-band mode setting with RGMII PHY interface
Vinicius Costa Gomes (1):
skbuff: Fix not waking applications when errors are enqueued
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 125 +SUBLEVEL = 126 EXTRAVERSION = NAME = Blurry Fish Butt
drivers/net/ethernet/arc/emac_rockchip.c +4 -2
@@ -150,8 +150,10 @@ static int emac_rockchip_probe(struct platform_device *pdev)/* Optional regulator for PHY */ priv->regulator =devm_regulator_get_optional (dev,"phy" );if (IS_ERR (priv->regulator)) { -if (PTR_ERR (priv->regulator) == -EPROBE_DEFER ) -return -EPROBE_DEFER ; +if (PTR_ERR (priv->regulator) == -EPROBE_DEFER ) { + err = -EPROBE_DEFER ; + goto out_clk_disable; + }dev_err (dev,"no regulator found\n" ); priv->regulator =NULL ; }
drivers/net/ethernet/broadcom/bcmsysport.c +15 -18
@@ -729,37 +729,33 @@ static unsigned int __bcm_sysport_tx_reclaim(struct bcm_sysport_priv *priv, struct bcm_sysport_tx_ring *ring) {struct net_device *ndev = priv->netdev; -unsigned int c_index, last_c_index, last_tx_cn, num_tx_cbs;unsigned int pkts_compl =0 , bytes_compl =0 ; +unsigned int txbds_processed =0 ;struct bcm_sysport_cb *cb; +unsigned int txbds_ready; +unsigned int c_index;u32 hw_ind;/* Compute how many descriptors have been processed since last call */ hw_ind =tdma_readl (priv,TDMA_DESC_RING_PROD_CONS_INDEX (ring->index)); c_index = (hw_ind >>RING_CONS_INDEX_SHIFT ) &RING_CONS_INDEX_MASK ; - ring->p_index = (hw_ind &RING_PROD_INDEX_MASK ); - - last_c_index = ring->c_index; - num_tx_cbs = ring->size; - - c_index &= (num_tx_cbs -1 ); - -if (c_index >= last_c_index) - last_tx_cn = c_index - last_c_index; -else - last_tx_cn = num_tx_cbs - last_c_index + c_index; + txbds_ready = (c_index - ring->c_index) &RING_CONS_INDEX_MASK ;netif_dbg (priv, tx_done, ndev, -"ring=%d c_index=%d last_tx_cn=%d last_c_index=%d\n" , - ring->index, c_index, last_tx_cn, last_c_index); +"ring=%d old_c_index=%u c_index=%u txbds_ready=%u\n" , + ring->index, ring->c_index, c_index, txbds_ready); -while (last_tx_cn-- >0 ) { - cb = ring->cbs + last_c_index; +while (txbds_processed < txbds_ready) { + cb = &ring->cbs[ring->clean_index];bcm_sysport_tx_reclaim_one (priv, cb, &bytes_compl, &pkts_compl); ring->desc_count++; - last_c_index++; - last_c_index &= (num_tx_cbs -1 ); + txbds_processed++; + +if (likely (ring->clean_index < ring->size -1 )) + ring->clean_index++; +else + ring->clean_index =0 ; } ring->c_index = c_index;
@@ -1229,6 +1225,7 @@ static int bcm_sysport_init_tx_ring(struct bcm_sysport_priv *priv,netif_napi_add (priv->netdev, &ring->napi, bcm_sysport_tx_poll,64 ); ring->index = index; ring->size = size; + ring->clean_index =0 ; ring->alloc_size = ring->size; ring->desc_cpu = p; ring->desc_count = ring->size;
drivers/net/ethernet/broadcom/bcmsysport.h +1 -1
@@ -638,7 +638,7 @@ struct bcm_sysport_tx_ring {unsigned int desc_count;/* Number of descriptors */ unsigned int curr_desc;/* Current descriptor */ unsigned int c_index;/* Last consumer index */ -unsigned int p_index;/* Current producer index */ +unsigned int clean_index;/* Current clean index */ struct bcm_sysport_cb *cbs;/* Transmit control blocks */ struct dma_desc *desc_cpu;/* CPU view of the descriptor */ struct bcm_sysport_priv *priv;/* private context backpointer */
drivers/net/ethernet/freescale/fec_main.c +2 -0
@@ -3539,6 +3539,8 @@ fec_drv_remove(struct platform_device *pdev)fec_enet_mii_remove (fep);if (fep->reg_phy)regulator_disable (fep->reg_phy); +pm_runtime_put (&pdev->dev); +pm_runtime_disable (&pdev->dev);of_node_put (fep->phy_node);free_netdev (ndev);
drivers/net/ethernet/ti/cpsw.c +2 -1
@@ -878,7 +878,8 @@ static void _cpsw_adjust_link(struct cpsw_slave *slave,/* set speed_in input in case RMII mode is used in 100Mbps */ if (phy->speed ==100 ) mac_control |=BIT (15 ); -else if (phy->speed ==10 ) +/* in band mode only works in 10Mbps RGMII mode */ +else if ((phy->speed ==10 ) &&phy_interface_is_rgmii (phy)) mac_control |=BIT (18 );/* In Band mode */ if (priv->rx_pause)
drivers/net/team/team.c +2 -2
@@ -2380,7 +2380,7 @@ send_done:if (!nlh) { err =__send_and_alloc_skb (&skb, team, portid, send_func);if (err) - goto errout; +return err; goto send_done; }
@@ -2660,7 +2660,7 @@ send_done:if (!nlh) { err =__send_and_alloc_skb (&skb, team, portid, send_func);if (err) - goto errout; +return err; goto send_done; }
drivers/s390/net/qeth_core_main.c +15 -6
@@ -517,8 +517,7 @@ static inline int qeth_is_cq(struct qeth_card *card, unsigned int queue) queue == card->qdio.no_in_queues -1 ; } - -static int qeth_issue_next_read (struct qeth_card *card) +static int __qeth_issue_next_read (struct qeth_card *card) {int rc;struct qeth_cmd_buffer *iob;
@@ -549,6 +548,17 @@ static int qeth_issue_next_read(struct qeth_card *card)return rc; } +static int qeth_issue_next_read (struct qeth_card *card) +{ +int ret; + +spin_lock_irq (get_ccwdev_lock (CARD_RDEV (card))); + ret =__qeth_issue_next_read (card); +spin_unlock_irq (get_ccwdev_lock (CARD_RDEV (card))); + +return ret; +} +static struct qeth_reply *qeth_alloc_reply (struct qeth_card *card) {struct qeth_reply *reply;
@@ -952,7 +962,7 @@ void qeth_clear_thread_running_bit(struct qeth_card *card, unsigned long thread)spin_lock_irqsave (&card->thread_mask_lock, flags); card->thread_running_mask &= ~thread;spin_unlock_irqrestore (&card->thread_mask_lock, flags); -wake_up (&card->wait_q); +wake_up_all (&card->wait_q); }EXPORT_SYMBOL_GPL (qeth_clear_thread_running_bit);
@@ -1156,6 +1166,7 @@ static void qeth_irq(struct ccw_device *cdev, unsigned long intparm, } rc =qeth_get_problem (cdev, irb);if (rc) { + card->read_or_write_problem =1 ;qeth_clear_ipacmd_list (card);qeth_schedule_recovery (card); goto out;
@@ -1174,7 +1185,7 @@ static void qeth_irq(struct ccw_device *cdev, unsigned long intparm,return ;if (channel == &card->read && channel->state ==CH_STATE_UP ) -qeth_issue_next_read (card); +__qeth_issue_next_read (card); iob = channel->iob; index = channel->buf_no;
@@ -4969,8 +4980,6 @@ static void qeth_core_free_card(struct qeth_card *card)QETH_DBF_HEX (SETUP ,2 , &card,sizeof (void *));qeth_clean_channel (&card->read);qeth_clean_channel (&card->write); -if (card->dev) -free_netdev (card->dev);kfree (card->ip_tbd_list);qeth_free_qdio_buffers (card);unregister_service_level (&card->qeth_service_level);
drivers/s390/net/qeth_l2_main.c +1 -1
@@ -1062,8 +1062,8 @@ static void qeth_l2_remove_device(struct ccwgroup_device *cgdev)qeth_l2_set_offline (cgdev);if (card->dev) { -netif_napi_del (&card->napi);unregister_netdev (card->dev); +free_netdev (card->dev); card->dev =NULL ; }return ;
drivers/s390/net/qeth_l3_main.c +1 -1
@@ -3243,8 +3243,8 @@ static void qeth_l3_remove_device(struct ccwgroup_device *cgdev)qeth_l3_set_offline (cgdev);if (card->dev) { -netif_napi_del (&card->napi);unregister_netdev (card->dev); +free_netdev (card->dev); card->dev =NULL ; }
drivers/scsi/sg.c +3 -2
@@ -2074,11 +2074,12 @@ sg_get_rq_mark(Sg_fd * sfp, int pack_id)if ((1 == resp->done) && (!resp->sg_io_owned) && ((-1 == pack_id) || (resp->header.pack_id == pack_id))) { resp->done =2 ;/* guard against other readers */ -break ; +write_unlock_irqrestore (&sfp->rq_list_lock, iflags); +return resp; } }write_unlock_irqrestore (&sfp->rq_list_lock, iflags); -return resp; +return NULL ; }/* always adds to end of list */
kernel/irq/manage.c +1 -3
@@ -1189,10 +1189,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)* set the trigger type must match. Also all must * agree on ONESHOT. */ -unsigned int oldtype =irqd_get_trigger_type (&desc->irq_data); -if (!((old->flags & new->flags) &IRQF_SHARED ) || - (oldtype != (new->flags &IRQF_TRIGGER_MASK )) || + ((old->flags ^ new->flags) &IRQF_TRIGGER_MASK ) || ((old->flags ^ new->flags) &IRQF_ONESHOT )) goto mismatch;
net/core/skbuff.c +1 -1
@@ -3571,7 +3571,7 @@ int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb)skb_queue_tail (&sk->sk_error_queue, skb);if (!sock_flag (sk,SOCK_DEAD )) - sk->sk_data_ready (sk); + sk->sk_error_report (sk);return 0 ; }EXPORT_SYMBOL (sock_queue_err_skb);
net/dccp/proto.c +5 -0
@@ -789,6 +789,11 @@ int dccp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)if (skb ==NULL ) goto out_release; +if (sk->sk_state ==DCCP_CLOSED ) { + rc = -ENOTCONN ; + goto out_discard; + } +skb_reserve (skb, sk->sk_prot->max_header); rc =memcpy_from_msg (skb_put (skb, len), msg, len);if (rc !=0 )
net/ieee802154/6lowpan/core.c +8 -4
@@ -206,9 +206,13 @@ static inline void lowpan_netlink_fini(void)static int lowpan_device_event (struct notifier_block *unused,unsigned long event,void *ptr) { -struct net_device *wdev =netdev_notifier_info_to_dev (ptr); +struct net_device *ndev =netdev_notifier_info_to_dev (ptr); +struct wpan_dev *wpan_dev; -if (wdev->type !=ARPHRD_IEEE802154 ) +if (ndev->type !=ARPHRD_IEEE802154 ) +return NOTIFY_DONE ; + wpan_dev = ndev->ieee802154_ptr; +if (!wpan_dev) goto out;switch (event) {
@@ -217,8 +221,8 @@ static int lowpan_device_event(struct notifier_block *unused,* also delete possible lowpan interfaces which belongs * to the wpan interface. */ -if (wdev->ieee802154_ptr->lowpan_dev) -lowpan_dellink (wdev->ieee802154_ptr->lowpan_dev,NULL ); +if (wpan_dev->lowpan_dev) +lowpan_dellink (wpan_dev->lowpan_dev,NULL );break ;default :break ;
net/ipv4/inet_fragment.c +3 -0
@@ -119,6 +119,9 @@ out:static bool inet_fragq_should_evict (const struct inet_frag_queue *q) { +if (!hlist_unhashed (&q->list_evictor)) +return false; +return q->net->low_thresh ==0 ||frag_mem_limit (q->net) >= q->net->low_thresh; }
net/ipv4/ip_sockglue.c +4 -2
@@ -241,7 +241,8 @@ int ip_cmsg_send(struct net *net, struct msghdr *msg, struct ipcm_cookie *ipc, src_info = (struct in6_pktinfo *)CMSG_DATA (cmsg);if (!ipv6_addr_v4mapped (&src_info->ipi6_addr))return -EINVAL ; - ipc->oif = src_info->ipi6_ifindex; +if (src_info->ipi6_ifindex) + ipc->oif = src_info->ipi6_ifindex; ipc->addr = src_info->ipi6_addr.s6_addr32[3 ];continue ; }
@@ -264,7 +265,8 @@ int ip_cmsg_send(struct net *net, struct msghdr *msg, struct ipcm_cookie *ipc,if (cmsg->cmsg_len !=CMSG_LEN (sizeof (struct in_pktinfo )))return -EINVAL ; info = (struct in_pktinfo *)CMSG_DATA (cmsg); - ipc->oif = info->ipi_ifindex; +if (info->ipi_ifindex) + ipc->oif = info->ipi_ifindex; ipc->addr = info->ipi_spec_dst.s_addr;break ; }
net/ipv6/ndisc.c +2 -1
@@ -1478,7 +1478,8 @@ static void ndisc_fill_redirect_hdr_option(struct sk_buff *skb, *(opt++) = (rd_len >>3 ); opt +=6 ; -memcpy (opt,ipv6_hdr (orig_skb), rd_len -8 ); +skb_copy_bits (orig_skb,skb_network_offset (orig_skb), opt, + rd_len -8 ); }void ndisc_send_redirect (struct sk_buff *skb,const struct in6_addr *target)
net/iucv/af_iucv.c +3 -1
@@ -2381,9 +2381,11 @@ static int afiucv_iucv_init(void) af_iucv_dev->driver = &af_iucv_driver; err =device_register (af_iucv_dev);if (err) - goto out_driver; + goto out_iucv_dev;return 0 ; +out_iucv_dev: +put_device (af_iucv_dev); out_driver:driver_unregister (&af_iucv_driver); out_iucv:
net/l2tp/l2tp_core.c +6 -2
@@ -1518,9 +1518,14 @@ int l2tp_tunnel_create(struct net *net, int fd, int version, u32 tunnel_id, u32 encap = cfg->encap;/* Quick sanity checks */ + err = -EPROTONOSUPPORT ; +if (sk->sk_type !=SOCK_DGRAM ) { +pr_debug ("tunl %hu: fd %d wrong socket type\n" , + tunnel_id, fd); + goto err; + }switch (encap) {case L2TP_ENCAPTYPE_UDP : - err = -EPROTONOSUPPORT ;if (sk->sk_protocol !=IPPROTO_UDP ) {pr_err ("tunl %hu: fd %d wrong protocol, got %d, expected %d\n" , tunnel_id, fd, sk->sk_protocol,IPPROTO_UDP );
@@ -1528,7 +1533,6 @@ int l2tp_tunnel_create(struct net *net, int fd, int version, u32 tunnel_id, u32 }break ;case L2TP_ENCAPTYPE_IP : - err = -EPROTONOSUPPORT ;if (sk->sk_protocol !=IPPROTO_L2TP ) {pr_err ("tunl %hu: fd %d wrong protocol, got %d, expected %d\n" , tunnel_id, fd, sk->sk_protocol,IPPROTO_L2TP );
net/netlink/genetlink.c +1 -1
@@ -1143,7 +1143,7 @@ static int genlmsg_mcast(struct sk_buff *skb, u32 portid, unsigned long group,if (!err) delivered = true;else if (err != -ESRCH ) - goto error; +return err;return delivered ?0 : -ESRCH ; error:kfree_skb (skb);