4.4.223-rc1 review
Subsystems (5)
Greg Kroah-Hartman
maintainerPATCH 305/312 bridge: Fix problems around fdb entries pointing to the bridge device
In reply to Greg Kroah-HartmanFrom: Toshiaki Makita <[email protected]>
commit 7bb90c3715a496c650b2e879225030f9dd9cfafb upstream.
Adding fdb entries pointing to the bridge device uses fdb_insert(), which lacks various checks and does not respect added_by_user flag.
As a result, some inconsistent behavior can happen:
* Adding temporary entries succeeds but results in permanent entries.
* Same goes for "dynamic" and "use".
* Changing mac address of the bridge device causes deletion of user-added entries.
* Replacing existing entries looks successful from userspace but actually not, regardless of NLM_F_EXCL flag.
Use the same logic as other entries and fix them.
--- net/bridge/br_fdb.c | 52 +++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 25 deletions(-)
net/bridge/br_fdb.c +27 -25
@@ -266,7 +266,7 @@ void br_fdb_change_mac_address(struct ne/* If old entry was unassociated with any port, then delete it. */ f =__br_fdb_get (br, br->dev->dev_addr,0 ); -if (f && f->is_local && !f->dst) +if (f && f->is_local && !f->dst && !f->added_by_user)fdb_delete_local (br,NULL , f);fdb_insert (br,NULL , newaddr,0 );
@@ -281,7 +281,7 @@ void br_fdb_change_mac_address(struct neif (!br_vlan_should_use (v))continue ; f =__br_fdb_get (br, br->dev->dev_addr, v->vid); -if (f && f->is_local && !f->dst) +if (f && f->is_local && !f->dst && !f->added_by_user)fdb_delete_local (br,NULL , f);fdb_insert (br,NULL , newaddr, v->vid); }
@@ -758,20 +758,25 @@ out: }/* Update (create or replace) forwarding database entry */ -static int fdb_add_entry (struct net_bridge_port *source,const __u8 *addr, -__u16 state,__u16 flags,__u16 vid) +static int fdb_add_entry (struct net_bridge *br,struct net_bridge_port *source, +const __u8 *addr,__u16 state,__u16 flags,__u16 vid) { -struct net_bridge *br = source->br;struct hlist_head *head = &br->hash[br_mac_hash (addr, vid)];struct net_bridge_fdb_entry *fdb;bool modified = false;/* If the port cannot learn allow only local and static entries */ -if (!(state &NUD_PERMANENT ) && !(state &NUD_NOARP ) && +if (source && !(state &NUD_PERMANENT ) && !(state &NUD_NOARP ) && !(source->state ==BR_STATE_LEARNING || source->state ==BR_STATE_FORWARDING ))return -EPERM ; +if (!source && !(state &NUD_PERMANENT )) { +pr_info ("bridge: RTM_NEWNEIGH %s without NUD_PERMANENT\n" , + br->dev->name); +return -EINVAL ; + } + fdb =fdb_find (head, addr, vid);if (fdb ==NULL ) {if (!(flags &NLM_F_CREATE ))
@@ -826,22 +831,28 @@ static int fdb_add_entry(struct net_bridreturn 0 ; } -static int __br_fdb_add (struct ndmsg *ndm,struct net_bridge_port *p, -const unsigned char *addr,u16 nlh_flags,u16 vid) +static int __br_fdb_add (struct ndmsg *ndm,struct net_bridge *br, +struct net_bridge_port *p,const unsigned char *addr, +u16 nlh_flags,u16 vid) {int err =0 ;if (ndm->ndm_flags &NTF_USE ) { +if (!p) { +pr_info ("bridge: RTM_NEWNEIGH %s with NTF_USE is not supported\n" , + br->dev->name); +return -EINVAL ; + }local_bh_disable ();rcu_read_lock (); -br_fdb_update (p->br, p, addr, vid, true); +br_fdb_update (br, p, addr, vid, true);rcu_read_unlock ();local_bh_enable (); }else { -spin_lock_bh (&p->br->hash_lock); - err =fdb_add_entry (p, addr, ndm->ndm_state, +spin_lock_bh (&br->hash_lock); + err =fdb_add_entry (br, p, addr, ndm->ndm_state, nlh_flags, vid); -spin_unlock_bh (&p->br->hash_lock); +spin_unlock_bh (&br->hash_lock); }return err;
@@ -878,6 +889,7 @@ int br_fdb_add(struct ndmsg *ndm, struct dev->name);return -EINVAL ; } + br = p->br; vg =nbp_vlan_group (p); }
@@ -889,15 +901,9 @@ int br_fdb_add(struct ndmsg *ndm, struct }/* VID was specified, so use it. */ -if (dev->priv_flags &IFF_EBRIDGE ) - err =br_fdb_insert (br,NULL , addr, vid); -else - err =__br_fdb_add (ndm, p, addr, nlh_flags, vid); + err =__br_fdb_add (ndm, br, p, addr, nlh_flags, vid); }else { -if (dev->priv_flags &IFF_EBRIDGE ) - err =br_fdb_insert (br,NULL , addr,0 ); -else - err =__br_fdb_add (ndm, p, addr, nlh_flags,0 ); + err =__br_fdb_add (ndm, br, p, addr, nlh_flags,0 );if (err || !vg || !vg->num_vlans) goto out;
@@ -908,11 +914,7 @@ int br_fdb_add(struct ndmsg *ndm, structlist_for_each_entry (v, &vg->vlan_list, vlist) {if (!br_vlan_should_use (v))continue ; -if (dev->priv_flags &IFF_EBRIDGE ) - err =br_fdb_insert (br,NULL , addr, v->vid); -else - err =__br_fdb_add (ndm, p, addr, nlh_flags, - v->vid); + err =__br_fdb_add (ndm, br, p, addr, nlh_flags, v->vid);if (err) goto out; }
Greg Kroah-Hartman
maintainerPATCH 306/312 bna: add missing per queue ethtool stat
In reply to Greg Kroah-HartmanFrom: Ivan Vecera <[email protected]>
commit 2835d2d9e366a2985b24051d228333bfba82f3a7 upstream.
Commit ba5ca784 "bna: check for dma mapping errors" added besides other things a statistic that counts number of DMA buffer mapping failures per each Rx queue. This counter is not included in ethtool stats output.
--- drivers/net/ethernet/brocade/bna/bnad_ethtool.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/ethernet/brocade/bna/bnad_ethtool.c +6 -1
@@ -31,7 +31,7 @@#define BNAD_NUM_TXF_COUNTERS 12#define BNAD_NUM_RXF_COUNTERS 10#define BNAD_NUM_CQ_COUNTERS (3 + 5) -#define BNAD_NUM_RXQ_COUNTERS 6 +#define BNAD_NUM_RXQ_COUNTERS 7#define BNAD_NUM_TXQ_COUNTERS 5#define BNAD_ETHTOOL_STATS_NUM \
@@ -658,6 +658,8 @@ bnad_get_strings(struct net_device *netd string +=ETH_GSTRING_LEN ;sprintf (string,"rxq%d_allocbuf_failed" , q_num); string +=ETH_GSTRING_LEN ; +sprintf (string,"rxq%d_mapbuf_failed" , q_num); + string +=ETH_GSTRING_LEN ;sprintf (string,"rxq%d_producer_index" , q_num); string +=ETH_GSTRING_LEN ;sprintf (string,"rxq%d_consumer_index" , q_num);
@@ -678,6 +680,9 @@ bnad_get_strings(struct net_device *netdsprintf (string,"rxq%d_allocbuf_failed" , q_num); string +=ETH_GSTRING_LEN ; +sprintf (string,"rxq%d_mapbuf_failed" , + q_num); + string +=ETH_GSTRING_LEN ;sprintf (string,"rxq%d_producer_index" , q_num); string +=ETH_GSTRING_LEN ;
Greg Kroah-Hartman
maintainerPATCH 307/312 net: skbuff: Remove errornous length validation in skb_vlan_pop()
In reply to Greg Kroah-HartmanFrom: Shmulik Ladkani <[email protected]>
commit 636c2628086e40c86dac7ddc84a1c4b4fcccc6e3 upstream.
In 93515d53b1
"net: move vlan pop/push functions into common code"skb_vlan_pop was moved from its private location in openvswitch to skbuff common code.
In case skb has non hw-accel vlan tag, the original 'pop_vlan()' assured that skb->len is sufficient (if skb->len < VLAN_ETH_HLEN then pop was considered a no-op).
This validation was moved as is into the new common 'skb_vlan_pop'.
Alas, in its original location (openvswitch), there was a guarantee that 'data' points to the mac_header, therefore the 'skb->len < VLAN_ETH_HLEN' condition made sense.
However there's no such guarantee in the generic 'skb_vlan_pop'.
For short packets received in rx path going through 'skb_vlan_pop', this causes 'skb_vlan_pop' to fail pop-ing a valid vlan hdr (in the non hw-accel case) or to fail moving next tag into hw-accel tag.
Remove the 'skb->len < VLAN_ETH_HLEN' condition entirely:
It is superfluous since inner '__skb_vlan_pop' already verifies there are VLAN_ETH_HLEN writable bytes at the mac_header.
Note this presents a slight change to skb_vlan_pop() users:
In case total length is smaller than VLAN_ETH_HLEN, skb_vlan_pop() now returns an error, as opposed to previous "no-op" behavior. Existing callers (e.g. tc act vlan, ovs) usually drop the packet if 'skb_vlan_pop' fails.
--- net/core/skbuff.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
net/core/skbuff.c +4 -6
@@ -4451,9 +4451,8 @@ int skb_vlan_pop(struct sk_buff *skb)if (likely (skb_vlan_tag_present (skb))) { skb->vlan_tci =0 ; }else { -if (unlikely ((skb->protocol !=htons (ETH_P_8021Q ) && - skb->protocol !=htons (ETH_P_8021AD )) || - skb->len <VLAN_ETH_HLEN )) +if (unlikely (skb->protocol !=htons (ETH_P_8021Q ) && + skb->protocol !=htons (ETH_P_8021AD )))return 0 ; err =__skb_vlan_pop (skb, &vlan_tci);
@@ -4461,9 +4460,8 @@ int skb_vlan_pop(struct sk_buff *skb)return err; }/* move next vlan tag to hw accel tag */ -if (likely ((skb->protocol !=htons (ETH_P_8021Q ) && - skb->protocol !=htons (ETH_P_8021AD )) || - skb->len <VLAN_ETH_HLEN )) +if (likely (skb->protocol !=htons (ETH_P_8021Q ) && + skb->protocol !=htons (ETH_P_8021AD )))return 0 ; vlan_proto = skb->protocol;
Greg Kroah-Hartman
maintainerPATCH 308/312 net: ep93xx_eth: Do not crash unloading module
In reply to Greg Kroah-HartmanFrom: Florian Fainelli <[email protected]>
commit c823abac17926767fb50175e098f087a6ac684c3 upstream.
When we unload the ep93xx_eth, whether we have opened the network interface or not, we will either hit a kernel paging request error, or a simple NULL pointer de-reference because:
- if ep93xx_open has been called, we have created a valid DMA mapping for ep->descs, when we call ep93xx_stop, we also call ep93xx_free_buffers, ep->descs now has a stale value
- if ep93xx_open has not been called, we have a NULL pointer for ep->descs, so performing any operation against that address just won't work
Fix this by adding a NULL pointer check for ep->descs which means that ep93xx_free_buffers() was able to successfully tear down the descriptors and free the DMA cookie as well.
--- drivers/net/ethernet/cirrus/ep93xx_eth.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/cirrus/ep93xx_eth.c +4 -0
@@ -468,6 +468,9 @@ static void ep93xx_free_buffers(struct estruct device *dev = ep->dev->dev.parent;int i; +if (!ep->descs) +return ; +for (i =0 ; i <RX_QUEUE_ENTRIES ; i++) {dma_addr_t d;
@@ -490,6 +493,7 @@ static void ep93xx_free_buffers(struct edma_free_coherent (dev,sizeof (struct ep93xx_descs ), ep->descs, ep->descs_dma_addr); + ep->descs =NULL ; }static int ep93xx_alloc_buffers (struct ep93xx_priv *ep)
Greg Kroah-Hartman
maintainerPATCH 311/312 ALSA: hda: Match both PCI ID and SSID for driver blacklist
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 977dfef40c8996b69afe23a9094d184049efb7bb upstream.
The commit 3c6fd1f07ed0 ("ALSA: hda: Add driver blacklist") added a new blacklist for the devices that are known to have empty codecs, and one of the entries was ASUS ROG Zenith II (PCI SSID 1043:874f). However, it turned out that the very same PCI SSID is used for the previous model that does have the valid HD-audio codecs and the change broke the sound on it.
Since the empty codec problem appear on the certain AMD platform (PCI ID 1022:1487), this patch changes the blacklist matching to both PCI ID and SSID using pci_match_id(). Also, the entry that was removed by the previous fix for ASUS ROG Zenigh II is re-added.
--- sound/pci/hda/hda_intel.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
sound/pci/hda/hda_intel.c +5 -4
@@ -1977,9 +1977,10 @@ static const struct hdac_io_ops pci_hda_* some HD-audio PCI entries are exposed without any codecs, and such devices * should be ignored from the beginning. */ -static const struct snd_pci_quirk driver_blacklist[] = { -SND_PCI_QUIRK (0x1462 ,0xcb59 ,"MSI TRX40 Creator" ,0 ), -SND_PCI_QUIRK (0x1462 ,0xcb60 ,"MSI TRX40" ,0 ), +static const struct pci_device_id driver_blacklist[] = { + {PCI_DEVICE_SUB (0x1022 ,0x1487 ,0x1043 ,0x874f ) },/* ASUS ROG Zenith II / Strix */ + {PCI_DEVICE_SUB (0x1022 ,0x1487 ,0x1462 ,0xcb59 ) },/* MSI TRX40 Creator */ + {PCI_DEVICE_SUB (0x1022 ,0x1487 ,0x1462 ,0xcb60 ) },/* MSI TRX40 */ {} };
@@ -2002,7 +2003,7 @@ static int azx_probe(struct pci_dev *pcibool schedule_probe;int err; -if (snd_pci_quirk_lookup (pci, driver_blacklist)) { +if (pci_match_id (driver_blacklist, pci)) {dev_info (&pci->dev,"Skipping the blacklisted device\n" );return -ENODEV ; }
Greg Kroah-Hartman
maintainerPATCH 310/312 sctp: Fix SHUTDOWN CTSN Ack in the peer restart case
In reply to Greg Kroah-HartmanFrom: Jere Leppänen <[email protected]>
commit 12dfd78e3a74825e6f0bc8df7ef9f938fbc6bfe3 upstream.
When starting shutdown in sctp_sf_do_dupcook_a(), get the value for SHUTDOWN Cumulative TSN Ack from the new association, which is reconstructed from the cookie, instead of the old association, which the peer doesn't have anymore.
Otherwise the SHUTDOWN is either ignored or replied to with an ABORT by the peer because CTSN Ack doesn't match the peer's Initial TSN.
--- net/sctp/sm_make_chunk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
net/sctp/sm_make_chunk.c +5 -1
@@ -857,7 +857,11 @@ struct sctp_chunk *sctp_make_shutdown(cosctp_shutdownhdr_t shut;__u32 ctsn; - ctsn =sctp_tsnmap_get_ctsn (&asoc->peer.tsn_map); +if (chunk && chunk->asoc) + ctsn =sctp_tsnmap_get_ctsn (&chunk->asoc->peer.tsn_map); +else + ctsn =sctp_tsnmap_get_ctsn (&asoc->peer.tsn_map); + shut.cum_tsn_ack =htonl (ctsn); retval = sctp_make_control(asoc, SCTP_CID_SHUTDOWN, 0,
Greg Kroah-Hartman
maintainerPATCH 278/312 net: ethernet: ti: cpsw: fix device and of_node leaks
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit c7262aaace1b17a650598063e3b9ee1785fde377 upstream.
Make sure to drop the references taken by of_get_child_by_name() and bus_find_device() before returning from cpsw_phy_sel().
Note that holding a reference to the cpsw-phy-sel device does not prevent the devres-managed private data from going away.
--- drivers/net/ethernet/ti/cpsw-phy-sel.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/ti/cpsw-phy-sel.c +3 -0
@@ -154,9 +154,12 @@ void cpsw_phy_sel(struct device *dev, ph } dev =bus_find_device (&platform_bus_type,NULL , node, match); +of_node_put (node); priv =dev_get_drvdata (dev); priv->cpsw_phy_sel (priv, phy_mode, slave); + +put_device (dev); }EXPORT_SYMBOL_GPL (cpsw_phy_sel);
Greg Kroah-Hartman
maintainerPATCH 280/312 net: hns: fix device reference leaks
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 2271150bfb814b72ec57ae2fdf66e39da2eafafd upstream.
Make sure to drop the reference taken by class_find_device() in hnae_get_handle() on errors and when later releasing the handle.
--- drivers/net/ethernet/hisilicon/hns/hnae.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/net/ethernet/hisilicon/hns/hnae.c +7 -1
@@ -331,8 +331,10 @@ struct hnae_handle *hnae_get_handle(strureturn ERR_PTR (-ENODEV ); handle = dev->ops->get_handle (dev, port_id); -if (IS_ERR (handle)) +if (IS_ERR (handle)) { +put_device (&dev->cls_dev);return handle; + } handle->dev = dev; handle->owner_dev = owner_dev;
@@ -355,6 +357,8 @@ out_when_init_queue:for (j = i -1 ; j >=0 ; j--)hnae_fini_queue (handle->qs[j]); +put_device (&dev->cls_dev); +return ERR_PTR (-ENOMEM ); }EXPORT_SYMBOL (hnae_get_handle);
@@ -376,6 +380,8 @@ void hnae_put_handle(struct hnae_handle dev->ops->put_handle (h);module_put (dev->owner); + +put_device (&dev->cls_dev); }EXPORT_SYMBOL (hnae_put_handle);
Greg Kroah-Hartman
maintainerPATCH 271/312 ovs/geneve: fix rtnl notifications on iface deletion
In reply to Greg Kroah-HartmanFrom: Nicolas Dichtel <[email protected]>
commit 41009481b690493c169ce85f591b9d32c6fd9422 upstream.
The function geneve_dev_create_fb() (only used by ovs) never calls rtnl_configure_link(). The consequence is that dev->rtnl_link_state is never set to RTNL_LINK_INITIALIZED.
During the deletion phase, the function rollback_registered_many() sends a RTM_DELLINK only if dev->rtnl_link_state is set to RTNL_LINK_INITIALIZED.
--- drivers/net/geneve.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/geneve.c +4 -0
@@ -1363,6 +1363,10 @@ struct net_device *geneve_dev_create_fb(if (err) goto err; + err =rtnl_configure_link (dev,NULL ); +if (err <0 ) + goto err; +return dev; err:
Greg Kroah-Hartman
maintainerPATCH 312/312 mac80211: add ieee80211_is_any_nullfunc()
In reply to Greg Kroah-HartmanFrom: Thomas Pedersen <[email protected]>
commit 30b2f0be23fb40e58d0ad2caf8702c2a44cda2e1 upstream.
commit 08a5bdde3812 ("mac80211: consider QoS Null frames for STA_NULLFUNC_ACKED") Fixed a bug where we failed to take into account a
nullfunc frame can be either non-QoS or QoS. It turns out
there is at least one more bug inieee80211_sta_tx_notify(), introduced in
commit 7b6ddeaf27ec ("mac80211: use QoS NDP for AP probing"),
where we forgot to check for the QoS variant and so
assumed the QoS nullfunc frame never went out
Fix this by adding a helper ieee80211_is_any_nullfunc() which consolidates the check for non-QoS and QoS nullfunc frames. Replace existing compound conditionals and add a couple more missing checks for QoS variant.
--- include/linux/ieee80211.h | 9 +++++++++ net/mac80211/mlme.c | 2 +- net/mac80211/rx.c | 8 +++----- net/mac80211/status.c | 5 ++--- net/mac80211/tx.c | 2 +- 5 files changed, 16 insertions(+), 10 deletions(-)
include/linux/ieee80211.h +9 -0
@@ -607,6 +607,15 @@ static inline bool ieee80211_is_qos_null }/** +* ieee80211_is_any_nullfunc - check if frame is regular or QoS nullfunc frame +* @fc: frame control bytes in little-endian byteorder +*/ +static inline bool ieee80211_is_any_nullfunc (__le16 fc) +{ +return (ieee80211_is_nullfunc (fc) ||ieee80211_is_qos_nullfunc (fc)); +} + +/** * ieee80211_is_bufferable_mmpdu - check if frame is bufferable MMPDU * @fc: frame control field in little-endian byteorder */
net/mac80211/mlme.c +1 -1
@@ -2283,7 +2283,7 @@ void ieee80211_sta_tx_notify(struct ieeeif (!ieee80211_is_data (hdr->frame_control))return ; -if (ieee80211_is_nullfunc (hdr->frame_control) && +if (ieee80211_is_any_nullfunc (hdr->frame_control) && sdata->u.mgd.probe_send_count >0 ) {if (ack)ieee80211_sta_reset_conn_monitor (sdata);
net/mac80211/rx.c +3 -5
@@ -1110,8 +1110,7 @@ ieee80211_rx_h_check_dup(struct ieee8021return RX_CONTINUE ;if (ieee80211_is_ctl (hdr->frame_control) || -ieee80211_is_nullfunc (hdr->frame_control) || -ieee80211_is_qos_nullfunc (hdr->frame_control) || +ieee80211_is_any_nullfunc (hdr->frame_control) ||is_multicast_ether_addr (hdr->addr1))return RX_CONTINUE ;
@@ -1487,8 +1486,7 @@ ieee80211_rx_h_sta_process(struct ieee80* Drop (qos-)data::nullfunc frames silently, since they * are used only to control station power saving mode. */ -if (ieee80211_is_nullfunc (hdr->frame_control) || -ieee80211_is_qos_nullfunc (hdr->frame_control)) { +if (ieee80211_is_any_nullfunc (hdr->frame_control)) {I802_DEBUG_INC (rx->local->rx_handlers_drop_nullfunc);/*
@@ -1977,7 +1975,7 @@ static int ieee80211_drop_unencrypted(st/* Drop unencrypted frames if key is set. */ if (unlikely (!ieee80211_has_protected (fc) && - !ieee80211_is_nullfunc (fc) && + !ieee80211_is_any_nullfunc (fc) &&ieee80211_is_data (fc) && rx->key))return -EACCES ;
net/mac80211/status.c +2 -3
@@ -474,8 +474,7 @@ static void ieee80211_report_ack_skb(strrcu_read_lock (); sdata =ieee80211_sdata_from_skb (local, skb);if (sdata) { -if (ieee80211_is_nullfunc (hdr->frame_control) || -ieee80211_is_qos_nullfunc (hdr->frame_control)) +if (ieee80211_is_any_nullfunc (hdr->frame_control))cfg80211_probe_status (sdata->dev, hdr->addr1, cookie, acked,GFP_ATOMIC );
@@ -905,7 +904,7 @@ void ieee80211_tx_status(struct ieee8021I802_DEBUG_INC (local->dot11FailedCount); } -if (ieee80211_is_nullfunc (fc) &&ieee80211_has_pm (fc) && +if (ieee80211_is_any_nullfunc (fc) &&ieee80211_has_pm (fc) &&ieee80211_hw_check (&local->hw,REPORTS_TX_ACK_STATUS ) && !(info->flags &IEEE80211_TX_CTL_INJECTED ) && local->ps_sdata && !(local->scanning)) {
net/mac80211/tx.c +1 -1
@@ -291,7 +291,7 @@ ieee80211_tx_h_check_assoc(struct ieee80if (unlikely (test_bit (SCAN_SW_SCANNING , &tx->local->scanning)) &&test_bit (SDATA_STATE_OFFCHANNEL , &tx->sdata->state) && !ieee80211_is_probe_req (hdr->frame_control) && - !ieee80211_is_nullfunc (hdr->frame_control)) + !ieee80211_is_any_nullfunc (hdr->frame_control))/* * When software scanning only nullfunc frames (to notify * the sleep state to the AP) and probe requests (for the
Greg Kroah-Hartman
maintainerPATCH 279/312 net: ethernet: ti: cpsw: fix secondary-emac probe error path
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit a7fe9d466f6a33558a38c7ca9d58bcc83512d577 upstream.
Make sure to deregister the primary device in case the secondary emac fails to probe.
kernel BUG at /home/johan/work/omicron/src/linux/net/core/dev.c:7743!
...
[<c05b3dec>] (free_netdev) from [<c04fe6c0>] (cpsw_probe+0x9cc/0xe50) [<c04fe6c0>] (cpsw_probe) from [<c047b28c>] (platform_drv_probe+0x5c/0xc0)
implementation")
--- drivers/net/ethernet/ti/cpsw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/ti/cpsw.c +3 -1
@@ -2532,12 +2532,14 @@ static int cpsw_probe(struct platform_de ret =cpsw_probe_dual_emac (pdev, priv);if (ret) {cpsw_err (priv, probe,"error probe slave 2 emac interface\n" ); - goto clean_ale_ret; + goto clean_unregister_netdev_ret; } }return 0 ; +clean_unregister_netdev_ret: +unregister_netdev (ndev); clean_ale_ret:cpsw_ale_destroy (priv->ale); clean_dma_ret:
Greg Kroah-Hartman
maintainerPATCH 276/312 net: ethernet: davinci_emac: Fix devioctl while in fixed link
In reply to Greg Kroah-HartmanFrom: Neil Armstrong <[email protected]>
commit 62522ef3c399996f6c8120bfd14b94280bc9f490 upstream.
When configured in fixed link, the DaVinci emac driver sets the priv->phydev to NULL and further ioctl calls to the phy_mii_ioctl() causes the kernel to crash.
--- drivers/net/ethernet/ti/davinci_emac.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/ti/davinci_emac.c +4 -1
@@ -1512,7 +1512,10 @@ static int emac_devioctl(struct net_devi/* TODO: Add phy read and write and private statistics get feature */ -return phy_mii_ioctl (priv->phydev, ifrq, cmd); +if (priv->phydev) +return phy_mii_ioctl (priv->phydev, ifrq, cmd); +else +return -EOPNOTSUPP ; }static int match_first_device (struct device *dev,void *data)
Greg Kroah-Hartman
maintainerPATCH 277/312 net: ethernet: mvneta: Remove IFF_UNICAST_FLT which is not implemented
In reply to Greg Kroah-HartmanFrom: Andrew Lunn <[email protected]>
commit 97db8afa2ab919fc400fe982f5054060868bdf07 upstream.
The mvneta driver advertises it supports IFF_UNICAST_FLT. However, it actually does not. The hardware probably does support it, but there is no code to configure the filter. As a quick and simple fix, remove the flag. This will cause the core to fall back to promiscuous mode.
--- drivers/net/ethernet/marvell/mvneta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/mvneta.c +1 -1
@@ -3406,7 +3406,7 @@ static int mvneta_probe(struct platform_ dev->features =NETIF_F_SG |NETIF_F_IP_CSUM |NETIF_F_TSO ; dev->hw_features |= dev->features; dev->vlan_features |= dev->features; - dev->priv_flags |=IFF_UNICAST_FLT |IFF_LIVE_ADDR_CHANGE ; + dev->priv_flags |=IFF_LIVE_ADDR_CHANGE ; dev->gso_max_segs =MVNETA_MAX_TSO_SEGS ; err =register_netdev (dev);
Greg Kroah-Hartman
maintainerPATCH 275/312 bnxt_en: Remove locking around txr->dev_state
In reply to Greg Kroah-HartmanFrom: Florian Fainelli <[email protected]>
commit cbce91cad4ee39070bf3c7873767194e4be88e16 upstream.
txr->dev_state was not consistently manipulated with the acquisition of the per-queue lock, after further inspection the lock does not seem necessary, either the value is read as BNXT_DEV_STATE_CLOSING or 0.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +0 -2
@@ -4310,9 +4310,7 @@ static void bnxt_tx_disable(struct bnxt bnapi = bp->bnapi[i]; txr = &bnapi->tx_ring; txq =netdev_get_tx_queue (bp->dev, i); -__netif_tx_lock (txq,smp_processor_id ()); txr->dev_state =BNXT_DEV_STATE_CLOSING ; -__netif_tx_unlock (txq); } }/* Stop all TX queues */
Greg Kroah-Hartman
maintainerPATCH 309/312 macvlan: Fix potential use-after free for broadcasts
In reply to Greg Kroah-HartmanFrom: Herbert Xu <[email protected]>
commit 260916dfb48c374f7840f3b86e69afd3afdb6e96 upstream.
When we postpone a broadcast packet we save the source port in the skb if it is local. However, the source port can disappear before we get a chance to process the packet.
This patch fixes this by holding a ref count on the netdev.
It also delays the skb->cb modification until after we allocate the new skb as you should not modify shared skbs.
--- drivers/net/macvlan.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/net/macvlan.c +8 -2
@@ -305,6 +305,8 @@ static void macvlan_process_broadcast(strcu_read_unlock (); +if (src) +dev_put (src->dev);kfree_skb (skb);cond_resched ();
@@ -312,6 +314,7 @@ static void macvlan_process_broadcast(st }static void macvlan_broadcast_enqueue (struct macvlan_port *port, +const struct macvlan_dev *src,struct sk_buff *skb) {struct sk_buff *nskb;
@@ -321,8 +324,12 @@ static void macvlan_broadcast_enqueue(stif (!nskb) goto err; +MACVLAN_SKB_CB (nskb)->src = src; +spin_lock (&port->bc_queue.lock);if (skb_queue_len (&port->bc_queue) <MACVLAN_BC_QUEUE_LEN ) { +if (src) +dev_hold (src->dev);__skb_queue_tail (&port->bc_queue, nskb); err =0 ; }
@@ -432,8 +439,7 @@ static rx_handler_result_t macvlan_handl goto out; } -MACVLAN_SKB_CB (skb)->src = src; -macvlan_broadcast_enqueue (port, skb); +macvlan_broadcast_enqueue (port, src, skb);return RX_HANDLER_PASS ; }
Greg Kroah-Hartman
maintainerPATCH 171/312 am437x-vpfe: fix an uninitialized variable bug
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit e4bccada44c177cde31b9a236b7dfd7f76d403ed upstream.
If we are doing V4L2_FIELD_NONE then "ret" is used uninitialized.
--- drivers/media/platform/am437x/am437x-vpfe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/am437x/am437x-vpfe.c +1 -1
@@ -1047,7 +1047,7 @@ static int vpfe_get_ccdc_image_format(ststatic int vpfe_config_ccdc_image_format (struct vpfe_device *vpfe) {enum ccdc_frmfmt frm_fmt =CCDC_FRMFMT_INTERLACED ; -int ret; +int ret =0 ;vpfe_dbg (2 , vpfe,"vpfe_config_ccdc_image_format\n" );
Greg Kroah-Hartman
maintainerPATCH 302/312 pinctrl: tegra: Correctly check the supported configuration
In reply to Greg Kroah-HartmanFrom: Laxman Dewangan <[email protected]>
commit b22ef2a0979f2b91cfeeabb086e4d665183a93a1 upstream.
The pincontrol registers of Tegra chips has multiple filed per registers. There is two type of registers mux and drive. All configurations belongs to one of these registers.
If any configurations are supported then <config>_bit is set to bit position of these registers otherwise -1 to not support it. The member is defined as
s32 <config>_bit:6;
So if config is not supported ifor given SoC then it is set to -1 in soc pinmmux table.
In common driver code, to find out that given config is supported or not, it is checked as:
s8 bit = <config>_bit;
if (bit > 31) {
/* Not supported config */
}But in this case, bit is s8 and hence for non supporting it is -1.
Correct the check as:
if (bit < 0) {
/* Not supported config */
}--- drivers/pinctrl/pinctrl-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/pinctrl-tegra.c +1 -1
@@ -418,7 +418,7 @@ static int tegra_pinconf_reg(struct tegrreturn -ENOTSUPP ; } -if (*reg <0 || *bit >31 ) { +if (*reg <0 || *bit <0 ) {if (report_err) {const char *prop ="unknown" ;int i;
Greg Kroah-Hartman
maintainerPATCH 274/312 net: axienet: Fix return value check in axienet_probe()
In reply to Greg Kroah-HartmanFrom: Wei Yongjun <[email protected]>
commit 3ad7b1477ef9b01988ac052b02be9cd410c95157 upstream.
In case of error, the function of_parse_phandle() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test.
--- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +2 -2
@@ -1602,9 +1602,9 @@ static int axienet_probe(struct platform/* Find the DMA node, map the DMA registers, and decode the DMA IRQs */ np =of_parse_phandle (pdev->dev.of_node,"axistream-connected" ,0 ); -if (IS_ERR (np)) { +if (!np) {dev_err (&pdev->dev,"could not find DMA node\n" ); - ret =PTR_ERR (np); + ret = -ENODEV ; goto free_netdev; } ret =of_address_to_resource (np,0 , &dmares);
Greg Kroah-Hartman
maintainerPATCH 299/312 cxl: Fix DAR check & use REGION_ID instead of opencoding
In reply to Greg Kroah-HartmanFrom: Aneesh Kumar K.V <[email protected]>
commit 3b1dbfa14f97188ec33fdfc7acb66bea59a3bb21 upstream.
The current code will set _PAGE_USER to the access flags for any fault address, because the ~ operation will be true for all address we take a fault on. But setting _PAGE_USER also means that the fault will be handled only if the page table have _PAGE_USER set. Hence there is no security hole with the current code.
Now if it is an user space access, then the change in this patch really don't have an impact because we have (!ctx->kernel) set true and we take the if condition true.
Now kernel context created fault on an address in the kernel range will result in a fault loop because we will not insert the hash pte due to access and pte permission mismatch. This patch fix the above issue.
--- drivers/misc/cxl/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/cxl/fault.c +1 -1
@@ -152,7 +152,7 @@ static void cxl_handle_page_fault(struct access = _PAGE_PRESENT;if (dsisr & CXL_PSL_DSISR_An_S) access |= _PAGE_RW; -if ((!ctx->kernel) || ~(dar & (1ULL <<63 ))) +if ((!ctx->kernel) || (REGION_ID (dar) ==USER_REGION_ID )) access |= _PAGE_USER;if (dsisr &DSISR_NOHPTE )
Greg Kroah-Hartman
maintainerPATCH 295/312 regulator: core: Rely on regulator_dev_release to free constraints
In reply to Greg Kroah-HartmanFrom: Charles Keepax <[email protected]>
commit 6333ef46bbe514a8ece6c432aab6bcf8637b2d7c upstream.
As we now free the constraints in regulator_dev_release we will still call free on the constraints pointer even if we went down an error path in regulator_register, because it is only allocated after the device_register. As such we no longer need to free rdev->constraints on the error paths, so this patch removes said frees.
--- drivers/regulator/core.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-)
drivers/regulator/core.c +12 -17
@@ -1057,18 +1057,18 @@ static int set_machine_constraints(struc ret =machine_constraints_voltage (rdev, rdev->constraints);if (ret !=0 ) - goto out; +return ret; ret =machine_constraints_current (rdev, rdev->constraints);if (ret !=0 ) - goto out; +return ret;if (rdev->constraints->ilim_uA && ops->set_input_current_limit) { ret = ops->set_input_current_limit (rdev, rdev->constraints->ilim_uA);if (ret <0 ) {rdev_err (rdev,"failed to set input limit\n" ); - goto out; +return ret; } }
@@ -1077,21 +1077,20 @@ static int set_machine_constraints(struc ret =suspend_prepare (rdev, rdev->constraints->initial_state);if (ret <0 ) {rdev_err (rdev,"failed to set suspend state\n" ); - goto out; +return ret; } }if (rdev->constraints->initial_mode) {if (!ops->set_mode) {rdev_err (rdev,"no set_mode operation\n" ); - ret = -EINVAL ; - goto out; +return -EINVAL ; } ret = ops->set_mode (rdev, rdev->constraints->initial_mode);if (ret <0 ) {rdev_err (rdev,"failed to set initial mode: %d\n" , ret); - goto out; +return ret; } }
@@ -1102,7 +1101,7 @@ static int set_machine_constraints(struc ret =_regulator_do_enable (rdev);if (ret <0 && ret != -EINVAL ) {rdev_err (rdev,"failed to enable\n" ); - goto out; +return ret; } }
@@ -1111,7 +1110,7 @@ static int set_machine_constraints(struc ret = ops->set_ramp_delay (rdev, rdev->constraints->ramp_delay);if (ret <0 ) {rdev_err (rdev,"failed to set ramp_delay\n" ); - goto out; +return ret; } }
@@ -1119,7 +1118,7 @@ static int set_machine_constraints(struc ret = ops->set_pull_down (rdev);if (ret <0 ) {rdev_err (rdev,"failed to set pull down\n" ); - goto out; +return ret; } }
@@ -1127,7 +1126,7 @@ static int set_machine_constraints(struc ret = ops->set_soft_start (rdev);if (ret <0 ) {rdev_err (rdev,"failed to set soft start\n" ); - goto out; +return ret; } }
@@ -1136,16 +1135,12 @@ static int set_machine_constraints(struc ret = ops->set_over_current_protection (rdev);if (ret <0 ) {rdev_err (rdev,"failed to set over current protection\n" ); - goto out; +return ret; } }print_constraints (rdev);return 0 ; -out: -kfree (rdev->constraints); - rdev->constraints =NULL ; -return ret; }/**
@@ -3983,7 +3978,7 @@ unset_supplies: scrub:regulator_ena_gpio_free (rdev); -kfree (rdev->constraints); + wash:device_unregister (&rdev->dev);/* device core frees rdev */
Greg Kroah-Hartman
maintainerPATCH 273/312 qdisc: fix a module refcount leak in qdisc_create_dflt()
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
commit 166ee5b87866de07a3e56c1b757f2b5cabba72a5 upstream.
Should qdisc_alloc() fail, we must release the module refcount we got right before.
--- net/sched/sch_generic.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
net/sched/sch_generic.c +5 -4
@@ -626,18 +626,19 @@ struct Qdisc *qdisc_create_dflt(struct nstruct Qdisc *sch;if (!try_module_get (ops->owner)) - goto errout; +return NULL ; sch =qdisc_alloc (dev_queue, ops); -if (IS_ERR (sch)) - goto errout; +if (IS_ERR (sch)) { +module_put (ops->owner); +return NULL ; + } sch->parent = parentid;if (!ops->init || ops->init (sch,NULL ) ==0 )return sch;qdisc_destroy (sch); -errout:return NULL ; }EXPORT_SYMBOL (qdisc_create_dflt);
Greg Kroah-Hartman
maintainerPATCH 294/312 net: mv643xx_eth: fix packet corruption with TSO and tiny unaligned packets.
In reply to Greg Kroah-HartmanFrom: Nicolas Schichan <[email protected]>
commit 3b89624ab54b9dc2d92fc08ce2670e5f19ad8ec8 upstream.
The code in txq_put_data() would use txq->tx_curr_desc to index the tso_hdrs/tso_hdrs_dma buffers, for less than 8 bytes unaligned fragments, which is already moved to the next descriptor at the beginning of the function.
If that fragment was the last of the the skb, the next skb would use that same space to place the ip headers, overwritting that small fragment data.
--- drivers/net/ethernet/marvell/mv643xx_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/marvell/mv643xx_eth.c +2 -2
@@ -762,10 +762,10 @@ txq_put_data_tso(struct net_device *dev,if (length <=8 && (uintptr_t )data &0x7 ) {/* Copy unaligned small data fragment to TSO header data area */ -memcpy (txq->tso_hdrs + txq->tx_curr_desc *TSO_HEADER_SIZE , +memcpy (txq->tso_hdrs + tx_index *TSO_HEADER_SIZE , data, length); desc->buf_ptr = txq->tso_hdrs_dma - + txq->tx_curr_desc *TSO_HEADER_SIZE ; + + tx_index *TSO_HEADER_SIZE ; }else {/* Alignment is okay, map buffer and hand off to hardware */ txq->tx_desc_mapping[tx_index] =DESC_DMA_MAP_SINGLE ;
Greg Kroah-Hartman
maintainerPATCH 293/312 ovs/vxlan: fix rtnl notifications on iface deletion
In reply to Greg Kroah-HartmanFrom: Nicolas Dichtel <[email protected]>
commit cf5da330bbdd0c06b05c525a3d1d58ccd82c87a6 upstream.
The function vxlan_dev_create() (only used by ovs) never calls rtnl_configure_link(). The consequence is that dev->rtnl_link_state is never set to RTNL_LINK_INITIALIZED.
During the deletion phase, the function rollback_registered_many() sends a RTM_DELLINK only if dev->rtnl_link_state is set to RTNL_LINK_INITIALIZED.
Note that the function vxlan_dev_create() is moved after the rtnl stuff so that vxlan_dellink() can be called in this function.
--- drivers/net/vxlan.c | 58 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 24 deletions(-)
drivers/net/vxlan.c +34 -24
@@ -2927,30 +2927,6 @@ static int vxlan_dev_configure(struct nereturn 0 ; } -struct net_device *vxlan_dev_create (struct net *net,const char *name, -u8 name_assign_type,struct vxlan_config *conf) -{ -struct nlattr *tb[IFLA_MAX +1 ]; -struct net_device *dev; -int err; - -memset (&tb,0 ,sizeof (tb)); - - dev =rtnl_create_link (net, name, name_assign_type, - &vxlan_link_ops, tb); -if (IS_ERR (dev)) -return dev; - - err =vxlan_dev_configure (net, dev, conf); -if (err <0 ) { -free_netdev (dev); -return ERR_PTR (err); - } - -return dev; -} -EXPORT_SYMBOL_GPL (vxlan_dev_create); -static int vxlan_newlink (struct net *src_net,struct net_device *dev,struct nlattr *tb[],struct nlattr *data[]) {
@@ -3218,6 +3194,40 @@ static struct rtnl_link_ops vxlan_link_o .get_link_net = vxlan_get_link_net, }; +struct net_device *vxlan_dev_create (struct net *net,const char *name, +u8 name_assign_type, +struct vxlan_config *conf) +{ +struct nlattr *tb[IFLA_MAX +1 ]; +struct net_device *dev; +int err; + +memset (&tb,0 ,sizeof (tb)); + + dev =rtnl_create_link (net, name, name_assign_type, + &vxlan_link_ops, tb); +if (IS_ERR (dev)) +return dev; + + err =vxlan_dev_configure (net, dev, conf); +if (err <0 ) { +free_netdev (dev); +return ERR_PTR (err); + } + + err =rtnl_configure_link (dev,NULL ); +if (err <0 ) { +LIST_HEAD (list_kill); + +vxlan_dellink (dev, &list_kill); +unregister_netdevice_many (&list_kill); +return ERR_PTR (err); + } + +return dev; +} +EXPORT_SYMBOL_GPL (vxlan_dev_create); +static void vxlan_handle_lowerdev_unregister (struct vxlan_net *vn,struct net_device *dev) {
Greg Kroah-Hartman
maintainerPATCH 290/312 mvpp2: use correct size for memset
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
commit e8f967c3d88489fc1562a31d4e44d905ac1d3aff upstream.
gcc-7 detects a short memset in mvpp2, introduced in the original merge of the driver:
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_cls_init':drivers/net/ethernet/marvell/mvpp2.c:3296:2: error: 'memset' used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size]
The result seems to be that we write uninitialized data into the flow table registers, although we did not get any warning about that uninitialized data usage.
Using sizeof() lets us initialize then entire array instead.
--- drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/mvpp2.c +1 -1
@@ -3305,7 +3305,7 @@ static void mvpp2_cls_init(struct mvpp2mvpp2_write (priv,MVPP2_CLS_MODE_REG ,MVPP2_CLS_MODE_ACTIVE_MASK );/* Clear classifier flow table */ -memset (&fe.data,0 ,MVPP2_CLS_FLOWS_TBL_DATA_WORDS ); +memset (&fe.data,0 ,sizeof (fe.data));for (index =0 ; index <MVPP2_CLS_FLOWS_TBL_SIZE ; index++) { fe.index = index;mvpp2_cls_flow_write (priv, &fe);
Greg Kroah-Hartman
maintainerPATCH 286/312 net: icmp_route_lookup should use rt dev to determine L3 domain
In reply to Greg Kroah-HartmanFrom: David Ahern <[email protected]>
commit 9d1a6c4ea43e48c7880c85971c17939b56832d8a upstream.
icmp_send is called in response to some event. The skb may not have the device set (skb->dev is NULL), but it is expected to have an rt. Update icmp_route_lookup to use the rt on the skb to determine L3 domain.
--- net/ipv4/icmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/ipv4/icmp.c +2 -2
@@ -478,7 +478,7 @@ static struct rtable *icmp_route_lookup( fl4->flowi4_proto =IPPROTO_ICMP ; fl4->fl4_icmp_type = type; fl4->fl4_icmp_code = code; - fl4->flowi4_oif =l3mdev_master_ifindex (skb_in->dev); + fl4->flowi4_oif =l3mdev_master_ifindex (skb_dst (skb_in)->dev);security_skb_classify_flow (skb_in,flowi4_to_flowi (fl4)); rt = __ip_route_output_key_hash(net, fl4,
@@ -503,7 +503,7 @@ static struct rtable *icmp_route_lookup(if (err) goto relookup_failed; -if (inet_addr_type_dev_table (net, skb_in->dev, +if (inet_addr_type_dev_table (net,skb_dst (skb_in)->dev, fl4_dec.saddr) ==RTN_LOCAL ) { rt2 =__ip_route_output_key (net, &fl4_dec);if (IS_ERR (rt2))
Greg Kroah-Hartman
maintainerPATCH 285/312 hwrng: exynos - Disable runtime PM on driver unbind
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
commit 27d80fa8bccf8d28bef4f89709638efc624fef9a upstream.
Driver enabled runtime PM but did not revert this on removal. Re-binding of a device triggered warning:
exynos-rng 10830400.rng: Unbalanced pm_runtime_enable!
--- drivers/char/hw_random/exynos-rng.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/char/hw_random/exynos-rng.c +9 -0
@@ -155,6 +155,14 @@ static int exynos_rng_probe(struct platfreturn ret; } +static int exynos_rng_remove (struct platform_device *pdev) +{ +pm_runtime_dont_use_autosuspend (&pdev->dev); +pm_runtime_disable (&pdev->dev); + +return 0 ; +} +static int __maybe_unused exynos_rng_runtime_suspend (struct device *dev) {struct platform_device *pdev =to_platform_device (dev);
@@ -212,6 +220,7 @@ static struct platform_driver exynos_rng .of_match_table = exynos_rng_dt_match, }, .probe = exynos_rng_probe, + .remove = exynos_rng_remove, };module_platform_driver (exynos_rng_driver);
Greg Kroah-Hartman
maintainerPATCH 283/312 net: ehea: avoid null pointer dereference
In reply to Greg Kroah-HartmanFrom: [email protected] <[email protected]>
commit 1740c29a46b30a2f157afc473156f157e599d4c2 upstream.
ehea_get_port may return NULL. Do not dereference NULL value.
--- drivers/net/ethernet/ibm/ehea/ehea_main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/net/ethernet/ibm/ehea/ehea_main.c +4 -5
@@ -1169,16 +1169,15 @@ static void ehea_parse_eqe(struct ehea_a ec =EHEA_BMASK_GET (NEQE_EVENT_CODE , eqe); portnum =EHEA_BMASK_GET (NEQE_PORTNUM , eqe); port =ehea_get_port (adapter, portnum); +if (!port) { +netdev_err (NULL ,"unknown portnum %x\n" , portnum); +return ; + } dev = port->netdev;switch (ec) {case EHEA_EC_PORTSTATE_CHG :/* port state change */ -if (!port) { -netdev_err (dev,"unknown portnum %x\n" , portnum); -break ; - } -if (EHEA_BMASK_GET (NEQE_PORT_UP , eqe)) {if (!netif_carrier_ok (dev)) { ret =ehea_sense_port_attr (port);
Greg Kroah-Hartman
maintainerPATCH 272/312 bnxt: add a missing rcu synchronization
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
commit e5f6f564fd191d365fcd775c06a732a488205588 upstream.
Add a missing synchronize_net() call to avoid potential use after free, since we explicitly call napi_hash_del() to factorize the RCU grace period.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +4 -0
@@ -4250,6 +4250,10 @@ static void bnxt_del_napi(struct bnxt *bnapi_hash_del (&bnapi->napi);netif_napi_del (&bnapi->napi); } +/* We called napi_hash_del() before netif_napi_del(), we need +* to respect an RCU grace period before freeing napi structures. +*/ +synchronize_net (); }static void bnxt_init_napi (struct bnxt *bp)
Greg Kroah-Hartman
maintainerPATCH 228/312 power: bq27xxx: fix reading for bq27000 and bq27010
In reply to Greg Kroah-HartmanFrom: H. Nikolaus Schaller <[email protected]>
commit 549d7b317c761dbf4ed0c2945aec3acc9ca7ae14 upstream.
bug: the driver reports funny capacity values:
root@letux:/sys/class/power_supply/bq27000-battery# cat uevent POWER_SUPPLY_NAME=bq27000-battery POWER_SUPPLY_STATUS=Charging POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_VOLTAGE_NOW=3702000 POWER_SUPPLY_CURRENT_NOW=-464635 POWER_SUPPLY_CAPACITY=1536 <- over 100% is magic POWER_SUPPLY_CAPACITY_LEVEL=Normal POWER_SUPPLY_TEMP=311 POWER_SUPPLY_TIME_TO_FULL_NOW=10440 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_CHARGE_FULL=805450 POWER_SUPPLY_CHARGE_NOW=1068 POWER_SUPPLY_CHARGE_FULL_DESIGN=8844998 <- battery has just 1200 mAh POWER_SUPPLY_CYCLE_COUNT=21 POWER_SUPPLY_ENERGY_NOW=0 POWER_SUPPLY_POWER_AVG=0 POWER_SUPPLY_HEALTH=Good POWER_SUPPLY_MANUFACTURER=Texas Instruments
reason: the state of charge and the design capacity register are single byte only. The design capacity returns the higer order byte.
tested: GTA04 with Openmoko/FIC HF08x battery (using hdq)
--- drivers/power/bq27xxx_battery.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/power/bq27xxx_battery.c +9 -3
@@ -471,7 +471,10 @@ static int bq27xxx_battery_read_soc(stru {int soc; - soc =bq27xxx_read (di,BQ27XXX_REG_SOC , false); +if (di->chip ==BQ27000 || di->chip ==BQ27010 ) + soc =bq27xxx_read (di,BQ27XXX_REG_SOC , true); +else + soc =bq27xxx_read (di,BQ27XXX_REG_SOC , false);if (soc <0 )dev_dbg (di->dev,"error reading State-of-Charge\n" );
@@ -536,7 +539,10 @@ static int bq27xxx_battery_read_dcap(str {int dcap; - dcap =bq27xxx_read (di,BQ27XXX_REG_DCAP , false); +if (di->chip ==BQ27000 || di->chip ==BQ27010 ) + dcap =bq27xxx_read (di,BQ27XXX_REG_DCAP , true); +else + dcap =bq27xxx_read (di,BQ27XXX_REG_DCAP , false);if (dcap <0 ) {dev_dbg (di->dev,"error reading initial last measured discharge\n" );
@@ -544,7 +550,7 @@ static int bq27xxx_battery_read_dcap(str }if (di->chip ==BQ27000 || di->chip ==BQ27010 ) - dcap *=BQ27XXX_CURRENT_CONSTANT /BQ27XXX_RS ; + dcap = (dcap <<8 ) *BQ27XXX_CURRENT_CONSTANT /BQ27XXX_RS ;else dcap *=1000 ;
Greg Kroah-Hartman
maintainerPATCH 236/312 ipv4: Fix table id reference in fib_sync_down_addr
In reply to Greg Kroah-HartmanFrom: David Ahern <[email protected]>
commit e0a312629fefa943534fc46f7bfbe6de3fdaf463 upstream.
Hendrik reported routes in the main table using source address are not removed when the address is removed. The problem is that fib_sync_down_addr does not account for devices in the default VRF which are associated with the main table. Fix by updating the table id reference.
--- net/ipv4/fib_semantics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/fib_semantics.c +1 -1
@@ -1358,8 +1358,8 @@ int fib_sync_down_addr(struct net_deviceint ret =0 ;unsigned int hash =fib_laddr_hashfn (local);struct hlist_head *head = &fib_info_laddrhash[hash]; +int tb_id =l3mdev_fib_table (dev) ? :RT_TABLE_MAIN ;struct net *net =dev_net (dev); -int tb_id =l3mdev_fib_table (dev);struct fib_info *fi;if (!fib_info_laddrhash || local ==0 )
Greg Kroah-Hartman
maintainerPATCH 234/312 net: Dont delete routes in different VRFs
In reply to Greg Kroah-HartmanFrom: Mark Tomlinson <[email protected]>
commit 5a56a0b3a45dd0cc5b2f7bec6afd053a474ed9f5 upstream.
When deleting an IP address from an interface, there is a clean-up of routes which refer to this local address. However, there was no check to see that the VRF matched. This meant that deletion wasn't confined to the VRF it should have been.
To solve this, a new field has been added to fib_info to hold a table id. When removing fib entries corresponding to a local ip address, this table id is also used in the comparison.
The table id is populated when the fib_info is created. This was already done in some places, but not in ip_rt_ioctl(). This has now been fixed.
--- include/net/ip_fib.h | 3 ++- net/ipv4/fib_frontend.c | 3 ++- net/ipv4/fib_semantics.c | 8 ++++++-- 3 files changed, 10 insertions(+), 4 deletions(-)
include/net/ip_fib.h +2 -1
@@ -112,6 +112,7 @@ struct fib_info {unsigned char fib_scope;unsigned char fib_type;__be32 fib_prefsrc; +u32 fib_tb_id;u32 fib_priority;struct dst_metrics *fib_metrics;#define fib_mtu fib_metrics->metrics[RTAX_MTU-1]
@@ -320,7 +321,7 @@ void fib_flush_external(struct net *net)/* Exported by fib_semantics.c */ int ip_fib_check_default (__be32 gw,struct net_device *dev);int fib_sync_down_dev (struct net_device *dev,unsigned long event,bool force); -int fib_sync_down_addr (struct net *net,__be32 local); +int fib_sync_down_addr (struct net_device *dev,__be32 local);int fib_sync_up (struct net_device *dev,unsigned int nh_flags);void fib_sync_mtu (struct net_device *dev,u32 orig_mtu);
net/ipv4/fib_frontend.c +2 -1
@@ -509,6 +509,7 @@ static int rtentry_to_fib_config(structif (!dev)return -ENODEV ; cfg->fc_oif = dev->ifindex; + cfg->fc_table =l3mdev_fib_table (dev);if (colon) {struct in_ifaddr *ifa;struct in_device *in_dev =__in_dev_get_rtnl (dev);
@@ -1034,7 +1035,7 @@ no_promotions:* First of all, we scan fib_info list searching * for stray nexthop entries, then ignite fib_flush. */ -if (fib_sync_down_addr (dev_net (dev), ifa->ifa_local)) +if (fib_sync_down_addr (dev, ifa->ifa_local))fib_flush (dev_net (dev)); } }
net/ipv4/fib_semantics.c +6 -2
@@ -1069,6 +1069,7 @@ struct fib_info *fib_create_info(struct fi->fib_priority = cfg->fc_priority; fi->fib_prefsrc = cfg->fc_prefsrc; fi->fib_type = cfg->fc_type; + fi->fib_tb_id = cfg->fc_table; fi->fib_nhs = nhs;change_nexthops (fi) {
@@ -1352,18 +1353,21 @@ nla_put_failure:* referring to it. * - device went down -> we must shutdown all nexthops going via it. */ -int fib_sync_down_addr (struct net *net,__be32 local) +int fib_sync_down_addr (struct net_device *dev,__be32 local) {int ret =0 ;unsigned int hash =fib_laddr_hashfn (local);struct hlist_head *head = &fib_info_laddrhash[hash]; +struct net *net =dev_net (dev); +int tb_id =l3mdev_fib_table (dev);struct fib_info *fi;if (!fib_info_laddrhash || local ==0 )return 0 ;hlist_for_each_entry (fi, head, fib_lhash) { -if (!net_eq (fi->fib_net, net)) +if (!net_eq (fi->fib_net, net) || + fi->fib_tb_id != tb_id)continue ;if (fi->fib_prefsrc == local) { fi->fib_flags |=RTNH_F_DEAD ;
Greg Kroah-Hartman
maintainerPATCH 270/312 net: ethernet: stmmac: dwmac-generic: fix probe error path
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 939b20022765bc338b0f72cbf1eed60a907398d7 upstream.
Make sure to call any exit() callback to undo the effect of init() before returning on late probe errors.
--- drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c +11 -1
@@ -53,7 +53,17 @@ static int dwmac_generic_probe(struct plreturn ret; } -return stmmac_dvr_probe (&pdev->dev, plat_dat, &stmmac_res); + ret =stmmac_dvr_probe (&pdev->dev, plat_dat, &stmmac_res); +if (ret) + goto err_exit; + +return 0 ; + +err_exit: +if (plat_dat->exit) + plat_dat->exit (pdev, plat_dat->bsp_priv); + +return ret; }static const struct of_device_id dwmac_generic_match[] = {
Greg Kroah-Hartman
maintainerPATCH 264/312 net: icmp6_send should use dst dev to determine L3 domain
In reply to Greg Kroah-HartmanFrom: David Ahern <[email protected]>
commit 5d41ce29e3b91ef305f88d23f72b3359de329cec upstream.
icmp6_send is called in response to some event. The skb may not have the device set (skb->dev is NULL), but it is expected to have a dst set. Update icmp6_send to use the dst on the skb to determine L3 domain.
--- net/ipv6/icmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/icmp.c +1 -1
@@ -446,7 +446,7 @@ static void icmp6_send(struct sk_buff *sif (__ipv6_addr_needs_scope_id (addr_type)) iif = skb->dev->ifindex;else - iif =l3mdev_master_ifindex (skb->dev); + iif =l3mdev_master_ifindex (skb_dst (skb)->dev);/* * Must not send error if the source does not uniquely
Greg Kroah-Hartman
maintainerPATCH 269/312 fq_codel: return non zero qlen in class dumps
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
commit aafddbf0cffeb790f919436285328c762279b5d4 upstream.
We properly scan the flow list to count number of packets, but John passed 0 to gnet_stats_copy_queue() so we report a zero value to user space instead of the result.
--- net/sched/sch_fq_codel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/sched/sch_fq_codel.c +1 -1
@@ -588,7 +588,7 @@ static int fq_codel_dump_class_stats(str qs.backlog = q->backlogs[idx]; qs.drops = flow->dropped; } -if (gnet_stats_copy_queue (d,NULL , &qs,0 ) <0 ) +if (gnet_stats_copy_queue (d,NULL , &qs, qs.qlen) <0 )return -1 ;if (idx < q->flows_cnt)return gnet_stats_copy_app (d, &xstats,sizeof (xstats));
Greg Kroah-Hartman
maintainerPATCH 266/312 net: ethernet: stmmac: dwmac-sti: fix probe error path
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 0a9e22715ee384cf2a714c28f24ce8881b9fd815 upstream.
Make sure to disable clocks before returning on late probe errors.
probe function")
--- drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c +10 -1
@@ -365,7 +365,16 @@ static int sti_dwmac_probe(struct platfoif (ret)return ret; -return stmmac_dvr_probe (&pdev->dev, plat_dat, &stmmac_res); + ret =stmmac_dvr_probe (&pdev->dev, plat_dat, &stmmac_res); +if (ret) + goto err_dwmac_exit; + +return 0 ; + +err_dwmac_exit: +sti_dwmac_exit (pdev, plat_dat->bsp_priv); + +return ret; }static const struct sti_dwmac_of_data stih4xx_dwmac_data = {
Greg Kroah-Hartman
maintainerPATCH 263/312 tipc: fix the error handling in tipc_udp_enable()
In reply to Greg Kroah-HartmanFrom: Wei Yongjun <[email protected]>
commit a5de125dd46c851fc962806135953c1bd0a0f0df upstream.
Fix to return a negative error code in enable_mcast() error handling case, and release udp socket when necessary.
--- net/tipc/udp_media.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
net/tipc/udp_media.c +4 -1
@@ -405,10 +405,13 @@ static int tipc_udp_enable(struct net *n tuncfg.encap_destroy =NULL ;setup_udp_tunnel_sock (net, ub->ubsock, &tuncfg); -if (enable_mcast (ub, remote)) + err =enable_mcast (ub, remote); +if (err) goto err;return 0 ; err: +if (ub->ubsock) +udp_tunnel_sock_release (ub->ubsock);kfree (ub);return err; }
Greg Kroah-Hartman
maintainerPATCH 262/312 macvtap: segmented packet is consumed
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
commit be0bd3160165e42783d8215f426e41c07179c08a upstream.
If GSO packet is segmented and its segments are properly queued, we call consume_skb() instead of kfree_skb() to be drop monitor friendly.
--- drivers/net/macvtap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/macvtap.c +1 -1
@@ -373,7 +373,7 @@ static rx_handler_result_t macvtap_handl goto wake_up; } -kfree_skb (skb); +consume_skb (skb);while (segs) {struct sk_buff *nskb = segs->next;
Greg Kroah-Hartman
maintainerPATCH 261/312 net: macb: add missing free_netdev() on error in macb_probe()
In reply to Greg Kroah-HartmanFrom: Wei Yongjun <[email protected]>
commit b22ae0b4d9669495158a7fa0fd027bd0fcd8896e upstream.
Add the missing free_netdev() before return from function macb_probe() in the platform_get_irq() error handling case.
--- drivers/net/ethernet/cadence/macb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/cadence/macb.c +1 -1
@@ -2904,7 +2904,7 @@ static int macb_probe(struct platform_de dev->irq =platform_get_irq (pdev,0 );if (dev->irq <0 ) { err = dev->irq; - goto err_disable_clocks; + goto err_out_free_netdev; } mac =of_get_mac_address (np);
Greg Kroah-Hartman
maintainerPATCH 256/312 gre: reject GUE and FOU in collect metadata mode
In reply to Greg Kroah-HartmanFrom: Jiri Benc <[email protected]>
commit 946b636f1730c64e05ff7fe8cf7136422fa8ea70 upstream.
The collect metadata mode does not support GUE nor FOU. This might be implemented later; until then, we should reject such config.
I think this is okay to be changed. It's unlikely anyone has such configuration (as it doesn't work anyway) and we may need a way to distinguish whether it's supported or not by the kernel later.
For backwards compatibility with iproute2, it's not possible to just check the attribute presence (iproute2 always includes the attribute), the actual value has to be checked, too.
--- net/ipv4/ip_gre.c | 5 +++++ 1 file changed, 5 insertions(+)
net/ipv4/ip_gre.c +5 -0
@@ -937,6 +937,11 @@ static int ipgre_tunnel_validate(structif (flags & (GRE_VERSION |GRE_ROUTING ))return -EINVAL ; +if (data[IFLA_GRE_COLLECT_METADATA ] && + data[IFLA_GRE_ENCAP_TYPE ] && +nla_get_u16 (data[IFLA_GRE_ENCAP_TYPE ]) !=TUNNEL_ENCAP_NONE ) +return -EINVAL ; +return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 251/312 net: bcmgenet: fix skb_len in bcmgenet_xmit_single()
In reply to Greg Kroah-HartmanFrom: Petri Gynther <[email protected]>
commit 7dd399130efb5a454daf24075b7563d197114e39 upstream.
skb_len needs to be skb_headlen(skb) in bcmgenet_xmit_single().
Fragmented skbs can have only Ethernet + IP + TCP headers (14+20+20=54 bytes) in the linear buffer, followed by the rest in fragments. Bumping skb_len to ETH_ZLEN would be incorrect for this case, as it would introduce garbage between TCP header and the fragment data.
This also works with regular/non-fragmented small packets < ETH_ZLEN bytes. Successfully tested this on GENETv3 with 42-byte ARP frames.
For testing, I used:
ethtool -K eth0 tx-checksum-ipv4 off
ethtool -K eth0 tx-checksum-ipv6 off
echo 0 > /proc/sys/net/ipv4/tcp_timestamps
--- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/broadcom/genet/bcmgenet.c +1 -1
@@ -1346,7 +1346,7 @@ static int bcmgenet_xmit_single(struct n tx_cb_ptr->skb = skb; - skb_len =skb_headlen (skb) <ETH_ZLEN ?ETH_ZLEN :skb_headlen (skb); + skb_len =skb_headlen (skb); mapping =dma_map_single (kdev, skb->data, skb_len,DMA_TO_DEVICE ); ret =dma_mapping_error (kdev, mapping);
Greg Kroah-Hartman
maintainerPATCH 250/312 cxgb4/cxgb4vf: Fixes regression in perf when tx vlan offload is disabled
In reply to Greg Kroah-HartmanFrom: Hariprasad Shenai <[email protected]>
commit 8d09e6b8b9c9969ac59496dc21e10b67fe727e7e upstream.
The commit 637d3e997351 ("cxgb4: Discard the packet if the length is greater than mtu") introduced a regression in the VLAN interface performance when Tx VLAN offload is disabled.
Check if skb is tagged, regardless of whether it is hardware accelerated or not. Presently we were checking only for hardware acclereated one, which caused performance to drop to ~0.17Mbps on a 10GbE adapter for VLAN interface, when tx vlan offload is turned off using ethtool. The ethernet head length calculation was going wrong in this case, and driver ended up dropping packets.
--- drivers/net/ethernet/chelsio/cxgb4/sge.c | 2 +- drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/chelsio/cxgb4/sge.c +1 -1
@@ -1165,7 +1165,7 @@ out_free: dev_kfree_skb_any(skb);/* Discard the packet if the length is greater than mtu */ max_pkt_len =ETH_HLEN + dev->mtu; -if (skb_vlan_tag_present (skb)) +if (skb_vlan_tagged (skb)) max_pkt_len +=VLAN_HLEN ;if (!skb_shinfo (skb)->gso_size && (unlikely (skb->len > max_pkt_len))) goto out_free;
drivers/net/ethernet/chelsio/cxgb4vf/sge.c +1 -1
@@ -1188,7 +1188,7 @@ int t4vf_eth_xmit(struct sk_buff *skb, s/* Discard the packet if the length is greater than mtu */ max_pkt_len =ETH_HLEN + dev->mtu; -if (skb_vlan_tag_present (skb)) +if (skb_vlan_tagged (skb)) max_pkt_len +=VLAN_HLEN ;if (!skb_shinfo (skb)->gso_size && (unlikely (skb->len > max_pkt_len))) goto out_free;
Greg Kroah-Hartman
maintainerPATCH 248/312 spi: rockchip: modify DMA max burst to 1
In reply to Greg Kroah-HartmanFrom: Addy Ke <[email protected]>
commit 80abf8880cc6e1594c11b7c417f22dde60e25312 upstream.
Generic dma controller on Rockchips' platform cannot support DMAFLUSHP instruction which make dma to flush the req of non-aligned or non-multiple of what we need. That will cause an unrecoverable dma bus error. The saftest way is to set dma max burst to 1.
--- drivers/spi/spi-rockchip.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
drivers/spi/spi-rockchip.c +10 -2
@@ -199,6 +199,7 @@ struct rockchip_spi {struct sg_table rx_sg;struct rockchip_spi_dma_data dma_rx;struct rockchip_spi_dma_data dma_tx; +struct dma_slave_caps dma_caps; };static inline void spi_enable_chip (struct rockchip_spi *rs,int enable)
@@ -457,7 +458,10 @@ static void rockchip_spi_prepare_dma(str rxconf.direction = rs->dma_rx.direction; rxconf.src_addr = rs->dma_rx.addr; rxconf.src_addr_width = rs->n_bytes; - rxconf.src_maxburst = rs->n_bytes; +if (rs->dma_caps.max_burst >4 ) + rxconf.src_maxburst =4 ; +else + rxconf.src_maxburst =1 ;dmaengine_slave_config (rs->dma_rx.ch, &rxconf); rxdesc = dmaengine_prep_slave_sg(
@@ -474,7 +478,10 @@ static void rockchip_spi_prepare_dma(str txconf.direction = rs->dma_tx.direction; txconf.dst_addr = rs->dma_tx.addr; txconf.dst_addr_width = rs->n_bytes; - txconf.dst_maxburst = rs->n_bytes; +if (rs->dma_caps.max_burst >4 ) + txconf.dst_maxburst =4 ; +else + txconf.dst_maxburst =1 ;dmaengine_slave_config (rs->dma_tx.ch, &txconf); txdesc = dmaengine_prep_slave_sg(
@@ -738,6 +745,7 @@ static int rockchip_spi_probe(struct pla }if (rs->dma_tx.ch && rs->dma_rx.ch) { +dma_get_slave_caps (rs->dma_rx.ch, &(rs->dma_caps)); rs->dma_tx.addr = (dma_addr_t)(mem->start +ROCKCHIP_SPI_TXDR ); rs->dma_rx.addr = (dma_addr_t)(mem->start +ROCKCHIP_SPI_RXDR ); rs->dma_tx.direction =DMA_MEM_TO_DEV ;
Greg Kroah-Hartman
maintainerPATCH 247/312 dmaengine: edma: Add probe callback to edma_tptc_driver
In reply to Greg Kroah-HartmanFrom: Peter Ujfalusi <[email protected]>
commit 4fa2d09c1ae879c2ee2760ab419a4f97026dd97b upstream.
Due to changes in device and platform code drivers w/o probe will fail to load. This means that the devices for eDMA TPTCs are goign to be without driver and omap hwmod code will turn them off after the kernel finished loading:
[ 3.015900] platform 49800000.tptc: omap_device_late_idle: enabled but no driver. Idling [ 3.024671] platform 49a00000.tptc: omap_device_late_idle: enabled but no driver. Idling
This will prevent eDMA to work since the TPTCs are not enabled.
--- drivers/dma/edma.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/dma/edma.c +6 -0
@@ -2439,7 +2439,13 @@ static struct platform_driver edma_drive }, }; +static int edma_tptc_probe (struct platform_device *pdev) +{ +return 0 ; +} +static struct platform_driver edma_tptc_driver = { + .probe = edma_tptc_probe, .driver = { .name ="edma3-tptc" , .of_match_table = edma_tptc_of_ids,
Greg Kroah-Hartman
maintainerPATCH 238/312 xprtrdma: Fix backchannel allocation of extra rpcrdma_reps
In reply to Greg Kroah-HartmanFrom: Chuck Lever <[email protected]>
commit d698c4a02ee02053bbebe051322ff427a2dad56a upstream.
The backchannel code uses rpcrdma_recv_buffer_put to add new reps to the free rep list. This also decrements rb_recv_count, which spoofs the receive overrun logic in rpcrdma_buffer_get_rep.
Commit 9b06688bc3b9 ("xprtrdma: Fix additional uses of spin_lock_irqsave(rb_lock)") replaced the original open-coded list_add with a call to rpcrdma_recv_buffer_put(), but then a year later, commit 05c974669ece ("xprtrdma: Fix receive buffer accounting") added rep accounting to rpcrdma_recv_buffer_put. It was an oversight to let the backchannel continue to use this function.
The fix this, let's combine the "add to free list" logic with rpcrdma_create_rep.
Also, do not allocate RPCRDMA_MAX_BC_REQUESTS rpcrdma_reps in rpcrdma_buffer_create and then allocate additional rpcrdma_reps in rpcrdma_bc_setup_reps. Allocating the extra reps during backchannel set-up is sufficient.
--- net/sunrpc/xprtrdma/backchannel.c | 12 ++---------- net/sunrpc/xprtrdma/verbs.c | 34 ++++++++++++++++++++-------------- net/sunrpc/xprtrdma/xprt_rdma.h | 2 +- 3 files changed, 23 insertions(+), 25 deletions(-)
net/sunrpc/xprtrdma/backchannel.c +2 -10
@@ -84,21 +84,13 @@ out_fail:static int rpcrdma_bc_setup_reps (struct rpcrdma_xprt *r_xprt,unsigned int count) { -struct rpcrdma_rep *rep;int rc =0 ;while (count--) { - rep =rpcrdma_create_rep (r_xprt); -if (IS_ERR (rep)) { -pr_err ("RPC: %s: reply buffer alloc failed\n" , - __func__); - rc =PTR_ERR (rep); + rc =rpcrdma_create_rep (r_xprt); +if (rc)break ; - } - -rpcrdma_recv_buffer_put (rep); } -return rc; }
net/sunrpc/xprtrdma/verbs.c +20 -14
@@ -911,10 +911,17 @@ rpcrdma_create_req(struct rpcrdma_xprt *return req; } -struct rpcrdma_rep * -rpcrdma_create_rep (struct rpcrdma_xprt *r_xprt) +/** +* rpcrdma_create_rep - Allocate an rpcrdma_rep object +* @r_xprt: controlling transport +* +* Returns 0 on success or a negative errno on failure. +*/ +int +rpcrdma_create_rep (struct rpcrdma_xprt *r_xprt) {struct rpcrdma_create_data_internal *cdata = &r_xprt->rx_data; +struct rpcrdma_buffer *buf = &r_xprt->rx_buf;struct rpcrdma_ia *ia = &r_xprt->rx_ia;struct rpcrdma_rep *rep;int rc;
@@ -934,12 +941,18 @@ rpcrdma_create_rep(struct rpcrdma_xprt * rep->rr_device = ia->ri_device; rep->rr_rxprt = r_xprt;INIT_WORK (&rep->rr_work, rpcrdma_receive_worker); -return rep; + +spin_lock (&buf->rb_lock); +list_add (&rep->rr_list, &buf->rb_recv_bufs); +spin_unlock (&buf->rb_lock); +return 0 ; out_free:kfree (rep); out: -return ERR_PTR (rc); +dprintk ("RPC: %s: reply buffer %d alloc failed\n" , + __func__, rc); +return rc; }int
@@ -975,17 +988,10 @@ rpcrdma_buffer_create(struct rpcrdma_xpr }INIT_LIST_HEAD (&buf->rb_recv_bufs); -for (i =0 ; i < buf->rb_max_requests +2 ; i++) { -struct rpcrdma_rep *rep; - - rep =rpcrdma_create_rep (r_xprt); -if (IS_ERR (rep)) { -dprintk ("RPC: %s: reply buffer %d alloc failed\n" , - __func__, i); - rc =PTR_ERR (rep); +for (i =0 ; i <= buf->rb_max_requests; i++) { + rc =rpcrdma_create_rep (r_xprt); +if (rc) goto out; - } -list_add (&rep->rr_list, &buf->rb_recv_bufs); }return 0 ;
net/sunrpc/xprtrdma/xprt_rdma.h +1 -1
@@ -431,8 +431,8 @@ int rpcrdma_ep_post_recv(struct rpcrdma_* Buffer calls - xprtrdma/verbs.c */ struct rpcrdma_req *rpcrdma_create_req (struct rpcrdma_xprt *); -struct rpcrdma_rep *rpcrdma_create_rep (struct rpcrdma_xprt *);void rpcrdma_destroy_req (struct rpcrdma_ia *,struct rpcrdma_req *); +int rpcrdma_create_rep (struct rpcrdma_xprt *r_xprt);int rpcrdma_buffer_create (struct rpcrdma_xprt *);void rpcrdma_buffer_destroy (struct rpcrdma_buffer *);
Greg Kroah-Hartman
maintainerPATCH 186/312 be2net: Dont leak iomapped memory on removal.
In reply to Greg Kroah-HartmanFrom: Douglas Miller <[email protected]>
commit a69bf3c5b49ef488970c74e26ba0ec12f08491c2 upstream.
The adapter->pcicfg resource is either mapped via pci_iomap() or derived from adapter->db. During be_remove() this resource was ignored and so could remain mapped after remove.
Add a flag to track whether adapter->pcicfg was mapped or not, then use that flag in be_unmap_pci_bars() to unmap if required.
--- drivers/net/ethernet/emulex/benet/be.h | 1 + drivers/net/ethernet/emulex/benet/be_main.c | 4 ++++ 2 files changed, 5 insertions(+)
drivers/net/ethernet/emulex/benet/be.h +1 -0
@@ -531,6 +531,7 @@ struct be_adapter {struct delayed_work be_err_detection_work;u8 err_flags; +bool pcicfg_mapped;/* pcicfg obtained via pci_iomap() */ u32 flags;u32 cmd_privileges;/* Ethtool knobs and info */
drivers/net/ethernet/emulex/benet/be_main.c +4 -0
@@ -5526,6 +5526,8 @@ static void be_unmap_pci_bars(struct be_pci_iounmap (adapter->pdev, adapter->csr);if (adapter->db)pci_iounmap (adapter->pdev, adapter->db); +if (adapter->pcicfg && adapter->pcicfg_mapped) +pci_iounmap (adapter->pdev, adapter->pcicfg); }static int db_bar (struct be_adapter *adapter)
@@ -5577,8 +5579,10 @@ static int be_map_pci_bars(struct be_adaif (!addr) goto pci_map_err; adapter->pcicfg = addr; + adapter->pcicfg_mapped = true; }else { adapter->pcicfg = adapter->db +SRIOV_VF_PCICFG_OFFSET ; + adapter->pcicfg_mapped = false; } }
Greg Kroah-Hartman
maintainerPATCH 195/312 ipv6: add missing netconf notif when all is updated
In reply to Greg Kroah-HartmanFrom: Nicolas Dichtel <[email protected]>
commit d26c638c16cb54f6fb1507e27df93ede692db572 upstream.
The 'default' value was not advertised.
--- net/ipv6/addrconf.c | 7 +++++++ 1 file changed, 7 insertions(+)
net/ipv6/addrconf.c +7 -0
@@ -771,7 +771,14 @@ static int addrconf_fixup_forwarding(str }if (p == &net->ipv6.devconf_all->forwarding) { +int old_dflt = net->ipv6.devconf_dflt->forwarding; + net->ipv6.devconf_dflt->forwarding = newf; +if ((!newf) ^ (!old_dflt)) +inet6_netconf_notify_devconf (net,NETCONFA_FORWARDING , +NETCONFA_IFINDEX_DEFAULT , + net->ipv6.devconf_dflt); +addrconf_forward_change (net, newf);if ((!newf) ^ (!old)) inet6_netconf_notify_devconf(net, NETCONFA_FORWARDING,
Greg Kroah-Hartman
maintainerPATCH 225/312 net_sched: flower: Avoid dissection of unmasked keys
In reply to Greg Kroah-HartmanFrom: Hadar Hen Zion <[email protected]>
commit 339ba878cfb01b68de3d281ba33fd5e4c9f76546 upstream.
The current flower implementation checks the mask range and set all the keys included in that range as "used_keys", even if a specific key in the range has a zero mask.
This behavior can cause a false positive return value of dissector_uses_key function and unnecessary dissection in __skb_flow_dissect.
This patch checks explicitly the mask of each key and "used_keys" will be set accordingly.
--- net/sched/cls_flower.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-)
net/sched/cls_flower.c +13 -15
@@ -351,12 +351,10 @@ static int fl_init_hashtable(struct cls_#define FL_KEY_MEMBER_OFFSET (member) offsetof(struct fl_flow_key, member)#define FL_KEY_MEMBER_SIZE (member) (sizeof(((struct fl_flow_key *) 0)->member)) -#define FL_KEY_MEMBER_END_OFFSET (member) \ - (FL_KEY_MEMBER_OFFSET(member) + FL_KEY_MEMBER_SIZE(member)) -#define FL_KEY_IN_RANGE (mask, member) \ - (FL_KEY_MEMBER_OFFSET(member) <= (mask)->range.end && \ - FL_KEY_MEMBER_END_OFFSET(member) >= (mask)->range.start) +#define FL_KEY_IS_MASKED (mask, member) \ + memchr_inv(((char *)mask) + FL_KEY_MEMBER_OFFSET(member), \ + 0, FL_KEY_MEMBER_SIZE(member)) \#define FL_KEY_SET (keys, cnt, id, member) \ do { \
@@ -365,9 +363,9 @@ static int fl_init_hashtable(struct cls_ cnt++; \ }while (0 ); -#define FL_KEY_SET_IF_IN_RANGE (mask, keys, cnt, id, member) \ +#define FL_KEY_SET_IF_MASKED (mask, keys, cnt, id, member) \ do { \ - if (FL_KEY_IN_RANGE(mask, member)) \ + if (FL_KEY_IS_MASKED(mask, member)) \ FL_KEY_SET(keys, cnt, id, member); \ } while(0);
@@ -379,14 +377,14 @@ static void fl_init_dissector(struct clsFL_KEY_SET (keys, cnt,FLOW_DISSECTOR_KEY_CONTROL , control);FL_KEY_SET (keys, cnt,FLOW_DISSECTOR_KEY_BASIC , basic); -FL_KEY_SET_IF_IN_RANGE (mask, keys, cnt, -FLOW_DISSECTOR_KEY_ETH_ADDRS , eth); -FL_KEY_SET_IF_IN_RANGE (mask, keys, cnt, -FLOW_DISSECTOR_KEY_IPV4_ADDRS , ipv4); -FL_KEY_SET_IF_IN_RANGE (mask, keys, cnt, -FLOW_DISSECTOR_KEY_IPV6_ADDRS , ipv6); -FL_KEY_SET_IF_IN_RANGE (mask, keys, cnt, -FLOW_DISSECTOR_KEY_PORTS , tp); +FL_KEY_SET_IF_MASKED (&mask->key, keys, cnt, +FLOW_DISSECTOR_KEY_ETH_ADDRS , eth); +FL_KEY_SET_IF_MASKED (&mask->key, keys, cnt, +FLOW_DISSECTOR_KEY_IPV4_ADDRS , ipv4); +FL_KEY_SET_IF_MASKED (&mask->key, keys, cnt, +FLOW_DISSECTOR_KEY_IPV6_ADDRS , ipv6); +FL_KEY_SET_IF_MASKED (&mask->key, keys, cnt, +FLOW_DISSECTOR_KEY_PORTS , tp);skb_flow_dissector_init (&head->dissector, keys, cnt); }
Greg Kroah-Hartman
maintainerPATCH 190/312 ipv4: do not abuse GFP_ATOMIC in inet_netconf_notify_devconf()
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
commit fa17806cde76fb1087532f07e72aa757a30e0500 upstream.
inet_forward_change() runs with RTNL held.
We are allowed to sleep if required.
If we use __in_dev_get_rtnl() instead of __in_dev_get_rcu(), we no longer have to use GFP_ATOMIC allocations in inet_netconf_notify_devconf(), meaning we are less likely to miss notifications under memory pressure, and wont touch precious memory reserves either and risk dropping incoming packets.
inet_netconf_get_devconf() can also use GFP_KERNEL allocation.
--- net/ipv4/devinet.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
net/ipv4/devinet.c +6 -6
@@ -1814,7 +1814,7 @@ void inet_netconf_notify_devconf(structstruct sk_buff *skb;int err = -ENOBUFS ; - skb =nlmsg_new (inet_netconf_msgsize_devconf (type),GFP_ATOMIC ); + skb =nlmsg_new (inet_netconf_msgsize_devconf (type),GFP_KERNEL );if (!skb) goto errout;
@@ -1826,7 +1826,7 @@ void inet_netconf_notify_devconf(structkfree_skb (skb); goto errout; } -rtnl_notify (skb, net,0 ,RTNLGRP_IPV4_NETCONF ,NULL ,GFP_ATOMIC ); +rtnl_notify (skb, net,0 ,RTNLGRP_IPV4_NETCONF ,NULL ,GFP_KERNEL );return ; errout:if (err <0 )
@@ -1883,7 +1883,7 @@ static int inet_netconf_get_devconf(stru } err = -ENOBUFS ; - skb =nlmsg_new (inet_netconf_msgsize_devconf (-1 ),GFP_ATOMIC ); + skb =nlmsg_new (inet_netconf_msgsize_devconf (-1 ),GFP_KERNEL );if (!skb) goto errout;
@@ -2007,16 +2007,16 @@ static void inet_forward_change(struct nfor_each_netdev (net, dev) {struct in_device *in_dev; +if (on)dev_disable_lro (dev); -rcu_read_lock (); - in_dev =__in_dev_get_rcu (dev); + + in_dev =__in_dev_get_rtnl (dev);if (in_dev) {IN_DEV_CONF_SET (in_dev,FORWARDING , on);inet_netconf_notify_devconf (net,NETCONFA_FORWARDING , dev->ifindex, &in_dev->cnf); } -rcu_read_unlock (); } }
Greg Kroah-Hartman
maintainerPATCH 224/312 sched/fair: Fix calc_cfs_shares() fixed point arithmetics width confusion
In reply to Greg Kroah-HartmanFrom: Peter Zijlstra <[email protected]>
commit ea1dc6fc6242f991656e35e2ed3d90ec1cd13418 upstream.
Commit:
fde7d22e01aa ("sched/fair: Fix overly small weight for interactive group entities")
did something non-obvious but also did it buggy yet latent.
The problem was exposed for real by a later commit in the v4.7 merge window:
2159197d6677 ("sched/core: Enable increased load resolution on 64-bit kernels")
... after which tg->load_avg and cfs_rq->load.weight had different units (10 bit fixed point and 20 bit fixed point resp.).
Add a comment to explain the use of cfs_rq->load.weight over the 'natural' cfs_rq->avg.load_avg and add scale_load_down() to correct for the difference in unit.
Since this is (now, as per a previous commit) the only user of calc_tg_weight(), collapse it.
The effects of this bug should be randomly inconsistent SMP-balancing of cgroups workloads.
--- kernel/sched/fair.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-)
kernel/sched/fair.c +11 -16
@@ -2394,28 +2394,22 @@ account_entity_dequeue(struct cfs_rq *cf #ifdef CONFIG_FAIR_GROUP_SCHED # ifdef CONFIG_SMP -static inline long calc_tg_weight(struct task_group *tg, struct cfs_rq *cfs_rq) +static long calc_cfs_shares(struct cfs_rq *cfs_rq, struct task_group *tg) { - long tg_weight; + long tg_weight, load, shares; /* - * Use this CPU's real-time load instead of the last load contribution - * as the updating of the contribution is delayed, and we will use the - * the real-time load to calc the share. See update_tg_load_avg(). + * This really should be: cfs_rq->avg.load_avg, but instead we use + * cfs_rq->load.weight, which is its upper bound. This helps ramp up + * the shares for small weight interactive tasks. */ - tg_weight = atomic_long_read(&tg->load_avg); - tg_weight -= cfs_rq->tg_load_avg_contrib; - tg_weight += cfs_rq->load.weight; - - return tg_weight; -} + load = scale_load_down(cfs_rq->load.weight); -static long calc_cfs_shares(struct cfs_rq *cfs_rq, struct task_group *tg) -{ - long tg_weight, load, shares; + tg_weight = atomic_long_read(&tg->load_avg); - tg_weight = calc_tg_weight(tg, cfs_rq); - load = cfs_rq->load.weight; + /* Ensure tg_weight >= load */ + tg_weight -= cfs_rq->tg_load_avg_contrib; + tg_weight += load; shares = (tg->shares * load); if (tg_weight)
@@ -2434,6 +2428,7 @@ static inline long calc_cfs_shares(struc return tg->shares; }# endif /* CONFIG_SMP */ +static void reweight_entity (struct cfs_rq *cfs_rq,struct sched_entity *se,unsigned long weight) {
Greg Kroah-Hartman
maintainerPATCH 219/312 net/mlx4_en: Fix potential deadlock in port statistics flow
In reply to Greg Kroah-HartmanFrom: Jack Morgenstein <[email protected]>
commit d2582a03939ed0a80ffcd3ea5345505bc8067c54 upstream.
mlx4_en_DUMP_ETH_STATS took the *counter mutex* and then called the FW command, with WRAPPED attribute. As a result, the fw command is wrapped on the Hypervisor when it calls mlx4_en_DUMP_ETH_STATS. The FW command wrapper flow on the hypervisor takes the *slave_cmd_mutex* during processing.
At the same time, a VF could be in the process of coming up, and could call mlx4_QUERY_FUNC_CAP. On the hypervisor, the command flow takes the *slave_cmd_mutex*, then executes mlx4_QUERY_FUNC_CAP_wrapper. mlx4_QUERY_FUNC_CAP wrapper calls mlx4_get_default_counter_index(), which takes the *counter mutex*. DEADLOCK.
The fix is that the DUMP_ETH_STATS fw command should be called with the NATIVE attribute, so that on the hypervisor, this command does not enter the wrapper flow.
Since the Hypervisor no longer goes through the wrapper code, we also simply return 0 in mlx4_DUMP_ETH_STATS_wrapper (i.e.the function succeeds, but the returned data will be all zeroes).
No need to test if it is the Hypervisor going through the wrapper.
--- drivers/net/ethernet/mellanox/mlx4/en_port.c | 4 ++-- drivers/net/ethernet/mellanox/mlx4/mlx4.h | 2 -- drivers/net/ethernet/mellanox/mlx4/port.c | 13 +------------ 3 files changed, 3 insertions(+), 16 deletions(-)
drivers/net/ethernet/mellanox/mlx4/en_port.c +2 -2
@@ -164,7 +164,7 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_ereturn PTR_ERR (mailbox); err =mlx4_cmd_box (mdev->dev,0 , mailbox->dma, in_mod,0 ,MLX4_CMD_DUMP_ETH_STATS ,MLX4_CMD_TIME_CLASS_B , -MLX4_CMD_WRAPPED ); +MLX4_CMD_NATIVE );if (err) goto out;
@@ -325,7 +325,7 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_e err =mlx4_cmd_box (mdev->dev,0 , mailbox->dma, in_mod |MLX4_DUMP_ETH_STATS_FLOW_CONTROL ,0 ,MLX4_CMD_DUMP_ETH_STATS , -MLX4_CMD_TIME_CLASS_B ,MLX4_CMD_WRAPPED ); +MLX4_CMD_TIME_CLASS_B ,MLX4_CMD_NATIVE );if (err) goto out; }
drivers/net/ethernet/mellanox/mlx4/mlx4.h +0 -2
@@ -1313,8 +1313,6 @@ int mlx4_SET_VLAN_FLTR_wrapper(struct ml struct mlx4_cmd_info *cmd);int mlx4_common_set_vlan_fltr (struct mlx4_dev *dev,int function,int port,void *buf); -int mlx4_common_dump_eth_stats (struct mlx4_dev *dev,int slave,u32 in_mod, -struct mlx4_cmd_mailbox *outbox); int mlx4_DUMP_ETH_STATS_wrapper(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox,
drivers/net/ethernet/mellanox/mlx4/port.c +1 -12
@@ -1155,24 +1155,13 @@ int mlx4_SET_VLAN_FLTR_wrapper(struct mlreturn err; } -int mlx4_common_dump_eth_stats (struct mlx4_dev *dev,int slave, -u32 in_mod,struct mlx4_cmd_mailbox *outbox) -{ -return mlx4_cmd_box (dev,0 , outbox->dma, in_mod,0 , -MLX4_CMD_DUMP_ETH_STATS ,MLX4_CMD_TIME_CLASS_B , -MLX4_CMD_NATIVE ); -} -int mlx4_DUMP_ETH_STATS_wrapper (struct mlx4_dev *dev,int slave,struct mlx4_vhcr *vhcr,struct mlx4_cmd_mailbox *inbox,struct mlx4_cmd_mailbox *outbox,struct mlx4_cmd_info *cmd) { -if (slave != dev->caps.function) -return 0 ; -return mlx4_common_dump_eth_stats (dev, slave, - vhcr->in_modifier, outbox); +return 0 ; } int mlx4_get_slave_from_roce_gid(struct mlx4_dev *dev, int port, u8 *gid,
Greg Kroah-Hartman
maintainerPATCH 222/312 mlxsw: switchx2: Fix misuse of hard_header_len
In reply to Greg Kroah-HartmanFrom: Yotam Gigi <[email protected]>
commit 251d41c58b765f00d73b1b4230cad256e25f2735 upstream.
In order to specify that the mlxsw switchx2 driver needs additional headroom for packets, there have been use of the hard_header_len field of the netdevice struct.
This commit changes that to use needed_headroom instead, as this is the correct way to do that.
--- drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlxsw/switchx2.c +1 -1
@@ -993,7 +993,7 @@ static int mlxsw_sx_port_create(struct m/* Each packet needs to have a Tx header (metadata) on top all other * headers. */ - dev->hard_header_len +=MLXSW_TXHDR_LEN ; + dev->needed_headroom =MLXSW_TXHDR_LEN ; err =mlxsw_sx_port_module_check (mlxsw_sx_port, &usable);if (err) {
Greg Kroah-Hartman
maintainerPATCH 218/312 net/mlx4_core: Do not access comm channel if it has not yet been initialized
In reply to Greg Kroah-HartmanFrom: Jack Morgenstein <[email protected]>
commit 81d184199e328fdad5633da139a10337327154e0 upstream.
In the Hypervisor, there are several FW commands which are invoked before the comm channel is initialized (in mlx4_multi_func_init). These include MOD_STAT_CONFIG, QUERY_DEV_CAP, INIT_HCA, and others.
If any of these commands fails, say with a timeout, the Hypervisor driver enters the internal error reset flow. In this flow, the driver attempts to notify all slaves via the comm channel that an internal error has occurred.
Since the comm channel has not yet been initialized (i.e., mapped via ioremap), this will cause dereferencing a NULL pointer.
To fix this, do not access the comm channel in the internal error flow if it has not yet been initialized.
--- drivers/net/ethernet/mellanox/mlx4/cmd.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/net/ethernet/mellanox/mlx4/cmd.c +9 -0
@@ -2451,6 +2451,7 @@ err_comm_admin:kfree (priv->mfunc.master.slave_state); err_comm:iounmap (priv->mfunc.comm); + priv->mfunc.comm =NULL ; err_vhcr: dma_free_coherent(&dev->persist->pdev->dev, PAGE_SIZE, priv->mfunc.vhcr,
@@ -2518,6 +2519,13 @@ void mlx4_report_internal_err_comm_eventint slave;u32 slave_read; +/* If the comm channel has not yet been initialized, +* skip reporting the internal error event to all +* the communication channels. +*/ +if (!priv->mfunc.comm) +return ; +/* Report an internal error event to all * communication channels. */
@@ -2552,6 +2560,7 @@ void mlx4_multi_func_cleanup(struct mlx4 }iounmap (priv->mfunc.comm); + priv->mfunc.comm =NULL ; }void mlx4_cmd_cleanup (struct mlx4_dev *dev,int cleanup_mask)
Greg Kroah-Hartman
maintainerPATCH 217/312 net/mlx4_en: Process all completions in RX rings after port goes up
In reply to Greg Kroah-HartmanFrom: Erez Shitrit <[email protected]>
commit 8d59de8f7bb3db296331c665779c653b0c8d13ba upstream.
Currently there is a race between incoming traffic and initialization flow. HW is able to receive the packets after INIT_PORT is done and unicast steering is configured. Before we set priv->port_up NAPI is not scheduled and receive queues become full. Therefore we never get new interrupts about the completions.
This issue could happen if running heavy traffic during bringing port up.
The resolution is to schedule NAPI once port_up is set. If receive queues were full this will process all cqes and release them.
--- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/ethernet/mellanox/mlx4/en_netdev.c +7 -0
@@ -1720,6 +1720,13 @@ int mlx4_en_start_port(struct net_devicevxlan_get_rx_port (dev);#endif priv->port_up = true; + +/* Process all completions if exist to prevent +* the queues freezing if they are full +*/ +for (i =0 ; i < priv->rx_ring_num; i++) +napi_schedule (&priv->rx_cq[i]->napi); +netif_tx_start_all_queues (dev);netif_device_attach (dev);
Greg Kroah-Hartman
maintainerPATCH 189/312 ipv4: fix checksum annotation in udp4_csum_init
In reply to Greg Kroah-HartmanFrom: Hannes Frederic Sowa <[email protected]>
commit b46d9f625b07f843c706c2c7d0210a90ccdf143b upstream.
--- net/ipv4/udp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
net/ipv4/udp.c +5 -2
@@ -1754,8 +1754,11 @@ static inline int udp4_csum_init(struct } } -return skb_checksum_init_zero_check (skb, proto, uh->check, - inet_compute_pseudo); +/* Note, we are only interested in != 0 or == 0, thus the +* force to int. +*/ +return (__force int )skb_checksum_init_zero_check (skb, proto, uh->check, + inet_compute_pseudo); }/*
Greg Kroah-Hartman
maintainerPATCH 210/312 bpf, trace: check event type in bpf_perf_event_read
In reply to Greg Kroah-HartmanFrom: Alexei Starovoitov <[email protected]>
commit ad572d174787daa59e24b8b5c83028c09cdb5ddb upstream.
similar to bpf_perf_event_output() the bpf_perf_event_read() helper needs to check the type of the perf_event before reading the counter.
--- kernel/trace/bpf_trace.c | 4 ++++ 1 file changed, 4 insertions(+)
kernel/trace/bpf_trace.c +4 -0
@@ -206,6 +206,10 @@ static u64 bpf_perf_event_read(u64 r1, u event->pmu->count)return -EINVAL ; +if (unlikely (event->attr.type !=PERF_TYPE_HARDWARE && + event->attr.type !=PERF_TYPE_RAW )) +return -EINVAL ; +/* * we don't know if the function is run successfully by the * return value. It can be judged in other places, such as
Greg Kroah-Hartman
maintainerPATCH 188/312 flow_dissector: Check for IP fragmentation even if not using IPv4 address
In reply to Greg Kroah-HartmanFrom: Alexander Duyck <[email protected]>
commit 918c023f29ab2dd8c63cfcc6a1239ee15933871a upstream.
This patch corrects the logic for the IPv4 parsing so that it is consistent with how we handle IPv6. Specifically if we do not have the flow key indicating we want the addresses we still may need to take a look at the IP fragmentation bits and to see if we should stop after we have recognized the L3 header.
--- net/core/flow_dissector.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
net/core/flow_dissector.c +9 -8
@@ -178,15 +178,16 @@ ip: ip_proto = iph->protocol; -if (!dissector_uses_key (flow_dissector, -FLOW_DISSECTOR_KEY_IPV4_ADDRS )) -break ; +if (dissector_uses_key (flow_dissector, +FLOW_DISSECTOR_KEY_IPV4_ADDRS )) { + key_addrs =skb_flow_dissector_target (flow_dissector, +FLOW_DISSECTOR_KEY_IPV4_ADDRS , + target_container); - key_addrs =skb_flow_dissector_target (flow_dissector, -FLOW_DISSECTOR_KEY_IPV4_ADDRS , target_container); -memcpy (&key_addrs->v4addrs, &iph->saddr, -sizeof (key_addrs->v4addrs)); - key_control->addr_type =FLOW_DISSECTOR_KEY_IPV4_ADDRS ; +memcpy (&key_addrs->v4addrs, &iph->saddr, +sizeof (key_addrs->v4addrs)); + key_control->addr_type =FLOW_DISSECTOR_KEY_IPV4_ADDRS ; + }if (ip_is_fragment (iph)) { key_control->flags |=FLOW_DIS_IS_FRAGMENT ;
Greg Kroah-Hartman
maintainerPATCH 202/312 clk: st: avoid uninitialized variable use
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
commit 2dd52d7f6f9d9d03a82a68040ac3d221dd79af94 upstream.
quadfs_pll_fs660c32_round_rate prints a few structure members that are never initialized, and also doesn't print the only one it cares about. We get a gcc warning about the ones that are printed:
clk/st/clkgen-fsyn.c:560:93: warning: 'params.sdiv' may be used uninitialized in this function clk/st/clkgen-fsyn.c:560:93: warning: 'params.mdiv' may be used uninitialized in this function clk/st/clkgen-fsyn.c:560:93: warning: 'params.pe' may be used uninitialized in this function clk/st/clkgen-fsyn.c:560:93: warning: 'params.nsdiv' may be used uninitialized in this function
This changes the code to no longer print uninitialized data, and for good measure it also prints the ndiv member that is being set.
--- drivers/clk/st/clkgen-fsyn.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/clk/st/clkgen-fsyn.c +9 -8
@@ -549,19 +549,20 @@ static int clk_fs660c32_vco_get_params(ureturn 0 ; } -static long quadfs_pll_fs660c32_round_rate (struct clk_hw *hw,unsigned long rate - ,unsigned long *prate) +static long quadfs_pll_fs660c32_round_rate (struct clk_hw *hw, +unsigned long rate, +unsigned long *prate) {struct stm_fs params; -if (!clk_fs660c32_vco_get_params (*prate, rate, ¶ms)) -clk_fs660c32_vco_get_rate (*prate, ¶ms, &rate); +if (clk_fs660c32_vco_get_params (*prate, rate, ¶ms)) +return rate; -pr_debug ("%s: %s new rate %ld [sdiv=0x%x,md=0x%x,pe=0x%x,nsdiv3=%u]\n" , +clk_fs660c32_vco_get_rate (*prate, ¶ms, &rate); + +pr_debug ("%s: %s new rate %ld [ndiv=%u]\n" , __func__,clk_hw_get_name (hw), - rate, (unsigned int )params.sdiv, - (unsigned int )params.mdiv, - (unsigned int )params.pe, (unsigned int )params.nsdiv); + rate, (unsigned int )params.ndiv);return rate; }
Greg Kroah-Hartman
maintainerPATCH 201/312 udp: restore UDPlite many-cast delivery
In reply to Greg Kroah-HartmanFrom: Pablo Neira <[email protected]>
commit 73e2d5e34b6cdd1080038daf3d6d6d744a9eefe6 upstream.
Honor udptable parameter that is passed to __udp*_lib_mcast_deliver(), otherwise udplite broadcast/multicast use the wrong table and it breaks.
--- net/ipv4/udp.c | 6 +++--- net/ipv6/udp.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
net/ipv4/udp.c +3 -3
@@ -1685,10 +1685,10 @@ static int __udp4_lib_mcast_deliver(struif (use_hash2) { hash2_any =udp4_portaddr_hash (net,htonl (INADDR_ANY ), hnum) & - udp_table.mask; - hash2 =udp4_portaddr_hash (net, daddr, hnum) & udp_table.mask; + udptable->mask; + hash2 =udp4_portaddr_hash (net, daddr, hnum) & udptable->mask; start_lookup: - hslot = &udp_table.hash2[hash2]; + hslot = &udptable->hash2[hash2]; offset = offsetof(typeof(*sk), __sk_common.skc_portaddr_node); }
net/ipv6/udp.c +3 -3
@@ -801,10 +801,10 @@ static int __udp6_lib_mcast_deliver(struif (use_hash2) { hash2_any =udp6_portaddr_hash (net, &in6addr_any, hnum) & - udp_table.mask; - hash2 =udp6_portaddr_hash (net, daddr, hnum) & udp_table.mask; + udptable->mask; + hash2 =udp6_portaddr_hash (net, daddr, hnum) & udptable->mask; start_lookup: - hslot = &udp_table.hash2[hash2]; + hslot = &udptable->hash2[hash2]; offset = offsetof(typeof(*sk), __sk_common.skc_portaddr_node); }
Greg Kroah-Hartman
maintainerPATCH 200/312 netfilter: nft_dup: do not use sreg_dev if the user doesnt specify it
In reply to Greg Kroah-HartmanFrom: Liping Zhang <[email protected]>
commit b73b8a1ba598236296a46103d81c10d629d9a470 upstream.
The NFTA_DUP_SREG_DEV attribute is not a must option, so we should use it in routing lookup only when the user specify it.
--- net/ipv4/netfilter/nft_dup_ipv4.c | 6 ++++-- net/ipv6/netfilter/nft_dup_ipv6.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-)
net/ipv4/netfilter/nft_dup_ipv4.c +4 -2
@@ -28,7 +28,7 @@ static void nft_dup_ipv4_eval(const strustruct in_addr gw = { .s_addr = (__force __be32 )regs->data[priv->sreg_addr], }; -int oif = regs->data[priv->sreg_dev]; +int oif = priv->sreg_dev ? regs->data[priv->sreg_dev] :-1 ;nf_dup_ipv4 (pkt->net, pkt->skb, pkt->hook, &gw, oif); }
@@ -59,7 +59,9 @@ static int nft_dup_ipv4_dump(struct sk_b {struct nft_dup_ipv4 *priv =nft_expr_priv (expr); -if (nft_dump_register (skb,NFTA_DUP_SREG_ADDR , priv->sreg_addr) || +if (nft_dump_register (skb,NFTA_DUP_SREG_ADDR , priv->sreg_addr)) + goto nla_put_failure; +if (priv->sreg_dev &&nft_dump_register (skb,NFTA_DUP_SREG_DEV , priv->sreg_dev)) goto nla_put_failure;
net/ipv6/netfilter/nft_dup_ipv6.c +4 -2
@@ -26,7 +26,7 @@ static void nft_dup_ipv6_eval(const stru {struct nft_dup_ipv6 *priv =nft_expr_priv (expr);struct in6_addr *gw = (struct in6_addr *)®s->data[priv->sreg_addr]; -int oif = regs->data[priv->sreg_dev]; +int oif = priv->sreg_dev ? regs->data[priv->sreg_dev] :-1 ;nf_dup_ipv6 (pkt->net, pkt->skb, pkt->hook, gw, oif); }
@@ -57,7 +57,9 @@ static int nft_dup_ipv6_dump(struct sk_b {struct nft_dup_ipv6 *priv =nft_expr_priv (expr); -if (nft_dump_register (skb,NFTA_DUP_SREG_ADDR , priv->sreg_addr) || +if (nft_dump_register (skb,NFTA_DUP_SREG_ADDR , priv->sreg_addr)) + goto nla_put_failure; +if (priv->sreg_dev &&nft_dump_register (skb,NFTA_DUP_SREG_DEV , priv->sreg_dev)) goto nla_put_failure;
Greg Kroah-Hartman
maintainerPATCH 152/312 net: phy: Avoid polling PHY with PHY_IGNORE_INTERRUPTS
In reply to Greg Kroah-HartmanFrom: Florian Fainelli <[email protected]>
commit d5c3d84657db57bd23ecd58b97f1c99dd42a7b80 upstream.
Commit 2c7b49212a86 ("phy: fix the use of PHY_IGNORE_INTERRUPT") changed a hunk in phy_state_machine() in the PHY_RUNNING case which was not needed. The change essentially makes the PHY library treat PHY devices with PHY_IGNORE_INTERRUPT to keep polling for the PHY device, even though the intent is not to do it.
Fix this by reverting that specific hunk, which makes the PHY state machine wait for state changes, and stay in the PHY_RUNNING state for as long as needed.
--- drivers/net/phy/phy.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
drivers/net/phy/phy.c +10 -5
@@ -912,10 +912,10 @@ void phy_state_machine(struct work_struc phydev->adjust_link (phydev->attached_dev);break ;case PHY_RUNNING : -/* Only register a CHANGE if we are polling or ignoring -* interrupts and link changed since latest checking. +/* Only register a CHANGE if we are polling and link changed +* since latest checking. */ -if (!phy_interrupt_is_valid (phydev)) { +if (phydev->irq ==PHY_POLL ) { old_link = phydev->link; err =phy_read_status (phydev);if (err)
@@ -1015,8 +1015,13 @@ void phy_state_machine(struct work_strucdev_dbg (&phydev->dev,"PHY state change %s -> %s\n" ,phy_state_to_str (old_state),phy_state_to_str (phydev->state)); -queue_delayed_work (system_power_efficient_wq, &phydev->state_queue, -PHY_STATE_TIME *HZ ); +/* Only re-schedule a PHY state machine change if we are polling the +* PHY, if PHY_IGNORE_INTERRUPT is set, then we will be moving +* between states from phy_mac_interrupt() +*/ +if (phydev->irq ==PHY_POLL ) +queue_delayed_work (system_power_efficient_wq, &phydev->state_queue, +PHY_STATE_TIME *HZ ); }void phy_mac_interrupt (struct phy_device *phydev,int new_link)
Greg Kroah-Hartman
maintainerPATCH 150/312 sunrpc: Update RPCBIND_MAXNETIDLEN
In reply to Greg Kroah-HartmanFrom: Chuck Lever <[email protected]>
commit 4b9c7f9db9a003f5c342184dc4401c1b7f2efb39 upstream.
Commit 176e21ee2ec8 ("SUNRPC: Support for RPC over AF_LOCAL transports") added a 5-character netid, but did not bump RPCBIND_MAXNETIDLEN from 4 to 5.
--- include/linux/sunrpc/msg_prot.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/sunrpc/msg_prot.h +2 -2
@@ -158,9 +158,9 @@ typedef __be32 rpc_fraghdr;/* * Note that RFC 1833 does not put any size restrictions on the -* netid string, but all currently defined netid's fit in 4 bytes. +* netid string, but all currently defined netid's fit in 5 bytes. */ -#define RPCBIND_MAXNETIDLEN (4u) +#define RPCBIND_MAXNETIDLEN (5u)/* * Universal addresses are introduced in RFC 1833 and further spelled
Greg Kroah-Hartman
maintainerPATCH 148/312 powerpc/book3s: Fix MCE console messages for unrecoverable MCE.
In reply to Greg Kroah-HartmanFrom: Mahesh Salgaonkar <[email protected]>
commit c74dd88e77d3ecbc9e55c78796d82c9aa21cabad upstream.
When machine check occurs with MSR(RI=0), it means MC interrupt is unrecoverable and kernel goes down to panic path. But the console message still shows it as recovered. This patch fixes the MCE console messages.
--- arch/powerpc/kernel/mce.c | 3 ++- arch/powerpc/platforms/powernv/opal.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)
arch/powerpc/kernel/mce.c +2 -1
@@ -92,7 +92,8 @@ void save_mce_event(struct pt_regs *regs mce->in_use =1 ; mce->initiator =MCE_INITIATOR_CPU ; -if (handled) +/* Mark it recovered if we have handled it and MSR(RI=1). */ +if (handled && (regs->msr &MSR_RI )) mce->disposition =MCE_DISPOSITION_RECOVERED ;else mce->disposition =MCE_DISPOSITION_NOT_RECOVERED ;
arch/powerpc/platforms/powernv/opal.c +1 -0
@@ -401,6 +401,7 @@ static int opal_recover_mce(struct pt_reif (!(regs->msr &MSR_RI )) {/* If MSR_RI isn't set, we cannot recover */ +pr_err ("Machine check interrupt unrecoverable: MSR(RI=0)\n" ); recovered =0 ; }else if (evt->disposition ==MCE_DISPOSITION_RECOVERED ) {/* Platform corrected itself */
Greg Kroah-Hartman
maintainerPATCH 185/312 pinctrl: bcm2835: Fix memory leak in error path
In reply to Greg Kroah-HartmanFrom: Stefan Wahren <[email protected]>
commit 53653c6b91750debba6dc4503003c851257fd340 upstream.
In case of an invalid pin value bcm2835_pctl_dt_node_to_map() would leak the pull configs of already assigned pins. So avoid this by calling the free map function in error case.
--- drivers/pinctrl/bcm/pinctrl-bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/bcm/pinctrl-bcm2835.c +1 -1
@@ -795,7 +795,7 @@ static int bcm2835_pctl_dt_node_to_map(sreturn 0 ; out: -kfree (maps); +bcm2835_pctl_dt_free_map (pctldev, maps, num_pins * maps_per_pin);return err; }
Greg Kroah-Hartman
maintainerPATCH 182/312 qlcnic: use the correct ring in qlcnic_83xx_process_rcv_ring_diag()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit 5b4d10f5e0369ed79434593b7cd8e85eebbe473f upstream.
There is a static checker warning here "warn: mask and shift to zero" and the code sets "ring" to zero every time. From looking at how QLCNIC_FETCH_RING_ID() is used in qlcnic_83xx_process_rcv_ring() the qlcnic_83xx_hndl() should be removed.
--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c +1 -1
@@ -2220,7 +2220,7 @@ void qlcnic_83xx_process_rcv_ring_diag(sif (!opcode)return ; - ring =QLCNIC_FETCH_RING_ID (qlcnic_83xx_hndl (sts_data[0 ])); + ring =QLCNIC_FETCH_RING_ID (sts_data[0 ]);qlcnic_83xx_process_rcv_diag (adapter, ring, sts_data); desc = &sds_ring->desc_head[consumer]; desc->status_desc_data[0 ] =cpu_to_le64 (STATUS_OWNER_PHANTOM );
Greg Kroah-Hartman
maintainerPATCH 181/312 qlcnic: potential NULL dereference in qlcnic_83xx_get_minidump_template()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit 5f46feab87bb105d6a217d966b327fdc56696802 upstream.
If qlcnic_fw_cmd_get_minidump_temp() fails then "fw_dump->tmpl_hdr" is NULL or possibly freed. It can lead to an oops later.
--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c +6 -2
@@ -1419,6 +1419,7 @@ void qlcnic_83xx_get_minidump_template(sstruct qlcnic_fw_dump *fw_dump = &ahw->fw_dump;struct pci_dev *pdev = adapter->pdev;bool extended = false; +int ret; prev_version = adapter->fw_version; current_version =qlcnic_83xx_get_fw_version (adapter);
@@ -1429,8 +1430,11 @@ void qlcnic_83xx_get_minidump_template(sif (qlcnic_83xx_md_check_extended_dump_capability (adapter)) extended = !qlcnic_83xx_extend_md_capab (adapter); -if (!qlcnic_fw_cmd_get_minidump_temp (adapter)) -dev_info (&pdev->dev,"Supports FW dump capability\n" ); + ret =qlcnic_fw_cmd_get_minidump_temp (adapter); +if (ret) +return ; + +dev_info (&pdev->dev,"Supports FW dump capability\n" );/* Once we have minidump template with extended iSCSI dump * capability, update the minidump capture mask to 0x1f as
Greg Kroah-Hartman
maintainerPATCH 179/312 i40e: fix an uninitialized variable bug
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit 1c306f7f62a38ee5f05f0ee994dfe82d654cf47c upstream.
We removed this initialization but it is required. Let's put it back.
--- drivers/net/ethernet/intel/i40e/i40e_hmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_hmc.c +1 -1
@@ -49,7 +49,7 @@ i40e_status i40e_add_sd_table_entry(strustruct i40e_hmc_sd_entry *sd_entry;bool dma_mem_alloc_done = false;struct i40e_dma_mem mem; -i40e_status ret_code; +i40e_status ret_code =I40E_SUCCESS ;u64 alloc_len;if (NULL == hmc_info->sd_table.sd_entry) {
Greg Kroah-Hartman
maintainerPATCH 175/312 net: moxa: fix an error code
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit 1d3cd1773fddfdc9ffb0c2dec9a954c7a54bc207 upstream.
We accidentally return IS_ERR(priv->base) which is 1 instead of PTR_ERR(priv->base) which is the error code.
--- drivers/net/ethernet/moxa/moxart_ether.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/moxa/moxart_ether.c +2 -2
@@ -460,9 +460,9 @@ static int moxart_mac_probe(struct platf res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); ndev->base_addr = res->start; priv->base =devm_ioremap_resource (p_dev, res); - ret =IS_ERR (priv->base); -if (ret) { +if (IS_ERR (priv->base)) {dev_err (p_dev,"devm_ioremap_resource failed\n" ); + ret =PTR_ERR (priv->base); goto init_fail; }
Greg Kroah-Hartman
maintainerPATCH 170/312 lirc_imon: do not leave imon_probe() with mutex held
In reply to Greg Kroah-HartmanFrom: Alexey Khoroshilov <[email protected]>
commit b833d0df943d70682e288c38c96b8e7bfff4023a upstream.
Commit af8a819a2513 ("[media] lirc_imon: simplify error handling code") lost mutex_unlock(&context->ctx_lock), so imon_probe() exits with the context->ctx_lock mutex acquired.
The patch adds mutex_unlock(&context->ctx_lock) back.
Found by Linux Driver Verification project (linuxtesting.org).
--- drivers/staging/media/lirc/lirc_imon.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/media/lirc/lirc_imon.c +2 -0
@@ -885,12 +885,14 @@ static int imon_probe(struct usb_interfa vendor, product, ifnum, usbdev->bus->busnum, usbdev->devnum);/* Everything went fine. Just unlock and return retval (with is 0) */ +mutex_unlock (&context->ctx_lock); goto driver_unlock; unregister_lirc:lirc_unregister_driver (driver->minor); free_tx_urb: +mutex_unlock (&context->ctx_lock);usb_free_urb (tx_urb); free_rx_urb:
Greg Kroah-Hartman
maintainerPATCH 167/312 net: bcmgenet: suppress warnings on failed Rx SKB allocations
In reply to Greg Kroah-HartmanFrom: Doug Berger <[email protected]>
[ Upstream commit ecaeceb8a8a145d93c7e136f170238229165348f ]
The driver is designed to drop Rx packets and reclaim the buffers when an allocation fails, and the network interface needs to safely handle this packet loss. Therefore, an allocation failure of Rx SKBs is relatively benign.
However, the output of the warning message occurs with a high scheduling priority that can cause excessive jitter/latency for other high priority processing.
This commit suppresses the warning messages to prevent scheduling problems while retaining the failure count in the statistics of the network interface.
--- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/genet/bcmgenet.c +2 -1
@@ -1575,7 +1575,8 @@ static struct sk_buff *bcmgenet_rx_refill(struct bcmgenet_priv *priv,dma_addr_t mapping;/* Allocate a new Rx skb */ - skb =netdev_alloc_skb (priv->dev, priv->rx_buf_len +SKB_ALIGNMENT ); + skb =__netdev_alloc_skb (priv->dev, priv->rx_buf_len +SKB_ALIGNMENT , +GFP_ATOMIC | __GFP_NOWARN);if (!skb) { priv->mib.alloc_rx_buff_failed++; netif_err(priv, rx_err, priv->dev,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 168/312 net: systemport: suppress warnings on failed Rx SKB allocations
In reply to Greg Kroah-HartmanFrom: Doug Berger <[email protected]>
[ Upstream commit 3554e54a46125030c534820c297ed7f6c3907e24 ]
The driver is designed to drop Rx packets and reclaim the buffers when an allocation fails, and the network interface needs to safely handle this packet loss. Therefore, an allocation failure of Rx SKBs is relatively benign.
However, the output of the warning message occurs with a high scheduling priority that can cause excessive jitter/latency for other high priority processing.
This commit suppresses the warning messages to prevent scheduling problems while retaining the failure count in the statistics of the network interface.
--- drivers/net/ethernet/broadcom/bcmsysport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bcmsysport.c +2 -1
@@ -526,7 +526,8 @@ static struct sk_buff *bcm_sysport_rx_refill(struct bcm_sysport_priv *priv,dma_addr_t mapping;/* Allocate a new SKB for a new packet */ - skb =netdev_alloc_skb (priv->netdev,RX_BUF_LENGTH ); + skb =__netdev_alloc_skb (priv->netdev,RX_BUF_LENGTH , +GFP_ATOMIC | __GFP_NOWARN);if (!skb) { priv->mib.alloc_rx_buff_failed++;netif_err (priv, rx_err, ndev,"SKB alloc failed\n" );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 166/312 lib/mpi: Fix building for powerpc with clang
In reply to Greg Kroah-HartmanFrom: Nathan Chancellor <[email protected]>
[ Upstream commit 5990cdee689c6885b27c6d969a3d58b09002b0bc ]
0day reports over and over on an powerpc randconfig with clang:
lib/mpi/generic_mpih-mul1.c:37:13: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions
Remove the superfluous casts, which have been done previously for x86 and arm32 in commit dea632cadd12 ("lib/mpi: fix build with clang") and commit 7b7c1df2883d ("lib/mpi/longlong.h: fix building with 32-bit x86").
--- lib/mpi/longlong.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-)
lib/mpi/longlong.h +17 -17
@@ -756,22 +756,22 @@ do { \ do { \ if (__builtin_constant_p(bh) && (bh) == 0) \ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \ - : "=r" ((USItype)(sh)), \ - "=&r" ((USItype)(sl)) \ + : "=r" (sh), \ + "=&r" (sl) \ : "%r" ((USItype)(ah)), \ "%r" ((USItype)(al)), \ "rI" ((USItype)(bl))); \ else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \ - : "=r" ((USItype)(sh)), \ - "=&r" ((USItype)(sl)) \ + : "=r" (sh), \ + "=&r" (sl) \ : "%r" ((USItype)(ah)), \ "%r" ((USItype)(al)), \ "rI" ((USItype)(bl))); \ else \ __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \ - : "=r" ((USItype)(sh)), \ - "=&r" ((USItype)(sl)) \ + : "=r" (sh), \ + "=&r" (sl) \ : "%r" ((USItype)(ah)), \ "r" ((USItype)(bh)), \ "%r" ((USItype)(al)), \
@@ -781,36 +781,36 @@ do { \ do { \ if (__builtin_constant_p(ah) && (ah) == 0) \ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \ - : "=r" ((USItype)(sh)), \ - "=&r" ((USItype)(sl)) \ + : "=r" (sh), \ + "=&r" (sl) \ : "r" ((USItype)(bh)), \ "rI" ((USItype)(al)), \ "r" ((USItype)(bl))); \ else if (__builtin_constant_p(ah) && (ah) == ~(USItype) 0) \ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \ - : "=r" ((USItype)(sh)), \ - "=&r" ((USItype)(sl)) \ + : "=r" (sh), \ + "=&r" (sl) \ : "r" ((USItype)(bh)), \ "rI" ((USItype)(al)), \ "r" ((USItype)(bl))); \ else if (__builtin_constant_p(bh) && (bh) == 0) \ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \ - : "=r" ((USItype)(sh)), \ - "=&r" ((USItype)(sl)) \ + : "=r" (sh), \ + "=&r" (sl) \ : "r" ((USItype)(ah)), \ "rI" ((USItype)(al)), \ "r" ((USItype)(bl))); \ else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \ - : "=r" ((USItype)(sh)), \ - "=&r" ((USItype)(sl)) \ + : "=r" (sh), \ + "=&r" (sl) \ : "r" ((USItype)(ah)), \ "rI" ((USItype)(al)), \ "r" ((USItype)(bl))); \ else \ __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \ - : "=r" ((USItype)(sh)), \ - "=&r" ((USItype)(sl)) \ + : "=r" (sh), \ + "=&r" (sl) \ : "r" ((USItype)(ah)), \ "r" ((USItype)(bh)), \ "rI" ((USItype)(al)), \
@@ -821,7 +821,7 @@ do { \ do { \ USItype __m0 = (m0), __m1 = (m1); \ __asm__ ("mulhwu %0,%1,%2" \ - : "=r" ((USItype) ph) \ + : "=r" (ph) \ : "%r" (__m0), \ "r" (__m1)); \ (pl) = __m0 * __m1; \
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 158/312 drivers: net: cpsw: dont ignore phy-mode if phy-handle is used
In reply to Greg Kroah-HartmanFrom: David Rivshin <[email protected]>
commit ae092b5bded24d5dc7dae0e0aef4669c169ce874 upstream.
The phy-mode emac property was only being processed in the phy_id or fixed-link cases. However if phy-handle was specified instead, an error message would complain about the lack of phy_id or fixed-link, and then jump past the of_get_phy_mode(). This would result in the PHY mode defaulting to MII, regardless of what the devicetree specified.
--- drivers/net/ethernet/ti/cpsw.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/net/ethernet/ti/cpsw.c +8 -2
@@ -2060,7 +2060,11 @@ static int cpsw_probe_dt(struct cpsw_pla slave_data->phy_node =of_parse_phandle (slave_node,"phy-handle" ,0 ); parp =of_get_property (slave_node,"phy_id" , &lenp); -if (of_phy_is_fixed_link (slave_node)) { +if (slave_data->phy_node) { +dev_dbg (&pdev->dev, +"slave[%d] using phy-handle=\"%s\"\n" , + i, slave_data->phy_node->full_name); + }else if (of_phy_is_fixed_link (slave_node)) {struct device_node *phy_node;struct phy_device *phy_dev;
@@ -2097,7 +2101,9 @@ static int cpsw_probe_dt(struct cpsw_pla PHY_ID_FMT, mdio->name, phyid);put_device (&mdio->dev); }else { -dev_err (&pdev->dev,"No slave[%d] phy_id or fixed-link property\n" , i); +dev_err (&pdev->dev, +"No slave[%d] phy_id, phy-handle, or fixed-link property\n" , + i); goto no_phy_slave; } slave_data->phy_if =of_get_phy_mode (slave_node);
Greg Kroah-Hartman
maintainerPATCH 162/312 selftests/ipc: Fix test failure seen after initial test run
In reply to Greg Kroah-HartmanFrom: Tyler Hicks <[email protected]>
[ Upstream commit b87080eab4c1377706c113fc9c0157f19ea8fed1 ]
After successfully running the IPC msgque test once, subsequent runs result in a test failure:
$ sudo ./run_kselftest.sh TAP version 13 1..1 # selftests: ipc: msgque # Failed to get stats for IPC queue with id 0 # Failed to dump queue: -22 # Bail out! # # Pass 0 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0 not ok 1 selftests: ipc: msgque # exit=1
The dump_queue() function loops through the possible message queue index values using calls to msgctl(kern_id, MSG_STAT, ...) where kern_id represents the index value. The first time the test is ran, the initial index value of 0 is valid and the test is able to complete. The index value of 0 is not valid in subsequent test runs and the loop attempts to try index values of 1, 2, 3, and so on until a valid index value is found that corresponds to the message queue created earlier in the test.
The msgctl() syscall returns -1 and sets errno to EINVAL when invalid index values are used. The test failure is caused by incorrectly comparing errno to -EINVAL when cycling through possible index values.
Fix invalid test failures on subsequent runs of the msgque test by correctly comparing errno values to a non-negated EINVAL.
--- tools/testing/selftests/ipc/msgque.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/ipc/msgque.c +1 -1
@@ -135,7 +135,7 @@ int dump_queue(struct msgque_data *msgque)for (kern_id =0 ; kern_id <256 ; kern_id++) { ret =msgctl (kern_id,MSG_STAT , &ds);if (ret <0 ) { -if (errno == -EINVAL ) +if (errno ==EINVAL )continue ;printf ("Failed to get stats for IPC queue with id %d\n" , kern_id);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 160/312 mdio-sun4i: oops in error handling in probe
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit 227f33beab746aeec4ef3305bd17b1d374df09e7 upstream.
We could end up dereferencing an error pointer when we call regulator_disable().
--- drivers/net/phy/mdio-sun4i.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/phy/mdio-sun4i.c +3 -1
@@ -134,6 +134,7 @@ static int sun4i_mdio_probe(struct platf }dev_info (&pdev->dev,"no regulator found\n" ); + data->regulator =NULL ; }else { ret =regulator_enable (data->regulator);if (ret)
@@ -149,7 +150,8 @@ static int sun4i_mdio_probe(struct platfreturn 0 ; err_out_disable_regulator: -regulator_disable (data->regulator); +if (data->regulator) +regulator_disable (data->regulator); err_out_free_mdiobus:mdiobus_free (bus);return ret;
Greg Kroah-Hartman
maintainerPATCH 157/312 net: dsa: slave: fix of-node leak and phy priority
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 0d8f3c67151faaa80e332c254372dca58fb2a9d4 upstream.
Make sure to drop the reference taken by of_parse_phandle() before returning from dsa_slave_phy_setup().
Note that this also modifies the PHY priority so that any fixed-link node is only parsed when no phy-handle is given, which is in accordance with the common scheme for this.
--- net/dsa/slave.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
net/dsa/slave.c +5 -2
@@ -1031,7 +1031,7 @@ static int dsa_slave_phy_setup(struct ds p->phy_interface = mode; phy_dn =of_parse_phandle (port_dn,"phy-handle" ,0 ); -if (of_phy_is_fixed_link (port_dn)) { +if (!phy_dn &&of_phy_is_fixed_link (port_dn)) {/* In the case of a fixed PHY, the DT node associated * to the fixed PHY is the Port DT node */
@@ -1041,7 +1041,7 @@ static int dsa_slave_phy_setup(struct dsreturn ret; } phy_is_fixed = true; - phy_dn = port_dn; + phy_dn =of_node_get (port_dn); }if (ds->drv->get_phy_flags)
@@ -1060,6 +1060,7 @@ static int dsa_slave_phy_setup(struct ds ret =dsa_slave_phy_connect (p, slave_dev, phy_id);if (ret) {netdev_err (slave_dev,"failed to connect to phy%d: %d\n" , phy_id, ret); +of_node_put (phy_dn);return ret; } }else {
@@ -1068,6 +1069,8 @@ static int dsa_slave_phy_setup(struct ds phy_flags, p->phy_interface); } + +of_node_put (phy_dn); }if (p->phy && phy_is_fixed)
Greg Kroah-Hartman
maintainerPATCH 154/312 net: phy: bcm7xxx: Fix shadow mode 2 disabling
In reply to Greg Kroah-HartmanFrom: Florian Fainelli <[email protected]>
commit 50d899808d33a5b0aa82be23e824119944042689 upstream.
The clear and set masks in the call to phy_set_clr_bits() called from bcm7xxx_config_init() are inverted. We need to fix this by swapping the two arguments, that is, set 0 bits, but clear the shade mode 2 enable bit.
--- drivers/net/phy/bcm7xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/bcm7xxx.c +1 -1
@@ -270,7 +270,7 @@ static int bcm7xxx_config_init(struct phphy_write (phydev,MII_BCM7XXX_100TX_FALSE_CAR ,0x7555 );/* reset shadow mode 2 */ - ret =phy_set_clr_bits (phydev,MII_BCM7XXX_TEST ,MII_BCM7XXX_SHD_MODE_2 ,0 ); + ret =phy_set_clr_bits (phydev,MII_BCM7XXX_TEST ,0 ,MII_BCM7XXX_SHD_MODE_2 );if (ret <0 )return ret;
Greg Kroah-Hartman
maintainerPATCH 102/312 xprtrdma: xprt_rdma_free() must not release backchannel reqs
In reply to Greg Kroah-HartmanFrom: Chuck Lever <[email protected]>
commit ffc4d9b1596c34caa98962722e930e97912c8a9f upstream.
Preserve any rpcrdma_req that is attached to rpc_rqst's allocated for the backchannel. Otherwise, after all the pre-allocated backchannel req's are consumed, incoming backward calls start writing on freed memory.
Somehow this hunk got lost.
--- net/sunrpc/xprtrdma/transport.c | 3 +++ 1 file changed, 3 insertions(+)
net/sunrpc/xprtrdma/transport.c +3 -0
@@ -576,6 +576,9 @@ xprt_rdma_free(void *buffer) rb = container_of(buffer, struct rpcrdma_regbuf, rg_base[0]); req = rb->rg_owner; +if (req->rl_backchannel) +return ; + r_xprt = container_of(req->rl_buffer, struct rpcrdma_xprt, rx_buf);dprintk ("RPC: %s: called on 0x%p\n" , __func__, req->rl_reply);
Greg Kroah-Hartman
maintainerPATCH 110/312 net: tcp_memcontrol: properly detect ancestor socket pressure
In reply to Greg Kroah-HartmanFrom: Johannes Weiner <[email protected]>
commit 8c2c2358b236530bc2c79b4c2a447cbdbc3d96d7 upstream.
When charging socket memory, the code currently checks only the local page counter for excess to determine whether the memcg is under socket pressure. But even if the local counter is fine, one of the ancestors could have breached its limit, which should also force this child to enter socket pressure. This currently doesn't happen.
Fix this by using page_counter_try_charge() first. If that fails, it means that either the local counter or one of the ancestors are in excess of their limit, and the child should enter socket pressure.
--- include/net/sock.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
include/net/sock.h +6 -4
@@ -1204,11 +1204,13 @@ static inline void memcg_memory_allocateunsigned long amt, int *parent_status) { - page_counter_charge(&prot->memory_allocated, amt); + struct page_counter *counter; + +if (page_counter_try_charge (&prot->memory_allocated, amt, &counter)) +return ; -if (page_counter_read (&prot->memory_allocated) > - prot->memory_allocated.limit) - *parent_status =OVER_LIMIT ; +page_counter_charge (&prot->memory_allocated, amt); + *parent_status =OVER_LIMIT ; } static inline void memcg_memory_allocated_sub(struct cg_proto *prot,
Greg Kroah-Hartman
maintainerPATCH 138/312 mmc: sdhci: restore behavior when setting VDD via external regulator
In reply to Greg Kroah-HartmanFrom: Jisheng Zhang <[email protected]>
commit 918f4cbd4340ddd1eb389cd8efa3b07ac74ec4c0 upstream.
After commit 52221610dd84 ("mmc: sdhci: Improve external VDD regulator support"), for the VDD is supplied via external regulators, we ignore the code to convert a VDD voltage request into one of the standard SDHCI voltage levels, then program it in the SDHCI_POWER_CONTROL. This brings two issues:
1. SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON quirk isn't handled properly any more.
2. What's more, once SDHCI_POWER_ON bit is set, some controllers such as the sdhci-pxav3 used in marvell berlin SoCs require the voltage levels programming in the SDHCI_POWER_CONTROL register, even the VDD is supplied by external regulator. So the host in marvell berlin SoCs still works fine after the commit. However, commit 3cbc6123a93d ("mmc:
sdhci: Set SDHCI_POWER_ON with external vmmc") sets the SDHCI_POWER_ON bit, this would make the host in marvell berlin SoCs won't work any more with external vmmc.
This patch restores the behavior when setting VDD through external regulator by moving the call of mmc_regulator_set_ocr() to the end of sdhci_set_power() function.
After this patch, the sdcard on Marvell Berlin SoC boards work again.
--- drivers/mmc/host/sdhci.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-)
drivers/mmc/host/sdhci.c +6 -13
@@ -1290,19 +1290,6 @@ static void sdhci_set_power(struct sdhcistruct mmc_host *mmc = host->mmc;u8 pwr =0 ; -if (!IS_ERR (mmc->supply.vmmc)) { -spin_unlock_irq (&host->lock); -mmc_regulator_set_ocr (mmc, mmc->supply.vmmc, vdd); -spin_lock_irq (&host->lock); - -if (mode !=MMC_POWER_OFF ) -sdhci_writeb (host,SDHCI_POWER_ON ,SDHCI_POWER_CONTROL ); -else -sdhci_writeb (host,0 ,SDHCI_POWER_CONTROL ); - -return ; - } -if (mode !=MMC_POWER_OFF ) {switch (1 << vdd) {case MMC_VDD_165_195 :
@@ -1363,6 +1350,12 @@ static void sdhci_set_power(struct sdhciif (host->quirks &SDHCI_QUIRK_DELAY_AFTER_POWER )mdelay (10 ); } + +if (!IS_ERR (mmc->supply.vmmc)) { +spin_unlock_irq (&host->lock); +mmc_regulator_set_ocr (mmc, mmc->supply.vmmc, vdd); +spin_lock_irq (&host->lock); + } }/*****************************************************************************\
Greg Kroah-Hartman
maintainerPATCH 140/312 mmc: debugfs: correct wrong voltage value
In reply to Greg Kroah-HartmanFrom: Chuanxiao Dong <[email protected]>
commit 0036e74686344f1051afc3107740140abfd03616 upstream.
Correct the wrong voltage value shown in debugfs for mmc/sd/sdio.
--- drivers/mmc/core/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/debugfs.c +1 -1
@@ -170,7 +170,7 @@ static int mmc_ios_show(struct seq_file str ="invalid" ;break ; } -seq_printf (s,"signal voltage:\t%u (%s)\n" , ios->chip_select, str); +seq_printf (s,"signal voltage:\t%u (%s)\n" , ios->signal_voltage, str);switch (ios->drv_type) {case MMC_SET_DRIVER_TYPE_A :
Greg Kroah-Hartman
maintainerPATCH 136/312 ASoC: fsl_ssi: mark SACNT register volatile
In reply to Greg Kroah-HartmanFrom: Maciej S. Szmigiero <[email protected]>
commit 3f1c241f0f5f90046258e6b8d4aeb6463ffdc08e upstream.
SACNT register should be marked volatile since
its WR and RD bits are cleared by SSI after
completing the relevant operation.
This unbreaks AC'97 register access.
--- sound/soc/fsl/fsl_ssi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
sound/soc/fsl/fsl_ssi.c +7 -1
@@ -146,6 +146,7 @@ static bool fsl_ssi_volatile_reg(structcase CCSR_SSI_SRX1 :case CCSR_SSI_SISR :case CCSR_SSI_SFCSR : +case CCSR_SSI_SACNT :case CCSR_SSI_SACADD :case CCSR_SSI_SACDAT :case CCSR_SSI_SATAG :
@@ -239,8 +240,9 @@ struct fsl_ssi_private {unsigned int baudclk_streams;unsigned int bitclk_freq; -/*regcache for SFCSR*/ +/* regcache for volatile regs */ u32 regcache_sfcsr; +u32 regcache_sacnt;/* DMA params */ struct snd_dmaengine_dai_dma_data dma_params_tx;
@@ -1597,6 +1599,8 @@ static int fsl_ssi_suspend(struct deviceregmap_read (regs,CCSR_SSI_SFCSR , &ssi_private->regcache_sfcsr); +regmap_read (regs,CCSR_SSI_SACNT , + &ssi_private->regcache_sacnt);regcache_cache_only (regs, true);regcache_mark_dirty (regs);
@@ -1615,6 +1619,8 @@ static int fsl_ssi_resume(struct deviceCCSR_SSI_SFCSR_RFWM1_MASK |CCSR_SSI_SFCSR_TFWM1_MASK |CCSR_SSI_SFCSR_RFWM0_MASK |CCSR_SSI_SFCSR_TFWM0_MASK , ssi_private->regcache_sfcsr); +regmap_write (regs,CCSR_SSI_SACNT , + ssi_private->regcache_sacnt);return regcache_sync (regs); }
Greg Kroah-Hartman
maintainerPATCH 135/312 ASoC: tegra_alc5632: check return value
In reply to Greg Kroah-HartmanFrom: Sudip Mukherjee <[email protected]>
commit 319c32597fc22a58b946a6146f2be1fd208582e0 upstream.
We have been returning success even if snd_soc_card_jack_new() fails. Lets check the return value and return error if it fails.
--- sound/soc/tegra/tegra_alc5632.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
sound/soc/tegra/tegra_alc5632.c +8 -4
@@ -101,12 +101,16 @@ static const struct snd_kcontrol_new tegstatic int tegra_alc5632_asoc_init (struct snd_soc_pcm_runtime *rtd) { +int ret;struct tegra_alc5632 *machine =snd_soc_card_get_drvdata (rtd->card); -snd_soc_card_jack_new (rtd->card,"Headset Jack" ,SND_JACK_HEADSET , - &tegra_alc5632_hs_jack, - tegra_alc5632_hs_jack_pins, -ARRAY_SIZE (tegra_alc5632_hs_jack_pins)); + ret =snd_soc_card_jack_new (rtd->card,"Headset Jack" , +SND_JACK_HEADSET , + &tegra_alc5632_hs_jack, + tegra_alc5632_hs_jack_pins, +ARRAY_SIZE (tegra_alc5632_hs_jack_pins)); +if (ret) +return ret;if (gpio_is_valid (machine->gpio_hp_det)) { tegra_alc5632_hp_jack_gpio.gpio = machine->gpio_hp_det;
Greg Kroah-Hartman
maintainerPATCH 128/312 mac80211: TDLS: change BW calculation for WIDER_BW peers
In reply to Greg Kroah-HartmanFrom: Arik Nemtsov <[email protected]>
commit 59021c675995281d453eee45b3e2e1e3edbc0ec2 upstream.
The previous approach simply ignored chandef restrictions when calculating the appropriate peer BW for a WIDER_BW peer. This could result in a regulatory violation if both peers indicated 80MHz support, but the regdomain forbade it.
Change the approach to setting a WIDER_BW peer's BW. Don't exempt it from the chandef width at first. If during TDLS negotiation the chandef width is upgraded, update the peer's BW to match.
--- net/mac80211/ieee80211_i.h | 4 ++++ net/mac80211/tdls.c | 38 ++++++++++++++++++++++++++++++++------ net/mac80211/vht.c | 30 +++++++++++++++++++++++++----- 3 files changed, 61 insertions(+), 11 deletions(-)
net/mac80211/ieee80211_i.h +4 -0
@@ -1706,6 +1706,10 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(struenum ieee80211_sta_rx_bandwidth ieee80211_sta_cap_rx_bw (struct sta_info *sta);enum ieee80211_sta_rx_bandwidth ieee80211_sta_cur_vht_bw (struct sta_info *sta);void ieee80211_sta_set_rx_nss (struct sta_info *sta); +enum ieee80211_sta_rx_bandwidth +ieee80211_chan_width_to_rx_bw (enum nl80211_chan_width width); +enum nl80211_chan_width ieee80211_sta_cap_chan_bw (struct sta_info *sta); +void ieee80211_sta_set_rx_nss (struct sta_info *sta);u32 __ieee80211_vht_handle_opmode (struct ieee80211_sub_if_data *sdata,struct sta_info *sta,u8 opmode,enum ieee80211_band band);
net/mac80211/tdls.c +32 -6
@@ -4,7 +4,7 @@* Copyright 2006-2010 Johannes Berg <[email protected]> * Copyright 2014, Intel Corporation * Copyright 2014 Intel Mobile Communications GmbH -* Copyright 2015 Intel Deutschland GmbH +* Copyright 2015 - 2016 Intel Deutschland GmbH * * This file is GPLv2 as found in COPYING. */
@@ -15,6 +15,7 @@#include <linux/rtnetlink.h> #include "ieee80211_i.h" #include "driver-ops.h" +#include "rate.h" /* give usermode some time for retries in setting up the TDLS session */ #define TDLS_PEER_SETUP_TIMEOUT (15 * HZ)
@@ -302,7 +303,7 @@ ieee80211_tdls_chandef_vht_upgrade(struc/* IEEE802.11ac-2013 Table E-4 */ u16 centers_80mhz[] = {5210 ,5290 ,5530 ,5610 ,5690 ,5775 };struct cfg80211_chan_def uc = sta->tdls_chandef; -enum nl80211_chan_width max_width =ieee80211_get_sta_bw (&sta->sta); +enum nl80211_chan_width max_width =ieee80211_sta_cap_chan_bw (sta);int i;/* only support upgrading non-narrow channels up to 80Mhz */
@@ -1242,18 +1243,44 @@ int ieee80211_tdls_mgmt(struct wiphy *wireturn ret; } -static void iee80211_tdls_recalc_chanctx (struct ieee80211_sub_if_data *sdata) +static void iee80211_tdls_recalc_chanctx (struct ieee80211_sub_if_data *sdata, +struct sta_info *sta) {struct ieee80211_local *local = sdata->local;struct ieee80211_chanctx_conf *conf;struct ieee80211_chanctx *ctx; +enum nl80211_chan_width width; +struct ieee80211_supported_band *sband;mutex_lock (&local->chanctx_mtx); conf =rcu_dereference_protected (sdata->vif.chanctx_conf,lockdep_is_held (&local->chanctx_mtx));if (conf) { + width = conf->def.width; + sband = local->hw.wiphy->bands[conf->def.chan->band]; ctx = container_of(conf, struct ieee80211_chanctx, conf);ieee80211_recalc_chanctx_chantype (local, ctx); + +/* if width changed and a peer is given, update its BW */ +if (width != conf->def.width && sta && +test_sta_flag (sta,WLAN_STA_TDLS_WIDER_BW )) { +enum ieee80211_sta_rx_bandwidth bw; + + bw =ieee80211_chan_width_to_rx_bw (conf->def.width); + bw =min (bw,ieee80211_sta_cap_rx_bw (sta)); +if (bw != sta->sta.bandwidth) { + sta->sta.bandwidth = bw; +rate_control_rate_update (local, sband, sta, +IEEE80211_RC_BW_CHANGED ); +/* +* if a TDLS peer BW was updated, we need to +* recalc the chandef width again, to get the +* correct chanctx min_def +*/ +ieee80211_recalc_chanctx_chantype (local, ctx); + } + } + }mutex_unlock (&local->chanctx_mtx); }
@@ -1350,8 +1377,6 @@ int ieee80211_tdls_oper(struct wiphy *wibreak ; } -iee80211_tdls_recalc_chanctx (sdata); -mutex_lock (&local->sta_mtx); sta =sta_info_get (sdata, peer);if (!sta) {
@@ -1360,6 +1385,7 @@ int ieee80211_tdls_oper(struct wiphy *wibreak ; } +iee80211_tdls_recalc_chanctx (sdata, sta);iee80211_tdls_recalc_ht_protection (sdata, sta);set_sta_flag (sta,WLAN_STA_TDLS_PEER_AUTH );
@@ -1390,7 +1416,7 @@ int ieee80211_tdls_oper(struct wiphy *wiiee80211_tdls_recalc_ht_protection (sdata,NULL );mutex_unlock (&local->sta_mtx); -iee80211_tdls_recalc_chanctx (sdata); +iee80211_tdls_recalc_chanctx (sdata,NULL );break ;default : ret = -ENOTSUPP ;
net/mac80211/vht.c +25 -5
@@ -299,7 +299,30 @@ enum ieee80211_sta_rx_bandwidth ieee8021return IEEE80211_STA_RX_BW_80 ; } -static enum ieee80211_sta_rx_bandwidth +enum nl80211_chan_width ieee80211_sta_cap_chan_bw (struct sta_info *sta) +{ +struct ieee80211_sta_vht_cap *vht_cap = &sta->sta.vht_cap; +u32 cap_width; + +if (!vht_cap->vht_supported) { +if (!sta->sta.ht_cap.ht_supported) +return NL80211_CHAN_WIDTH_20_NOHT ; + +return sta->sta.ht_cap.cap &IEEE80211_HT_CAP_SUP_WIDTH_20_40 ? +NL80211_CHAN_WIDTH_40 :NL80211_CHAN_WIDTH_20 ; + } + + cap_width = vht_cap->cap &IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK ; + +if (cap_width ==IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ ) +return NL80211_CHAN_WIDTH_160 ; +else if (cap_width ==IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ ) +return NL80211_CHAN_WIDTH_80P80 ; + +return NL80211_CHAN_WIDTH_80 ; +} + +enum ieee80211_sta_rx_bandwidth ieee80211_chan_width_to_rx_bw (enum nl80211_chan_width width) {switch (width) {
@@ -327,10 +350,7 @@ enum ieee80211_sta_rx_bandwidth ieee8021 bw =ieee80211_sta_cap_rx_bw (sta); bw =min (bw, sta->cur_max_bandwidth); - -/* do not cap the BW of TDLS WIDER_BW peers by the bss */ -if (!test_sta_flag (sta,WLAN_STA_TDLS_WIDER_BW )) - bw =min (bw,ieee80211_chan_width_to_rx_bw (bss_width)); + bw =min (bw,ieee80211_chan_width_to_rx_bw (bss_width));return bw; }
Greg Kroah-Hartman
maintainerPATCH 105/312 mlxsw: spectrum: Dont forward packets when STP state is DISABLED
In reply to Greg Kroah-HartmanFrom: Ido Schimmel <[email protected]>
commit 9cb026ebb8ab76829a8d8e4bbd057168ac38fb86 upstream.
When STP state is set to DISABLED the port is assumed to be inactive, but currently we forward packets ingressing through it.
Instead, set the port's STP state in hardware to DISCARDING, which means it doesn't forward packets or perform any learning, but it does trap control packets. However, these packets will be dropped by bridge code, which results in the expected behavior.
--- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +1 -1
@@ -87,7 +87,6 @@ static int mlxsw_sp_port_stp_state_set(sint err;switch (state) { -case BR_STATE_DISABLED :/* fall-through */ case BR_STATE_FORWARDING : spms_state =MLXSW_REG_SPMS_STATE_FORWARDING ;break ;
@@ -95,6 +94,7 @@ static int mlxsw_sp_port_stp_state_set(scase BR_STATE_LEARNING : spms_state =MLXSW_REG_SPMS_STATE_LEARNING ;break ; +case BR_STATE_DISABLED :/* fall-through */ case BR_STATE_BLOCKING : spms_state =MLXSW_REG_SPMS_STATE_DISCARDING ;break ;
Greg Kroah-Hartman
maintainerPATCH 129/312 mac80211: Fix BW upgrade for TDLS peers
In reply to Greg Kroah-HartmanFrom: Ilan Peer <[email protected]>
commit 4b559ec0bfc3a9f41a127cea6964f38b2b4bb323 upstream.
It is possible that the station is connected to an AP with bandwidth of 80+80MHz or 160MHz. In such cases there is no need to perform an upgrade as the maximal supported bandwidth is 80MHz.
In addition, when upgrading and setting center_freq1 and bandwidth to 80MHz also set center_freq2 to 0.
--- net/mac80211/tdls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/mac80211/tdls.c +2 -1
@@ -314,7 +314,7 @@ ieee80211_tdls_chandef_vht_upgrade(strucif (max_width >NL80211_CHAN_WIDTH_80 ) max_width =NL80211_CHAN_WIDTH_80 ; -if (uc.width == max_width) +if (uc.width >= max_width)return ;/* * Channel usage constrains in the IEEE802.11ac-2013 specification only
@@ -325,6 +325,7 @@ ieee80211_tdls_chandef_vht_upgrade(strucfor (i =0 ; i <ARRAY_SIZE (centers_80mhz); i++)if (abs (uc.chan->center_freq - centers_80mhz[i]) <=30 ) { uc.center_freq1 = centers_80mhz[i]; + uc.center_freq2 =0 ; uc.width =NL80211_CHAN_WIDTH_80 ;break ; }
Greg Kroah-Hartman
maintainerPATCH 121/312 Input: gpio-keys - fix check for disabling unsupported keys
In reply to Greg Kroah-HartmanFrom: Dmitry Torokhov <[email protected]>
commit 8679ee4204cfd5cf78b996508ccadc1ec6130f1a upstream.
Commit 4ea14a53d8f881034fa9e186653821c4e3d9a8fb ("Input: gpio-keys - report error when disabling unsupported key") tried let user know that they attempted to disable an unsupported key, unfortunately the check is wrong as it believes that all codes are invalid. Fix it by ensuring that keys that we try to disable are subset of keys (or switches) that device reports.
--- drivers/input/keyboard/gpio_keys.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-)
drivers/input/keyboard/gpio_keys.c +23 -6
@@ -96,7 +96,7 @@ struct gpio_keys_drvdata {* Return value of this function can be used to allocate bitmap * large enough to hold all bits for given type. */ -static inline int get_n_events_by_type (int type) +static int get_n_events_by_type (int type) {BUG_ON (type !=EV_SW && type !=EV_KEY );
@@ -104,6 +104,22 @@ static inline int get_n_events_by_type(i }/** +* get_bm_events_by_type() - returns bitmap of supported events per @type +* @input: input device from which bitmap is retrieved +* @type: type of button (%EV_KEY, %EV_SW) +* +* Return value of this function can be used to allocate bitmap +* large enough to hold all bits for given type. +*/ +static const unsigned long *get_bm_events_by_type (struct input_dev *dev, +int type) +{ +BUG_ON (type !=EV_SW && type !=EV_KEY ); + +return (type ==EV_KEY ) ? dev->keybit : dev->swbit; +} + +/** * gpio_keys_disable_button() - disables given GPIO button * @bdata: button data for button to be disabled *
@@ -213,6 +229,7 @@ static ssize_t gpio_keys_attr_store_help const char *buf, unsigned int type) { int n_events = get_n_events_by_type(type); +const unsigned long *bitmap =get_bm_events_by_type (ddata->input, type);unsigned long *bits;ssize_t error;int i;
@@ -226,6 +243,11 @@ static ssize_t gpio_keys_attr_store_help goto out;/* First validate */ +if (!bitmap_subset (bits, bitmap, n_events)) { + error = -EINVAL ; + goto out; + } +for (i =0 ; i < ddata->pdata->nbuttons; i++) {struct gpio_button_data *bdata = &ddata->data[i];
@@ -239,11 +261,6 @@ static ssize_t gpio_keys_attr_store_help } } -if (i == ddata->pdata->nbuttons) { - error = -EINVAL ; - goto out; - } -mutex_lock (&ddata->disable_lock);for (i =0 ; i < ddata->pdata->nbuttons; i++) {
Greg Kroah-Hartman
maintainerPATCH 126/312 mac80211: fix mgmt-tx abort cookie and leak
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
commit e673a65952b4ab045a3e3eb200fdf408004fb4fd upstream.
If a mgmt-tx operation is aborted before it runs, the wrong cookie is reported back to userspace, and the ack_skb gets leaked since the frame is freed directly instead of freeing it using ieee80211_free_txskb(). Fix that.
--- net/mac80211/offchannel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
net/mac80211/offchannel.c +2 -3
@@ -308,11 +308,10 @@ void ieee80211_roc_notify_destroy(struct/* was never transmitted */ if (roc->frame) { -cfg80211_mgmt_tx_status (&roc->sdata->wdev, - (unsigned long )roc->frame, +cfg80211_mgmt_tx_status (&roc->sdata->wdev, roc->mgmt_tx_cookie, roc->frame->data, roc->frame->len, false,GFP_KERNEL ); -kfree_skb (roc->frame); +ieee80211_free_txskb (&roc->sdata->local->hw, roc->frame); }if (!roc->mgmt_tx_cookie)
Greg Kroah-Hartman
maintainerPATCH 124/312 xfrm_user: propagate sec ctx allocation errors
In reply to Greg Kroah-HartmanFrom: Mathias Krause <[email protected]>
commit 2f30ea5090cbc57ea573cdc66421264b3de3fb0a upstream.
When we fail to attach the security context in xfrm_state_construct() we'll return 0 as error value which, in turn, will wrongly claim success to userland when, in fact, we won't be adding / updating the XFRM state.
This is a regression introduced by commit fd21150a0fe1 ("[XFRM] netlink:
Inline attach_encap_tmpl(), attach_sec_ctx(), and attach_one_addr()").
Fix it by propagating the error returned by security_xfrm_state_alloc() in this case.
--- net/xfrm/xfrm_user.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
net/xfrm/xfrm_user.c +6 -3
@@ -609,9 +609,12 @@ static struct xfrm_state *xfrm_state_conif (err) goto error; -if (attrs[XFRMA_SEC_CTX ] && -security_xfrm_state_alloc (x,nla_data (attrs[XFRMA_SEC_CTX ]))) - goto error; +if (attrs[XFRMA_SEC_CTX ]) { + err =security_xfrm_state_alloc (x, +nla_data (attrs[XFRMA_SEC_CTX ])); +if (err) + goto error; + }if ((err =xfrm_alloc_replay_state_esn (&x->replay_esn, &x->preplay_esn, attrs[XFRMA_REPLAY_ESN_VAL ])))
Greg Kroah-Hartman
maintainerPATCH 122/312 Input: edt-ft5x06 - fix setting gain, offset, and threshold via device tree
In reply to Greg Kroah-HartmanFrom: Philipp Zabel <[email protected]>
commit dc262dfaaeda7617ae0b15b5ce1252a6cd102b19 upstream.
A recent patch broke parsing the gain, offset, and threshold parameters from device tree. Instead of setting the cached values and writing them to the correct registers during probe, it would write the values from DT into the register address variables and never write them to the chip during normal operation.
--- drivers/input/touchscreen/edt-ft5x06.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
drivers/input/touchscreen/edt-ft5x06.c +12 -6
@@ -822,16 +822,22 @@ static void edt_ft5x06_ts_get_defaults(sint error; error =device_property_read_u32 (dev,"threshold" , &val); -if (!error) - reg_addr->reg_threshold = val; +if (!error) { +edt_ft5x06_register_write (tsdata, reg_addr->reg_threshold, val); + tsdata->threshold = val; + } error =device_property_read_u32 (dev,"gain" , &val); -if (!error) - reg_addr->reg_gain = val; +if (!error) { +edt_ft5x06_register_write (tsdata, reg_addr->reg_gain, val); + tsdata->gain = val; + } error =device_property_read_u32 (dev,"offset" , &val); -if (!error) - reg_addr->reg_offset = val; +if (!error) { +edt_ft5x06_register_write (tsdata, reg_addr->reg_offset, val); + tsdata->offset = val; + } } static void
Greg Kroah-Hartman
maintainerPATCH 104/312 RDMA/cxgb3: device driver frees DMA memory with different size
In reply to Greg Kroah-HartmanFrom: Honggang Li <[email protected]>
commit 0de4cbb3dddca35ecd06b95918f38439c9c6401f upstream.
[ 598.852037] ------------[ cut here ]------------ [ 598.856698] WARNING: at lib/dma-debug.c:887 check_unmap+0xf8/0x920() [ 598.863079] cxgb3 0000:01:00.0: DMA-API: device driver frees DMA memory with different size [device address=0x0000000003310000] [map size=17 bytes] [unmap size=16 bytes] [ 598.878265] Modules linked in: xprtrdma ib_isert iscsi_target_mod ib_iser libiscsi scsi_transport_iscsi ib_srpt target_core_mod ib_srp scsi_transport_srp scsi_tgt ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm ib_sa ib_mad kvm_amd kvm ipmi_devintf ipmi_ssif dcdbas pcspkr ipmi_si sg ipmi_msghandler acpi_power_meter amd64_edac_mod shpchp edac_core sp5100_tco k10temp edac_mce_amd i2c_piix4 acpi_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod crc_t10dif crct10dif_generic crct10dif_common ata_generic iw_cxgb3 pata_acpi ib_core ib_addr mgag200 syscopyarea sysfillrect sysimgblt i2c_algo_bit drm_kms_helper ttm pata_atiixp drm ahci libahci serio_raw i2c_core cxgb3 libata bnx2 mdio dm_mirror dm_region_hash dm_log dm_mod [ 598.946822] CPU: 3 PID: 11820 Comm: cmtime Not tainted 3.10.0-327.el7.x86_64.debug #1 [ 598.954681] Hardware name: Dell Inc. PowerEdge R415/0GXH08, BIOS 2.0.2 10/22/2012 [ 598.962193] ffff8808077479a8 000000000381a432 ffff880807747960 ffffffff81700918 [ 598.969663] ffff880807747998 ffffffff8108b6c0 ffff880807747a80 ffff8808063f55c0 [ 598.977132] ffffffff833ca850 0000000000000282 ffff88080b1bb800 ffff880807747a00 [ 598.984602] Call Trace: [ 598.987062] [<ffffffff81700918>] dump_stack+0x19/0x1b [ 598.992224] [<ffffffff8108b6c0>] warn_slowpath_common+0x70/0xb0 [ 598.998254] [<ffffffff8108b75c>] warn_slowpath_fmt+0x5c/0x80 [ 599.004033] [<ffffffff813903b8>] check_unmap+0xf8/0x920 [ 599.009369] [<ffffffff81025959>] ? sched_clock+0x9/0x10 [ 599.014702] [<ffffffff81390cee>] debug_dma_free_coherent+0x7e/0xa0 [ 599.021008] [<ffffffffa01ece2c>] cxio_destroy_cq+0xcc/0x160 [iw_cxgb3] [ 599.027654] [<ffffffffa01e8da0>] iwch_destroy_cq+0xf0/0x140 [iw_cxgb3] [ 599.034307] [<ffffffffa01c4bfe>] ib_destroy_cq+0x1e/0x30 [ib_core] [ 599.040601] [<ffffffffa04ff2d2>] ib_uverbs_close+0x302/0x4d0 [ib_uverbs] [ 599.047417] [<ffffffff812335a2>] __fput+0x102/0x310 [ 599.052401] [<ffffffff8123388e>] ____fput+0xe/0x10 [ 599.057297] [<ffffffff810bbde4>] task_work_run+0xb4/0xe0 [ 599.062719] [<ffffffff81092a84>] do_exit+0x304/0xc60 [ 599.067789] [<ffffffff81025905>] ? native_sched_clock+0x35/0x80 [ 599.073820] [<ffffffff81025959>] ? sched_clock+0x9/0x10 [ 599.079153] [<ffffffff8170a49c>] ? _raw_spin_unlock_irq+0x2c/0x50 [ 599.085358] [<ffffffff8109346c>] do_group_exit+0x4c/0xc0 [ 599.090779] [<ffffffff810a8661>] get_signal_to_deliver+0x2e1/0x960 [ 599.097071] [<ffffffff8101c497>] do_signal+0x57/0x6e0 [ 599.102229] [<ffffffff81714bd1>] ? sysret_signal+0x5/0x4e [ 599.107738] [<ffffffff8101cb7f>] do_notify_resume+0x5f/0xb0 [ 599.113418] [<ffffffff81714e7d>] int_signal+0x12/0x17 [ 599.118576] ---[ end trace 1e4653102e7e7019 ]--- [ 599.123211] Mapped at: [ 599.125577] [<ffffffff8138ed8b>] debug_dma_alloc_coherent+0x2b/0x80 [ 599.131968] [<ffffffffa01ec862>] cxio_create_cq+0xf2/0x1f0 [iw_cxgb3] [ 599.139920] [<ffffffffa01e9c05>] iwch_create_cq+0x105/0x4e0 [iw_cxgb3] [ 599.147895] [<ffffffffa0500584>] create_cq.constprop.14+0x184/0x2e0 [ib_uverbs] [ 599.156649] [<ffffffffa05027fb>] ib_uverbs_create_cq+0x10b/0x140 [ib_uverbs]
--- drivers/infiniband/hw/cxgb3/cxio_hal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/cxgb3/cxio_hal.c +1 -1
@@ -327,7 +327,7 @@ int cxio_destroy_cq(struct cxio_rdev *rdkfree (cq->sw_queue);dma_free_coherent (&(rdev_p->rnic_info.pdev->dev), (1UL << (cq->size_log2)) - *sizeof (struct t3_cqe ), cq->queue, + *sizeof (struct t3_cqe ) +1 , cq->queue,dma_unmap_addr (cq, mapping));cxio_hal_put_cqid (rdev_p->rscp, cq->cqid);return err;
Greg Kroah-Hartman
maintainerPATCH 59/312 mlxsw: pci: Correctly determine if descriptor queue is full
In reply to Greg Kroah-HartmanFrom: Ido Schimmel <[email protected]>
commit 5091730d7795ccb21eb880699b5194730641c70b upstream.
The descriptor queues for sending (SDQs) and receiving (RDQs) packets are managed by two counters - producer and consumer - which are both 16-bit in size. A queue is considered full when the difference between the two equals the queue's maximum number of descriptors.
However, if the producer counter overflows, then it's possible for the full queue check to fail, as it doesn't take the overflow into account. In such a case, descriptors already passed to the device - but for which a completion has yet to be posted - will be overwritten, thereby causing undefined behavior. The above can be achieved under heavy load (~30 netperf instances).
Fix that by casting the subtraction result to u16, preventing it from being treated as a signed integer.
--- drivers/net/ethernet/mellanox/mlxsw/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlxsw/pci.c +1 -1
@@ -215,7 +215,7 @@ mlxsw_pci_queue_elem_info_producer_get(s {int index = q->producer_counter & (q->count -1 ); -if ((q->producer_counter - q->consumer_counter) == q->count) +if ((u16) (q->producer_counter - q->consumer_counter) == q->count)return NULL ;return mlxsw_pci_queue_elem_info_get (q, index); }
Greg Kroah-Hartman
maintainerPATCH 118/312 Drivers: hv: utils: use memdup_user in hvt_op_write
In reply to Greg Kroah-HartmanFrom: Olaf Hering <[email protected]>
commit b00359642c2427da89dc8f77daa2c9e8a84e6d76 upstream.
Use memdup_user to handle OOM.
--- drivers/hv/hv_utils_transport.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/hv/hv_utils_transport.c +4 -5
@@ -80,11 +80,10 @@ static ssize_t hvt_op_write(struct file hvt = container_of(file->f_op, struct hvutil_transport, fops); - inmsg =kzalloc (count,GFP_KERNEL ); -if (copy_from_user (inmsg, buf, count)) { -kfree (inmsg); -return -EFAULT ; - } + inmsg =memdup_user (buf, count); +if (IS_ERR (inmsg)) +return PTR_ERR (inmsg); +if (hvt->on_msg (inmsg, count))return -EFAULT ;kfree (inmsg);
Greg Kroah-Hartman
maintainerPATCH 119/312 isa: Call isa_bus_init before dependent ISA bus drivers register
In reply to Greg Kroah-HartmanFrom: William Breathitt Gray <[email protected]>
commit 32a5a0c047343b11f581f663a2309cf43d13466f upstream.
The isa_bus_init function must be called before drivers which utilize the ISA bus driver are registered. A race condition for initilization exists if device_initcall is used (the isa_bus_init callback is placed in the same initcall level as dependent drivers which use module_init). This patch ensures that isa_bus_init is called first by utilizing postcore_initcall in favor of device_initcall.
--- drivers/base/isa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/isa.c +1 -1
@@ -180,4 +180,4 @@ static int __init isa_bus_init(void)return error; } -device_initcall (isa_bus_init); +postcore_initcall (isa_bus_init);
Greg Kroah-Hartman
maintainerPATCH 117/312 serial: samsung: Fix possible out of bounds access on non-DT platform
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
commit 926b7b5122c96e1f18cd20e85a286c7ec8d18c97 upstream.
On non-DeviceTree platforms, the index of serial device is a static variable incremented on each probe. It is incremented even if deferred probe happens when getting the clock in s3c24xx_serial_init_port().
This index is used for referencing elements of statically allocated s3c24xx_serial_ports array. In case of re-probe, the index will point outside of this array leading to memory corruption.
Increment the index only on successful probe.
--- drivers/tty/serial/samsung.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/samsung.c +2 -2
@@ -1841,8 +1841,6 @@ static int s3c24xx_serial_probe(struct p ourport->min_dma_size =max_t (int, ourport->port.fifosize,dma_get_cache_alignment ()); - probe_index++; -dbg ("%s: initialising port %p...\n" , __func__, ourport); ret =s3c24xx_serial_init_port (ourport, pdev);
@@ -1872,6 +1870,8 @@ static int s3c24xx_serial_probe(struct pif (ret <0 )dev_err (&pdev->dev,"failed to add cpufreq notifier\n" ); + probe_index++; +return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 116/312 tty: serial: msm: Support more bauds
In reply to Greg Kroah-HartmanFrom: Stephen Boyd <[email protected]>
commit 98952bf510d0c7cdfc284f098bbf4682dc47bc61 upstream.
The msm_find_best_baud() function is written with the assumption that the port->uartclk rate is fixed to a particular rate at boot time, but now this driver changes that clk rate at runtime when the baud is changed.
The way the hardware works is that an input clk rate comes from the clk controller into the uart hw block. That rate is typically 1843200 or 3686400 Hz. That rate can then be divided by an internal divider in the hw block to achieve a particular baud on the serial wire. msm_find_best_baud() is looking for that divider value.
A few things are wrong with the way the code is written. First, it assumes that the maximum baud that the uart can support if the clk rate is fixed at boot is 460800, which would correspond to an input clk rate of 230400 * 16 == 3686400 Hz. Except some devices have a boot rate of 1843200 Hz or max baud of 115200, so achieving 230400 on those devices doesn't work at all because we don't increase the clk rate unless max baud is 460800.
Second, we can't achieve bauds higher than 460800 that require anything besides a divisor of 1, because we always call msm_find_best_baud() with a fixed port->uartclk rate that will eventually be changed after we calculate the divisor. So if we need to get a baud of 500000, we'll just multiply that by 16 and hope that the clk can give us 500000 * 16 == 8000000 Hz, which it typically can't do. To really achieve 500000 baud, we need to get an input clk rate of 24000000 Hz and then divide that by 3 inside the uart hardware.
Finally, we return success for bauds even when we can't actually achieve them. This means that when the user asks for 500000 baud, we actually get 921600 right now, but the user doesn't know that.
Fix all of this by searching through the divisor and clk rate space with a combination of clk_round_rate() and baud calculations, keeping track of the best clk rate and divisor we find if we can't get an exact match. Typically we can get an exact match with a divisor of 1, but sometimes we need to keep track and try more frequencies. On my msm8916 device, this results in all standard bauds in baud_table being supported except for 1800, 576000, 1152000, and 4000000.
--- drivers/tty/serial/msm_serial.c | 101 ++++++++++++++++++++++++++-------------- 1 file changed, 67 insertions(+), 34 deletions(-)
drivers/tty/serial/msm_serial.c +67 -34
@@ -872,37 +872,72 @@ struct msm_baud_map { };static const struct msm_baud_map * -msm_find_best_baud (struct uart_port *port,unsigned int baud) +msm_find_best_baud (struct uart_port *port,unsigned int baud, +unsigned long *rate) { -unsigned int i, divisor; -const struct msm_baud_map *entry; +struct msm_port *msm_port =UART_TO_MSM (port); +unsigned int divisor, result; +unsigned long target, old, best_rate =0 , diff, best_diff =ULONG_MAX ; +const struct msm_baud_map *entry, *end, *best;static const struct msm_baud_map table[] = { - {1536 ,0x00 ,1 }, - {768 ,0x11 ,1 }, - {384 ,0x22 ,1 }, - {192 ,0x33 ,1 }, - {96 ,0x44 ,1 }, - {48 ,0x55 ,1 }, - {32 ,0x66 ,1 }, - {24 ,0x77 ,1 }, - {16 ,0x88 ,1 }, - {12 ,0x99 ,6 }, - {8 ,0xaa ,6 }, - {6 ,0xbb ,6 }, - {4 ,0xcc ,6 }, - {3 ,0xdd ,8 }, - {2 ,0xee ,16 }, {1 ,0xff ,31 }, - {0 ,0xff ,31 }, + {2 ,0xee ,16 }, + {3 ,0xdd ,8 }, + {4 ,0xcc ,6 }, + {6 ,0xbb ,6 }, + {8 ,0xaa ,6 }, + {12 ,0x99 ,6 }, + {16 ,0x88 ,1 }, + {24 ,0x77 ,1 }, + {32 ,0x66 ,1 }, + {48 ,0x55 ,1 }, + {96 ,0x44 ,1 }, + {192 ,0x33 ,1 }, + {384 ,0x22 ,1 }, + {768 ,0x11 ,1 }, + {1536 ,0x00 ,1 }, }; - divisor =uart_get_divisor (port, baud); - -for (i =0 , entry = table; i <ARRAY_SIZE (table); i++, entry++) -if (entry->divisor <= divisor) -break ; + best = table;/* Default to smallest divider */ + target =clk_round_rate (msm_port->clk,16 * baud); + divisor =DIV_ROUND_CLOSEST (target,16 * baud); + + end = table +ARRAY_SIZE (table); + entry = table; +while (entry < end) { +if (entry->divisor <= divisor) { + result = target / entry->divisor /16 ; + diff =abs (result - baud); + +/* Keep track of best entry */ +if (diff < best_diff) { + best_diff = diff; + best = entry; + best_rate = target; + } + +if (result == baud) +break ; + }else if (entry->divisor > divisor) { + old = target; + target =clk_round_rate (msm_port->clk, old +1 ); +/* +* The rate didn't get any faster so we can't do +* better at dividing it down +*/ +if (target == old) +break ; + +/* Start the divisor search over at this new rate */ + entry = table; + divisor =DIV_ROUND_CLOSEST (target,16 * baud); +continue ; + } + entry++; + } -return entry;/* Default to smallest divider */ + *rate = best_rate; +return best; } static int msm_set_baud_rate(struct uart_port *port, unsigned int baud,
@@ -911,22 +946,20 @@ static int msm_set_baud_rate(struct uartunsigned int rxstale, watermark, mask;struct msm_port *msm_port =UART_TO_MSM (port);const struct msm_baud_map *entry; -unsigned long flags; - - entry =msm_find_best_baud (port, baud); - -msm_write (port, entry->code,UART_CSR ); - -if (baud >460800 ) - port->uartclk = baud *16 ; +unsigned long flags, rate; flags = *saved_flags;spin_unlock_irqrestore (&port->lock, flags); -clk_set_rate (msm_port->clk, port->uartclk); + entry =msm_find_best_baud (port, baud, &rate); +clk_set_rate (msm_port->clk, rate); + baud = rate /16 / entry->divisor;spin_lock_irqsave (&port->lock, flags); *saved_flags = flags; + port->uartclk = rate; + +msm_write (port, entry->code,UART_CSR );/* RX stale watermark */ rxstale = entry->rxstale;
Greg Kroah-Hartman
maintainerPATCH 115/312 batman-adv: replace WARN with rate limited output on non-existing VLAN
In reply to Greg Kroah-HartmanFrom: Simon Wunderlich <[email protected]>
commit 0b3dd7dfb81ad8af53791ea2bb64b83bac1b7d32 upstream.
If a VLAN tagged frame is received and the corresponding VLAN is not configured on the soft interface, it will splat a WARN on every packet received. This is a quite annoying behaviour for some scenarios, e.g. if bat0 is bridged with eth0, and there are arbitrary VLAN tagged frames from Ethernet coming in without having any VLAN configuration on bat0.
The code should probably create vlan objects on the fly and transparently transport these VLAN-tagged Ethernet frames, but until this is done, at least the WARN splat should be replaced by a rate limited output.
--- net/batman-adv/translation-table.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
net/batman-adv/translation-table.c +4 -2
@@ -614,8 +614,10 @@ bool batadv_tt_local_add(struct net_devi/* increase the refcounter of the related vlan */ vlan =batadv_softif_vlan_get (bat_priv, vid); -if (WARN (!vlan,"adding TT local entry %pM to non-existent VLAN %d" , - addr,BATADV_PRINT_VID (vid))) { +if (!vlan) { +net_ratelimited_function (batadv_info, soft_iface, +"adding TT local entry %pM to non-existent VLAN %d\n" , + addr,BATADV_PRINT_VID (vid));kfree (tt_local); tt_local =NULL ; goto out;
Greg Kroah-Hartman
maintainerPATCH 114/312 batman-adv: Fix lockdep annotation of batadv_tlv_container_remove
In reply to Greg Kroah-HartmanFrom: Sven Eckelmann <[email protected]>
commit 008a374487070a391c12aa39288fd8511f822cab upstream.
The function handles tlv containers and not tlv handlers. Thus the lockdep_assert_held has to check for the container_list lock.
--- net/batman-adv/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/batman-adv/main.c +1 -1
@@ -747,7 +747,7 @@ static u16 batadv_tvlv_container_list_sistatic void batadv_tvlv_container_remove (struct batadv_priv *bat_priv,struct batadv_tvlv_container *tvlv) { -lockdep_assert_held (&bat_priv->tvlv.handler_list_lock); +lockdep_assert_held (&bat_priv->tvlv.container_list_lock);if (!tvlv)return ;
Greg Kroah-Hartman
maintainerPATCH 103/312 xprtrdma: rpcrdma_bc_receive_call() should init rq_private_buf.len
In reply to Greg Kroah-HartmanFrom: Chuck Lever <[email protected]>
commit 9f74660bcf1e4cca577be99e54bc77b5df62b508 upstream.
Some NFSv4.1 OPEN requests were hanging waiting for the NFS server to finish recalling delegations. Turns out that each NFSv4.1 CB request on RDMA gets a GARBAGE_ARGS reply from the Linux client.
Commit 756b9b37cfb2e3dc added a line in bc_svc_process that overwrites the incoming rq_rcv_buf's length with the value in rq_private_buf.len. But rpcrdma_bc_receive_call() does not invoke xprt_complete_bc_request(), thus rq_private_buf.len is not initialized. svc_process_common() is invoked with a zero-length RPC message, and fails.
--- net/sunrpc/xprtrdma/backchannel.c | 2 ++ 1 file changed, 2 insertions(+)
net/sunrpc/xprtrdma/backchannel.c +2 -0
@@ -337,6 +337,8 @@ void rpcrdma_bc_receive_call(struct rpcr rqst->rq_reply_bytes_recvd =0 ; rqst->rq_bytes_sent =0 ; rqst->rq_xid = headerp->rm_xid; + + rqst->rq_private_buf.len = size;set_bit (RPC_BC_PA_IN_USE , &rqst->rq_bc_pa_state); buf = &rqst->rq_rcv_buf;
Greg Kroah-Hartman
maintainerPATCH 68/312 GRE: Disable segmentation offloads w/ CSUM and we are encapsulated via FOU
In reply to Greg Kroah-HartmanFrom: Alexander Duyck <[email protected]>
commit a0ca153f98db8cf25298565a09e11fe9d82846ad upstream.
This patch fixes an issue I found in which we were dropping frames if we had enabled checksums on GRE headers that were encapsulated by either FOU or GUE. Without this patch I was barely able to get 1 Gb/s of throughput. With this patch applied I am now at least getting around 6 Gb/s.
The issue is due to the fact that with FOU or GUE applied we do not provide a transport offset pointing to the GRE header, nor do we offload it in software as the GRE header is completely skipped by GSO and treated like a VXLAN or GENEVE type header. As such we need to prevent the stack from generating it and also prevent GRE from generating it via any interface we create.
--- include/linux/netdevice.h | 5 ++++- net/core/dev.c | 1 + net/ipv4/fou.c | 6 ++++++ net/ipv4/gre_offload.c | 8 ++++++++ net/ipv4/ip_gre.c | 13 ++++++++++--- 5 files changed, 29 insertions(+), 4 deletions(-)
include/linux/netdevice.h +4 -1
@@ -2013,7 +2013,10 @@ struct napi_gro_cb {/* Number of gro_receive callbacks this packet already went through */ u8 recursion_counter:4; -/* 3 bit hole */ +/* Used in GRE, set in fou/gue_gro_receive */ + u8 is_fou:1; + +/* 2 bit hole */ /* used to support CHECKSUM_COMPLETE for tunneling protocols */ __wsum csum;
net/core/dev.c +1 -0
@@ -4320,6 +4320,7 @@ static enum gro_result dev_gro_receive(sNAPI_GRO_CB (skb)->free =0 ;NAPI_GRO_CB (skb)->encap_mark =0 ;NAPI_GRO_CB (skb)->recursion_counter =0 ; +NAPI_GRO_CB (skb)->is_fou =0 ;NAPI_GRO_CB (skb)->gro_remcsum_start =0 ;/* Setup for GRO checksum validation */
net/ipv4/fou.c +6 -0
@@ -205,6 +205,9 @@ static struct sk_buff **fou_gro_receive(*/ NAPI_GRO_CB (skb)->encap_mark =0 ; +/* Flag this frame as already having an outer encap header */ +NAPI_GRO_CB (skb)->is_fou =1 ; +rcu_read_lock (); offloads =NAPI_GRO_CB (skb)->is_ipv6 ? inet6_offloads : inet_offloads; ops =rcu_dereference (offloads[proto]);
@@ -372,6 +375,9 @@ static struct sk_buff **gue_gro_receive(*/ NAPI_GRO_CB (skb)->encap_mark =0 ; +/* Flag this frame as already having an outer encap header */ +NAPI_GRO_CB (skb)->is_fou =1 ; +rcu_read_lock (); offloads =NAPI_GRO_CB (skb)->is_ipv6 ? inet6_offloads : inet_offloads; ops =rcu_dereference (offloads[guehdr->proto_ctype]);
net/ipv4/gre_offload.c +8 -0
@@ -151,6 +151,14 @@ static struct sk_buff **gre_gro_receive(if ((greh->flags & ~(GRE_KEY |GRE_CSUM )) !=0 ) goto out; +/* We can only support GRE_CSUM if we can track the location of +* the GRE header. In the case of FOU/GUE we cannot because the +* outer UDP header displaces the GRE header leaving us in a state +* of limbo. +*/ +if ((greh->flags &GRE_CSUM ) &&NAPI_GRO_CB (skb)->is_fou) + goto out; + type = greh->protocol;rcu_read_lock ();
net/ipv4/ip_gre.c +10 -3
@@ -851,9 +851,16 @@ static void __gre_tunnel_init(struct net dev->hw_features |=GRE_FEATURES ;if (!(tunnel->parms.o_flags &TUNNEL_SEQ )) { -/* TCP offload with GRE SEQ is not supported. */ - dev->features |=NETIF_F_GSO_SOFTWARE ; - dev->hw_features |=NETIF_F_GSO_SOFTWARE ; +/* TCP offload with GRE SEQ is not supported, nor +* can we support 2 levels of outer headers requiring +* an update. +*/ +if (!(tunnel->parms.o_flags &TUNNEL_CSUM ) || + (tunnel->encap.type ==TUNNEL_ENCAP_NONE )) { + dev->features |=NETIF_F_GSO_SOFTWARE ; + dev->hw_features |=NETIF_F_GSO_SOFTWARE ; + } +/* Can use a lockless transmit, unless we generate * output sequences */
Greg Kroah-Hartman
maintainerPATCH 67/312 ovs/gre,geneve: fix error path when creating an iface
In reply to Greg Kroah-HartmanFrom: Nicolas Dichtel <[email protected]>
commit 106da663ff495e0aea3ac15b8317aa410754fcac upstream.
After ipgre_newlink()/geneve_configure() call, the netdev is registered.
--- drivers/net/geneve.c | 10 +++++++--- net/ipv4/ip_gre.c | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-)
drivers/net/geneve.c +7 -3
@@ -1340,6 +1340,7 @@ struct net_device *geneve_dev_create_fb( {struct nlattr *tb[IFLA_MAX +1 ];struct net_device *dev; +LIST_HEAD (list_kill);int err;memset (tb,0 ,sizeof (tb));
@@ -1350,8 +1351,10 @@ struct net_device *geneve_dev_create_fb( err =geneve_configure (net, dev, &geneve_remote_unspec,0 ,0 ,0 ,htons (dst_port), true); -if (err) - goto err; +if (err) { +free_netdev (dev); +return ERR_PTR (err); + }/* openvswitch users expect packet sizes to be unrestricted, * so set the largest MTU we can.
@@ -1363,7 +1366,8 @@ struct net_device *geneve_dev_create_fb(return dev; err: -free_netdev (dev); +geneve_dellink (dev, &list_kill); +unregister_netdevice_many (&list_kill);return ERR_PTR (err); }EXPORT_SYMBOL_GPL (geneve_dev_create_fb);
net/ipv4/ip_gre.c +7 -3
@@ -1230,6 +1230,7 @@ struct net_device *gretap_fb_dev_create( {struct nlattr *tb[IFLA_MAX +1 ];struct net_device *dev; +LIST_HEAD (list_kill);struct ip_tunnel *t;int err;
@@ -1245,8 +1246,10 @@ struct net_device *gretap_fb_dev_create( t->collect_md = true; err =ipgre_newlink (net, dev, tb,NULL ); -if (err <0 ) - goto out; +if (err <0 ) { +free_netdev (dev); +return ERR_PTR (err); + }/* openvswitch users expect packet sizes to be unrestricted, * so set the largest MTU we can.
@@ -1257,7 +1260,8 @@ struct net_device *gretap_fb_dev_create(return dev; out: -free_netdev (dev); +ip_tunnel_dellink (dev, &list_kill); +unregister_netdevice_many (&list_kill);return ERR_PTR (err); }EXPORT_SYMBOL_GPL (gretap_fb_dev_create);
Greg Kroah-Hartman
maintainerPATCH 65/312 mlxsw: Treat local port 64 as valid
In reply to Greg Kroah-HartmanFrom: Ido Schimmel <[email protected]>
commit 1e5ad30c649a82a062ce79a87c1296e6c6f328c2 upstream.
MLXSW_PORT_MAX_PORTS represents the maximum number of local ports, which is 65 for both ASICs (SwitchX-2 and Spectrum) supported by this driver.
--- drivers/net/ethernet/mellanox/mlxsw/port.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlxsw/port.h +1 -1
@@ -49,7 +49,7 @@#define MLXSW_PORT_MID 0xd000#define MLXSW_PORT_MAX_PHY_PORTS 0x40 -#define MLXSW_PORT_MAX_PORTS MLXSW_PORT_MAX_PHY_PORTS +#define MLXSW_PORT_MAX_PORTS (MLXSW_PORT_MAX_PHY_PORTS + 1)#define MLXSW_PORT_DEVID_BITS_OFFSET 10#define MLXSW_PORT_PHY_BITS_OFFSET 4
Greg Kroah-Hartman
maintainerPATCH 100/312 xprtrdma: checking for NULL instead of IS_ERR()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit abfb689711aaebd14d893236c6ea4bcdfb61e74c upstream.
The rpcrdma_create_req() function returns error pointers or success. It never returns NULL.
--- net/sunrpc/xprtrdma/backchannel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/sunrpc/xprtrdma/backchannel.c +2 -2
@@ -42,8 +42,8 @@ static int rpcrdma_bc_setup_rqst(structsize_t size; req =rpcrdma_create_req (r_xprt); -if (!req) -return -ENOMEM ; +if (IS_ERR (req)) +return PTR_ERR (req); req->rl_backchannel = true; size =RPCRDMA_INLINE_WRITE_THRESHOLD (rqst);
Greg Kroah-Hartman
maintainerPATCH 99/312 ath10k: free cached fw bin contents when get board id fails
In reply to Greg Kroah-HartmanFrom: Raja Mani <[email protected]>
commit b9c191be3fbdd9d78be11160dd7a3ddb9fdc6d42 upstream.
ath10k_core_probe_fw() simply returns error without freeing cached firmware file content when get board id operation fails. Free cached fw bin data in failure case to avoid memory leak.
--- drivers/net/wireless/ath/ath10k/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/core.c +1 -1
@@ -1805,7 +1805,7 @@ static int ath10k_core_probe_fw(struct aif (ret && ret != -EOPNOTSUPP ) {ath10k_err (ar,"failed to get board id from otp for qca99x0: %d\n" , ret); -return ret; + goto err_free_firmware_files; } ret =ath10k_core_fetch_board_file (ar);
Greg Kroah-Hartman
maintainerPATCH 63/312 vfio/pci: Allow VPD short read
In reply to Greg Kroah-HartmanFrom: Alex Williamson <[email protected]>
commit ce7585f3c4d76bca1dff4b66ae1ea32552954f9e upstream.
The size of the VPD area is not necessarily 4-byte aligned, so a pci_vpd_read() might return less than 4 bytes. Zero our buffer and accept anything other than an error. Intel X710 NICs exercise this.
--- drivers/vfio/pci/vfio_pci_config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/vfio/pci/vfio_pci_config.c +2 -1
@@ -698,7 +698,8 @@ static int vfio_vpd_config_write(structif (pci_write_vpd (pdev, addr & ~PCI_VPD_ADDR_F ,4 , &data) !=4 )return count; }else { -if (pci_read_vpd (pdev, addr,4 , &data) !=4 ) + data =0 ; +if (pci_read_vpd (pdev, addr,4 , &data) <0 )return count; *pdata =cpu_to_le32 (data); }
Greg Kroah-Hartman
maintainerPATCH 95/312 irda: Free skb on irda_accept error path.
In reply to Greg Kroah-HartmanFrom: [email protected] <[email protected]>
commit 8ab86c00e349cef9fb14719093a7f198bcc72629 upstream.
skb is not freed if newsk is NULL. Rework the error path so free_skb is unconditionally called on function exit.
--- net/irda/af_irda.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
net/irda/af_irda.c +2 -3
@@ -839,7 +839,7 @@ static int irda_accept(struct socket *sostruct sock *sk = sock->sk;struct irda_sock *new, *self =irda_sk (sk);struct sock *newsk; -struct sk_buff *skb; +struct sk_buff *skb =NULL ;int err; err =irda_create (sock_net (sk), newsock, sk->sk_protocol,0 );
@@ -907,7 +907,6 @@ static int irda_accept(struct socket *so err = -EPERM ;/* value does not seem to make sense. -arnd */ if (!new->tsap) {pr_debug ("%s(), dup failed!\n" , __func__); -kfree_skb (skb); goto out; }
@@ -926,7 +925,6 @@ static int irda_accept(struct socket *so/* Clean up the original one to keep it in listen state */ irttp_listen (self->tsap); -kfree_skb (skb); sk->sk_ack_backlog--; newsock->state =SS_CONNECTED ;
@@ -934,6 +932,7 @@ static int irda_accept(struct socket *soirda_connect_response (new); err =0 ; out: +kfree_skb (skb);release_sock (sk);return err; }
Greg Kroah-Hartman
maintainerPATCH 92/312 sch_sfb: keep backlog updated with qlen
In reply to Greg Kroah-HartmanFrom: WANG Cong <[email protected]>
commit 3d4357fba82b3cf19ebf0a04d1c9cb086af15d02 upstream.
--- net/sched/sch_sfb.c | 3 +++ 1 file changed, 3 insertions(+)
net/sched/sch_sfb.c +3 -0
@@ -400,6 +400,7 @@ static int sfb_enqueue(struct sk_buff *s enqueue: ret =qdisc_enqueue (skb, child);if (likely (ret ==NET_XMIT_SUCCESS )) { +qdisc_qstats_backlog_inc (sch, skb); sch->q.qlen++;increment_qlen (skb, q); }else if (net_xmit_drop_count (ret)) {
@@ -428,6 +429,7 @@ static struct sk_buff *sfb_dequeue(strucif (skb) {qdisc_bstats_update (sch, skb); +qdisc_qstats_backlog_dec (sch, skb); sch->q.qlen--;decrement_qlen (skb, q); }
@@ -450,6 +452,7 @@ static void sfb_reset(struct Qdisc *sch)struct sfb_sched_data *q =qdisc_priv (sch);qdisc_reset (q->qdisc); + sch->qstats.backlog =0 ; sch->q.qlen =0 ; q->slot =0 ; q->double_buffering = false;
Greg Kroah-Hartman
maintainerPATCH 88/312 sch_drr: update backlog as well
In reply to Greg Kroah-HartmanFrom: WANG Cong <[email protected]>
commit 6a73b571b63075ef408c83f07c2565b5652f93cc upstream.
--- net/sched/sch_drr.c | 4 ++++ 1 file changed, 4 insertions(+)
net/sched/sch_drr.c +4 -0
@@ -375,6 +375,7 @@ static int drr_enqueue(struct sk_buff *s cl->deficit = cl->quantum; } +qdisc_qstats_backlog_inc (sch, skb); sch->q.qlen++;return err; }
@@ -405,6 +406,7 @@ static struct sk_buff *drr_dequeue(strucbstats_update (&cl->bstats, skb);qdisc_bstats_update (sch, skb); +qdisc_qstats_backlog_dec (sch, skb); sch->q.qlen--;return skb; }
@@ -426,6 +428,7 @@ static unsigned int drr_drop(struct Qdisif (cl->qdisc->ops->drop) { len = cl->qdisc->ops->drop (cl->qdisc);if (len >0 ) { + sch->qstats.backlog -= len; sch->q.qlen--;if (cl->qdisc->q.qlen ==0 )list_del (&cl->alist);
@@ -461,6 +464,7 @@ static void drr_reset_qdisc(struct Qdiscqdisc_reset (cl->qdisc); } } + sch->qstats.backlog =0 ; sch->q.qlen =0 ; }
Greg Kroah-Hartman
maintainerPATCH 82/312 net/mlx5: Fix wait_vital for VFs and remove fixed sleep
In reply to Greg Kroah-HartmanFrom: Daniel Jurgens <[email protected]>
commit d57847dc4177c6fd8d950cb533f5edf0eab45b11 upstream.
The device ID for VFs is in a different location than PFs. This results in the poll always timing out for VFs. There's no good way to read the VF device ID without using the PF's configuration space. Switch to waiting for the health poll to start incrementing. Also remove the 1s sleep at the beginning.
driver')
--- drivers/net/ethernet/mellanox/mlx5/core/main.c | 41 +++++++++---------------- 1 file changed, 15 insertions(+), 26 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/main.c +15 -26
@@ -1306,46 +1306,31 @@ void mlx5_disable_device(struct mlx5_cormlx5_pci_err_detected (dev->pdev,0 ); } -/* wait for the device to show vital signs. For now we check -* that we can read the device ID and that the health buffer -* shows a non zero value which is different than 0xffffffff +/* wait for the device to show vital signs by waiting +* for the health counter to start counting. */ -static void wait_vital (struct pci_dev *pdev) +static int wait_vital (struct pci_dev *pdev) {struct mlx5_core_dev *dev =pci_get_drvdata (pdev);struct mlx5_core_health *health = &dev->priv.health;const int niter =100 ; +u32 last_count =0 ;u32 count; -u16 did;int i; -/* Wait for firmware to be ready after reset */ -msleep (1000 ); -for (i =0 ; i < niter; i++) { -if (pci_read_config_word (pdev,2 , &did)) { -dev_warn (&pdev->dev,"failed reading config word\n" ); -break ; - } -if (did == pdev->device) { -dev_info (&pdev->dev,"device ID correctly read after %d iterations\n" , i); -break ; - } -msleep (50 ); - } -if (i == niter) -dev_warn (&pdev->dev,"%s-%d: could not read device ID\n" , __func__, __LINE__); -for (i =0 ; i < niter; i++) { count =ioread32be (health->health_counter);if (count && count !=0xffffffff ) { -dev_info (&pdev->dev,"Counter value 0x%x after %d iterations\n" , count, i); -break ; +if (last_count && last_count != count) { +dev_info (&pdev->dev,"Counter value 0x%x after %d iterations\n" , count, i); +return 0 ; + } + last_count = count; }msleep (50 ); } -if (i == niter) -dev_warn (&pdev->dev,"%s-%d: could not read device ID\n" , __func__, __LINE__); +return -ETIMEDOUT ; }static void mlx5_pci_resume (struct pci_dev *pdev)
@@ -1357,7 +1342,11 @@ static void mlx5_pci_resume(struct pci_ddev_info (&pdev->dev,"%s was called\n" , __func__);pci_save_state (pdev); -wait_vital (pdev); + err =wait_vital (pdev); +if (err) { +dev_err (&pdev->dev,"%s: wait_vital timed out\n" , __func__); +return ; + } err =mlx5_load_one (dev, priv);if (err)
Greg Kroah-Hartman
maintainerPATCH 80/312 net/mlx5: use mlx5_buf_alloc_node instead of mlx5_buf_alloc in mlx5_wq_ll_create
In reply to Greg Kroah-HartmanFrom: Wang Sheng-Hui <[email protected]>
commit f299a02d5f13c4deb52c1a7ddf2b42630fe6294a upstream.
Commit 311c7c71c9bb ("net/mlx5e: Allocate DMA coherent memory on reader NUMA node") introduced mlx5_*_alloc_node() but missed changing some calling and warn messages. This patch introduces 2 changes:
* Use mlx5_buf_alloc_node() instead of mlx5_buf_alloc() in mlx5_wq_ll_create()
* Update the failure warn messages with _node postfix for mlx5_*_alloc function names
--- drivers/net/ethernet/mellanox/mlx5/core/wq.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/wq.c +8 -7
@@ -75,14 +75,14 @@ int mlx5_wq_cyc_create(struct mlx5_core_ err =mlx5_db_alloc_node (mdev, &wq_ctrl->db, param->db_numa_node);if (err) { -mlx5_core_warn (mdev,"mlx5_db_alloc() failed, %d\n" , err); +mlx5_core_warn (mdev,"mlx5_db_alloc_node() failed, %d\n" , err);return err; } err =mlx5_buf_alloc_node (mdev,mlx5_wq_cyc_get_byte_size (wq), &wq_ctrl->buf, param->buf_numa_node);if (err) { -mlx5_core_warn (mdev,"mlx5_buf_alloc() failed, %d\n" , err); +mlx5_core_warn (mdev,"mlx5_buf_alloc_node() failed, %d\n" , err); goto err_db_free; }
@@ -111,14 +111,14 @@ int mlx5_cqwq_create(struct mlx5_core_de err =mlx5_db_alloc_node (mdev, &wq_ctrl->db, param->db_numa_node);if (err) { -mlx5_core_warn (mdev,"mlx5_db_alloc() failed, %d\n" , err); +mlx5_core_warn (mdev,"mlx5_db_alloc_node() failed, %d\n" , err);return err; } err =mlx5_buf_alloc_node (mdev,mlx5_cqwq_get_byte_size (wq), &wq_ctrl->buf, param->buf_numa_node);if (err) { -mlx5_core_warn (mdev,"mlx5_buf_alloc() failed, %d\n" , err); +mlx5_core_warn (mdev,"mlx5_buf_alloc_node() failed, %d\n" , err); goto err_db_free; }
@@ -148,13 +148,14 @@ int mlx5_wq_ll_create(struct mlx5_core_d err =mlx5_db_alloc_node (mdev, &wq_ctrl->db, param->db_numa_node);if (err) { -mlx5_core_warn (mdev,"mlx5_db_alloc() failed, %d\n" , err); +mlx5_core_warn (mdev,"mlx5_db_alloc_node() failed, %d\n" , err);return err; } - err =mlx5_buf_alloc (mdev,mlx5_wq_ll_get_byte_size (wq), &wq_ctrl->buf); + err =mlx5_buf_alloc_node (mdev,mlx5_wq_ll_get_byte_size (wq), + &wq_ctrl->buf, param->buf_numa_node);if (err) { -mlx5_core_warn (mdev,"mlx5_buf_alloc() failed, %d\n" , err); +mlx5_core_warn (mdev,"mlx5_buf_alloc_node() failed, %d\n" , err); goto err_db_free; }
Greg Kroah-Hartman
maintainerPATCH 61/312 net/mlx4_core: Implement pci_resume callback
In reply to Greg Kroah-HartmanFrom: Daniel Jurgens <[email protected]>
commit c12833acff62cff83a8b728253e7ebbc1264d75e upstream.
Move resume related activities to a new pci_resume function instead of performing them in mlx4_pci_slot_reset. This change is needed to avoid a hotplug during EEH recovery due to commit f2da4ccf8bd4 ("powerpc/eeh:
More relaxed hotplug criterion").
--- drivers/net/ethernet/mellanox/mlx4/main.c | 39 ++++++++++++++++++------------ 1 file changed, 24 insertions(+), 15 deletions(-)
drivers/net/ethernet/mellanox/mlx4/main.c +24 -15
@@ -3854,45 +3854,53 @@ static pci_ers_result_t mlx4_pci_slot_re {struct mlx4_dev_persistent *persist =pci_get_drvdata (pdev);struct mlx4_dev *dev = persist->dev; -struct mlx4_priv *priv =mlx4_priv (dev); -int ret; -int nvfs[MLX4_MAX_PORTS +1 ] = {0 ,0 ,0 }; -int total_vfs; +int err;mlx4_err (dev,"mlx4_pci_slot_reset was called\n" ); - ret =pci_enable_device (pdev); -if (ret) { -mlx4_err (dev,"Can not re-enable device, ret=%d\n" , ret); + err =pci_enable_device (pdev); +if (err) { +mlx4_err (dev,"Can not re-enable device, err=%d\n" , err);return PCI_ERS_RESULT_DISCONNECT ; }pci_set_master (pdev);pci_restore_state (pdev);pci_save_state (pdev); +return PCI_ERS_RESULT_RECOVERED ; +} + +static void mlx4_pci_resume (struct pci_dev *pdev) +{ +struct mlx4_dev_persistent *persist =pci_get_drvdata (pdev); +struct mlx4_dev *dev = persist->dev; +struct mlx4_priv *priv =mlx4_priv (dev); +int nvfs[MLX4_MAX_PORTS +1 ] = {0 ,0 ,0 }; +int total_vfs; +int err; +mlx4_err (dev,"%s was called\n" , __func__); total_vfs = dev->persist->num_vfs;memcpy (nvfs, dev->persist->nvfs,sizeof (dev->persist->nvfs));mutex_lock (&persist->interface_state_mutex);if (!(persist->interface_state &MLX4_INTERFACE_STATE_UP )) { - ret =mlx4_load_one (pdev, priv->pci_dev_data, total_vfs, nvfs, + err =mlx4_load_one (pdev, priv->pci_dev_data, total_vfs, nvfs, priv,1 ); -if (ret) { -mlx4_err (dev,"%s: mlx4_load_one failed, ret=%d\n" , - __func__, ret); +if (err) { +mlx4_err (dev,"%s: mlx4_load_one failed, err=%d\n" , + __func__, err); goto end; } - ret =restore_current_port_types (dev, dev->persist-> + err =restore_current_port_types (dev, dev->persist-> curr_port_type, dev->persist-> curr_port_poss_type); -if (ret) -mlx4_err (dev,"could not restore original port types (%d)\n" , ret); +if (err) +mlx4_err (dev,"could not restore original port types (%d)\n" , err); } end:mutex_unlock (&persist->interface_state_mutex); -return ret ?PCI_ERS_RESULT_DISCONNECT :PCI_ERS_RESULT_RECOVERED ; }static void mlx4_shutdown (struct pci_dev *pdev)
@@ -3909,6 +3917,7 @@ static void mlx4_shutdown(struct pci_devstatic const struct pci_error_handlers mlx4_err_handler = { .error_detected = mlx4_pci_err_detected, .slot_reset = mlx4_pci_slot_reset, + .resume = mlx4_pci_resume, };static struct pci_driver mlx4_driver = {
Greg Kroah-Hartman
maintainerPATCH 71/312 c8sectpfe: Rework firmware loading mechanism
In reply to Greg Kroah-HartmanFrom: Peter Griffin <[email protected]>
commit c23ac90f78aa9190643c82c1975a0cfe480d7c60 upstream.
c8sectpfe driver relied on CONFIG_FW_LOADER_USER_HELPER_FALLBACK option for loading its xp70 firmware. A previous commit removed this Kconfig option, as it is apparently harmful, but did not update the driver code which relied on it.
This patch reworks the firmware loading into the start_feed callback. At this point we can be sure the rootfs is present, thereby removing the depedency on CONFIG_FW_LOADER_USER_HELPER_FALLBACK.
--- drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 65 ++++++------------ 1 file changed, 22 insertions(+), 43 deletions(-)
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c +22 -43
@@ -49,7 +49,7 @@ MODULE_FIRMWARE(FIRMWARE_MEMDMA);#define PID_TABLE_SIZE 1024#define POLL_MSECS 50 -static int load_c8sectpfe_fw_step1 (struct c8sectpfei *fei); +static int load_c8sectpfe_fw (struct c8sectpfei *fei);#define TS_PKT_SIZE 188#define HEADER_SIZE (4)
@@ -143,6 +143,7 @@ static int c8sectpfe_start_feed(struct dstruct channel_info *channel;u32 tmp;unsigned long *bitmap; +int ret;switch (dvbdmxfeed->type) {case DMX_TYPE_TS :
@@ -171,8 +172,9 @@ static int c8sectpfe_start_feed(struct d }if (!atomic_read (&fei->fw_loaded)) { -dev_err (fei->dev,"%s: c8sectpfe fw not loaded\n" , __func__); -return -EINVAL ; + ret =load_c8sectpfe_fw (fei); +if (ret) +return ret; }mutex_lock (&fei->lock);
@@ -267,8 +269,9 @@ static int c8sectpfe_stop_feed(struct dvunsigned long *bitmap;if (!atomic_read (&fei->fw_loaded)) { -dev_err (fei->dev,"%s: c8sectpfe fw not loaded\n" , __func__); -return -EINVAL ; + ret =load_c8sectpfe_fw (fei); +if (ret) +return ret; }mutex_lock (&fei->lock);
@@ -882,13 +885,6 @@ static int c8sectpfe_probe(struct platfo goto err_clk_disable; } -/* ensure all other init has been done before requesting firmware */ - ret =load_c8sectpfe_fw_step1 (fei); -if (ret) { -dev_err (dev,"Couldn't load slim core firmware\n" ); - goto err_clk_disable; - } -c8sectpfe_debugfs_init (fei);return 0 ;
@@ -1093,15 +1089,14 @@ static void load_dmem_segment(struct c8s phdr->p_memsz - phdr->p_filesz); } -static int load_slim_core_fw (const struct firmware *fw,void *context) +static int load_slim_core_fw (const struct firmware *fw,struct c8sectpfei *fei) { -struct c8sectpfei *fei = context;Elf32_Ehdr *ehdr;Elf32_Phdr *phdr;u8 __iomem *dst;int err =0 , i; -if (!fw || !context) +if (!fw || !fei)return -EINVAL ; ehdr = (Elf32_Ehdr *)fw->data;
@@ -1153,29 +1148,35 @@ static int load_slim_core_fw(const strucreturn err; } -static void load_c8sectpfe_fw_cb (const struct firmware *fw,void *context) +static int load_c8sectpfe_fw (struct c8sectpfei *fei) { -struct c8sectpfei *fei = context; +const struct firmware *fw;int err; +dev_info (fei->dev,"Loading firmware: %s\n" ,FIRMWARE_MEMDMA ); + + err =request_firmware (&fw,FIRMWARE_MEMDMA , fei->dev); +if (err) +return err; + err =c8sectpfe_elf_sanity_check (fei, fw);if (err) {dev_err (fei->dev,"c8sectpfe_elf_sanity_check failed err=(%d)\n" , err); - goto err; +return err; } - err =load_slim_core_fw (fw, context); + err =load_slim_core_fw (fw, fei);if (err) {dev_err (fei->dev,"load_slim_core_fw failed err=(%d)\n" , err); - goto err; +return err; }/* now the firmware is loaded configure the input blocks */ err =configure_channels (fei);if (err) {dev_err (fei->dev,"configure_channels failed err=(%d)\n" , err); - goto err; +return err; }/*
@@ -1188,28 +1189,6 @@ static void load_c8sectpfe_fw_cb(const swritel (0x1 , fei->io +DMA_CPU_RUN );atomic_set (&fei->fw_loaded,1 ); -err: -complete_all (&fei->fw_ack); -} - -static int load_c8sectpfe_fw_step1 (struct c8sectpfei *fei) -{ -int err; - -dev_info (fei->dev,"Loading firmware: %s\n" ,FIRMWARE_MEMDMA ); - -init_completion (&fei->fw_ack); -atomic_set (&fei->fw_loaded,0 ); - - err =request_firmware_nowait (THIS_MODULE ,FW_ACTION_HOTPLUG , -FIRMWARE_MEMDMA , fei->dev,GFP_KERNEL , fei, - load_c8sectpfe_fw_cb); - -if (err) { -dev_err (fei->dev,"request_firmware_nowait err: %d.\n" , err); -complete_all (&fei->fw_ack); -return err; - }return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 74/312 net/mlx5: Make command timeout way shorter
In reply to Greg Kroah-HartmanFrom: Or Gerlitz <[email protected]>
commit 6b6c07bdcdc97ccac2596063bfc32a5faddfe884 upstream.
The command timeout is terribly long, whole two hours. Make it 60s so if things do go wrong, the user gets feedback in relatively short time, so they can take corrective actions and/or investigate using tools and such.
--- include/linux/mlx5/driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mlx5/driver.h +1 -1
@@ -54,7 +54,7 @@ enum {/* one minute for the sake of bringup. Generally, commands must always * complete and we may need to increase this timeout value */ -MLX5_CMD_TIMEOUT_MSEC =7200 *1000 , +MLX5_CMD_TIMEOUT_MSEC =60 *1000 , MLX5_CMD_WQ_MAX_NAME = 32, };
Greg Kroah-Hartman
maintainerPATCH 70/312 firmware: actually return NULL on failed request_firmware_nowait()
In reply to Greg Kroah-HartmanFrom: Brian Norris <[email protected]>
commit 715780ae4bb76d6fd2f20eb78e2a9ba9769a6cdc upstream.
The kerneldoc for request_firmware_nowait() says that it may call the provided cont() callback with @fw == NULL, if the firmware request fails. However, this is not the case when called with an empty string (""). This case is short-circuited by the 'name[0] == '\0'' check introduced in commit 471b095dfe0d ("firmware_class: make sure fw requests contain a name"), so _request_firmware() never gets to set the fw to NULL.
Noticed while using the new 'trigger_async_request' testing hook:
# printf '\x00' > /sys/devices/virtual/misc/test_firmware/trigger_async_request
[10553.726178] test_firmware: loading ''
[10553.729859] test_firmware: loaded: 995209091
# printf '\x00' > /sys/devices/virtual/misc/test_firmware/trigger_async_request
[10733.676184] test_firmware: loading ''
[10733.679855] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[10733.687951] pgd = ec188000
[10733.690655] [00000004] *pgd=00000000
[10733.694240] Internal error: Oops: 5 [#1] SMP ARM
[10733.698847] Modules linked in: btmrvl_sdio btmrvl bluetooth sbs_battery nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables asix usbnet mwifiex_sdio mwifiex cfg80211 jitterentropy_rng drbg joydev snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device ppp_async ppp_generic slhc tun
[10733.725670] CPU: 0 PID: 6600 Comm: bash Not tainted 4.4.0-rc4-00351-g63d0877 #178
[10733.733137] Hardware name: Rockchip (Device Tree)
[10733.737831] task: ed24f6c0 ti: ee322000 task.ti: ee322000
[10733.743222] PC is at do_raw_spin_lock+0x18/0x1a0
[10733.747831] LR is at _raw_spin_lock+0x18/0x1c
[10733.752180] pc : [<c00653a0>] lr : [<c054c204>] psr: a00d0013
[10733.752180] sp : ee323df8 ip : ee323e20 fp : ee323e1c
[10733.763634] r10: 00000051 r9 : b6f18000 r8 : ee323f80
[10733.768847] r7 : c089cebc r6 : 00000001 r5 : 00000000 r4 : ec0e6000
[10733.775360] r3 : dead4ead r2 : c06bd140 r1 : eef913b4 r0 : 00000000
[10733.781874] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[10733.788995] Control: 10c5387d Table: 2c18806a DAC: 00000051
[10733.794728] Process bash (pid: 6600, stack limit = 0xee322218)
[10733.800549] Stack: (0xee323df8 to 0xee324000)
[10733.804896] 3de0: ec0e6000 00000000
[10733.813059] 3e00: 00000001 c089cebc ee323f80 b6f18000 ee323e2c ee323e20 c054c204 c0065394
[10733.821221] 3e20: ee323e44 ee323e30 c02fec60 c054c1f8 ec0e7ec0 ec3fcfc0 ee323e5c ee323e48
[10733.829384] 3e40: c02fed08 c02fec48 c07dbf74 eeb05a00 ee323e8c ee323e60 c0253828 c02fecac
[10733.837547] 3e60: 00000001 c0116950 ee323eac ee323e78 00000001 ec3fce00 ed2d9700 ed2d970c
[10733.845710] 3e80: ee323e9c ee323e90 c02e873c c02537d4 ee323eac ee323ea0 c017bd40 c02e8720
[10733.853873] 3ea0: ee323ee4 ee323eb0 c017b250 c017bd00 00000000 00000000 f3e47a54 ec128b00
[10733.862035] 3ec0: c017b10c ee323f80 00000001 c000f504 ee322000 00000000 ee323f4c ee323ee8
[10733.870197] 3ee0: c011b71c c017b118 ee323fb0 c011bc90 becfa8d9 00000001 ec128b00 00000001
[10733.878359] 3f00: b6f18000 ee323f80 ee323f4c ee323f18 c011bc90 c0063950 ee323f3c ee323f28
[10733.886522] 3f20: c0063950 c0549138 00000001 ec128b00 00000001 ec128b00 b6f18000 ee323f80
[10733.894684] 3f40: ee323f7c ee323f50 c011bed8 c011b6ec c0135fb8 c0135f24 ec128b00 ec128b00
[10733.902847] 3f60: 00000001 b6f18000 c000f504 ee322000 ee323fa4 ee323f80 c011c664 c011be24
[10733.911009] 3f80: 00000000 00000000 00000001 b6f18000 b6e79be0 00000004 00000000 ee323fa8
[10733.919172] 3fa0: c000f340 c011c618 00000001 b6f18000 00000001 b6f18000 00000001 00000000
[10733.927334] 3fc0: 00000001 b6f18000 b6e79be0 00000004 00000001 00000001 8068a3f1 b6e79c84
[10733.935496] 3fe0: 00000000 becfa7dc b6de194d b6e20246 400d0030 00000001 7a4536e8 49bda390
[10733.943664] [<c00653a0>] (do_raw_spin_lock) from [<c054c204>] (_raw_spin_lock+0x18/0x1c)
[10733.951743] [<c054c204>] (_raw_spin_lock) from [<c02fec60>] (fw_free_buf+0x24/0x64)
[10733.959388] [<c02fec60>] (fw_free_buf) from [<c02fed08>] (release_firmware+0x68/0x74)
[10733.967207] [<c02fed08>] (release_firmware) from [<c0253828>] (trigger_async_request_store+0x60/0x124)
[10733.976501] [<c0253828>] (trigger_async_request_store) from [<c02e873c>] (dev_attr_store+0x28/0x34)
[10733.985533] [<c02e873c>] (dev_attr_store) from [<c017bd40>] (sysfs_kf_write+0x4c/0x58)
[10733.993437] [<c017bd40>] (sysfs_kf_write) from [<c017b250>] (kernfs_fop_write+0x144/0x1a8)
[10734.001689] [<c017b250>] (kernfs_fop_write) from [<c011b71c>] (__vfs_write+0x3c/0xe4)After this patch:
# printf '\x00' > /sys/devices/virtual/misc/test_firmware/trigger_async_request
[ 32.126322] test_firmware: loading ''
[ 32.129995] test_firmware: failed to async load firmware
-bash: printf: write error: No such device--- drivers/base/firmware_class.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/base/firmware_class.c +5 -3
@@ -1119,15 +1119,17 @@ static int _request_firmware(const struct firmware **firmware_p, const char *name, struct device *device, unsigned int opt_flags) { - struct firmware *fw; + struct firmware *fw = NULL;long timeout;int ret;if (!firmware_p)return -EINVAL ; -if (!name || name[0 ] =='\0' ) -return -EINVAL ; +if (!name || name[0 ] =='\0' ) { + ret = -EINVAL ; + goto out; + } ret =_request_firmware_prepare (&fw, name, device);if (ret <=0 )/* error or already assigned */
Greg Kroah-Hartman
maintainerPATCH 18/312 MIPS: Fix HTW config on XPA kernel without LPA enabled
In reply to Greg Kroah-HartmanFrom: James Hogan <[email protected]>
commit 14bc241443e126c62fcbf571b7d4c79740debc58 upstream.
The hardware page table walker (HTW) configuration is broken on XPA kernels where XPA couldn't be enabled (either nohtw or the hardware doesn't support it). This is because the PWSize.PTEW field (PTE width) was only set to 8 bytes (an extra shift of 1) in config_htw_params() if PageGrain.ELPA (enable large physical addressing) is set. On an XPA kernel though the size of PTEs is fixed at 8 bytes regardless of whether XPA could actually be enabled.
Fix the initialisation of this field based on sizeof(pte_t) instead.
Patchwork: https://patchwork.linux-mips.org/patch/13113/
--- arch/mips/mm/tlbex.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/mips/mm/tlbex.c +1 -3
@@ -2329,9 +2329,7 @@ static void config_htw_params(void)if (CONFIG_PGTABLE_LEVELS >=3 ) pwsize |=ilog2 (PTRS_PER_PMD ) <<MIPS_PWSIZE_MDW_SHIFT ; -/* If XPA has been enabled, PTEs are 64-bit in size. */ -if (config_enabled (CONFIG_64BITS ) || (read_c0_pagegrain () &PG_ELPA )) - pwsize |=1 ; + pwsize |=ilog2 (sizeof (pte_t)/4 ) <<MIPS_PWSIZE_PTEW_SHIFT ;write_c0_pwsize (pwsize);
Greg Kroah-Hartman
maintainerPATCH 27/312 MIPS: SMP: Update cpu_foreign_map on CPU disable
In reply to Greg Kroah-HartmanFrom: James Hogan <[email protected]>
commit 826e99be6ab5189dbfb096389016ffb8d20a683e upstream.
When a CPU is disabled via CPU hotplug, cpu_foreign_map is not updated. This could result in cache management SMP calls being sent to offline CPUs instead of online siblings in the same core.
Add a call to calculate_cpu_foreign_map() in the various MIPS cpu disable callbacks after set_cpu_online(). All cases are updated for consistency and to keep cpu_foreign_map strictly up to date, not just those which may support hardware multithreading.
Patchwork: https://patchwork.linux-mips.org/patch/13799/
--- arch/mips/cavium-octeon/smp.c | 1 + arch/mips/include/asm/smp.h | 2 ++ arch/mips/kernel/smp-bmips.c | 1 + arch/mips/kernel/smp-cps.c | 1 + arch/mips/kernel/smp.c | 2 +- arch/mips/loongson64/loongson-3/smp.c | 1 + 6 files changed, 7 insertions(+), 1 deletion(-)
arch/mips/cavium-octeon/smp.c +1 -0
@@ -239,6 +239,7 @@ static int octeon_cpu_disable(void)return -ENOTSUPP ;set_cpu_online (cpu, false); +calculate_cpu_foreign_map ();cpumask_clear_cpu (cpu, &cpu_callin_map);octeon_fixup_irqs ();
arch/mips/include/asm/smp.h +2 -0
@@ -63,6 +63,8 @@ extern cpumask_t cpu_coherent_mask; extern void asmlinkage smp_bootstrap(void); +extern void calculate_cpu_foreign_map (void ); +/* * this function sends a 'reschedule' IPI to another CPU. * it goes straight through and wastes no time serializing
arch/mips/kernel/smp-bmips.c +1 -0
@@ -362,6 +362,7 @@ static int bmips_cpu_disable(void)pr_info ("SMP: CPU%d is offline\n" , cpu);set_cpu_online (cpu, false); +calculate_cpu_foreign_map ();cpumask_clear_cpu (cpu, &cpu_callin_map);clear_c0_status (IE_IRQ5 );
arch/mips/kernel/smp-cps.c +1 -0
@@ -338,6 +338,7 @@ static int cps_cpu_disable(void)atomic_sub (1 <<cpu_vpe_id (¤t_cpu_data), &core_cfg->vpe_mask);smp_mb__after_atomic ();set_cpu_online (cpu, false); +calculate_cpu_foreign_map ();cpumask_clear_cpu (cpu, &cpu_callin_map);return 0 ;
arch/mips/kernel/smp.c +1 -1
@@ -118,7 +118,7 @@ static inline void set_cpu_core_map(int* Calculate a new cpu_foreign_map mask whenever a * new cpu appears or disappears. */ -static inline void calculate_cpu_foreign_map (void ) +void calculate_cpu_foreign_map (void ) {int i, k, core_present;cpumask_t temp_foreign_map;
arch/mips/loongson64/loongson-3/smp.c +1 -0
@@ -417,6 +417,7 @@ static int loongson3_cpu_disable(void)return -EBUSY ;set_cpu_online (cpu, false); +calculate_cpu_foreign_map ();cpumask_clear_cpu (cpu, &cpu_callin_map);local_irq_save (flags);fixup_irqs ();
Greg Kroah-Hartman
maintainerPATCH 58/312 net/mlx4_core: Do not BUG_ON during reset when PCI is offline
In reply to Greg Kroah-HartmanFrom: Daniel Jurgens <[email protected]>
commit 22e3817e6c8301dc0520b855c8a2d764580e719c upstream.
The PCI channel could go offline during reset due to EEH. Don't bug on in this case, the error is recoverable.
--- drivers/net/ethernet/mellanox/mlx4/catas.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx4/catas.c +9 -2
@@ -182,10 +182,17 @@ void mlx4_enter_error_state(struct mlx4_ err =mlx4_reset_slave (dev); else err =mlx4_reset_master (dev); -BUG_ON (err !=0 ); +if (!err) { +mlx4_err (dev,"device was reset successfully\n" ); + }else { +/* EEH could have disabled the PCI channel during reset. That's +* recoverable and the PCI error flow will handle it. +*/ +if (!pci_channel_offline (dev->persist->pdev)) +BUG_ON (1 ); + } dev->persist->state |=MLX4_DEVICE_STATE_INTERNAL_ERROR ; -mlx4_err (dev,"device was reset successfully\n" );mutex_unlock (&persist->device_state_mutex);/* At that step HW was already reset, now notify clients */
Greg Kroah-Hartman
maintainerPATCH 23/312 MIPS: perf: Fix I6400 event numbers
In reply to Greg Kroah-HartmanFrom: James Hogan <[email protected]>
commit fd716fca10fc3dc0f18b8c16d4ecfa6d93f010d2 upstream.
Fix perf hardware performance counter event numbers for I6400. This core does not follow the performance event numbering scheme of previous MIPS cores. All performance counters (both odd and even) are capable of counting any of the available events.
Patchwork: https://patchwork.linux-mips.org/patch/13259/
--- arch/mips/kernel/perf_event_mipsxx.c | 54 +++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-)
arch/mips/kernel/perf_event_mipsxx.c +52 -2
@@ -825,6 +825,16 @@ static const struct mips_perf_event mips [PERF_COUNT_HW_BRANCH_MISSES] = { 0x27, CNTR_ODD, T }, }; +static const struct mips_perf_event i6400_event_map[PERF_COUNT_HW_MAX ] = { + [PERF_COUNT_HW_CPU_CYCLES ] = {0x00 ,CNTR_EVEN |CNTR_ODD }, + [PERF_COUNT_HW_INSTRUCTIONS ] = {0x01 ,CNTR_EVEN |CNTR_ODD }, +/* These only count dcache, not icache */ + [PERF_COUNT_HW_CACHE_REFERENCES ] = {0x45 ,CNTR_EVEN |CNTR_ODD }, + [PERF_COUNT_HW_CACHE_MISSES ] = {0x48 ,CNTR_EVEN |CNTR_ODD }, + [PERF_COUNT_HW_BRANCH_INSTRUCTIONS ] = {0x15 ,CNTR_EVEN |CNTR_ODD }, + [PERF_COUNT_HW_BRANCH_MISSES ] = {0x16 ,CNTR_EVEN |CNTR_ODD }, +}; +static const struct mips_perf_event loongson3_event_map[PERF_COUNT_HW_MAX ] = { [PERF_COUNT_HW_CPU_CYCLES ] = {0x00 ,CNTR_EVEN }, [PERF_COUNT_HW_INSTRUCTIONS ] = {0x00 ,CNTR_ODD },
@@ -1015,6 +1025,46 @@ static const struct mips_perf_event mips }, }; +static const struct mips_perf_event i6400_cache_map + [PERF_COUNT_HW_CACHE_MAX ] + [PERF_COUNT_HW_CACHE_OP_MAX ] + [PERF_COUNT_HW_CACHE_RESULT_MAX ] = { +[C (L1D )] = { + [C (OP_READ )] = { + [C (RESULT_ACCESS )] = {0x46 ,CNTR_EVEN |CNTR_ODD }, + [C (RESULT_MISS )] = {0x49 ,CNTR_EVEN |CNTR_ODD }, + }, + [C (OP_WRITE )] = { + [C (RESULT_ACCESS )] = {0x47 ,CNTR_EVEN |CNTR_ODD }, + [C (RESULT_MISS )] = {0x4a ,CNTR_EVEN |CNTR_ODD }, + }, +}, +[C (L1I )] = { + [C (OP_READ )] = { + [C (RESULT_ACCESS )] = {0x84 ,CNTR_EVEN |CNTR_ODD }, + [C (RESULT_MISS )] = {0x85 ,CNTR_EVEN |CNTR_ODD }, + }, +}, +[C (DTLB )] = { +/* Can't distinguish read & write */ + [C (OP_READ )] = { + [C (RESULT_ACCESS )] = {0x40 ,CNTR_EVEN |CNTR_ODD }, + [C (RESULT_MISS )] = {0x41 ,CNTR_EVEN |CNTR_ODD }, + }, + [C (OP_WRITE )] = { + [C (RESULT_ACCESS )] = {0x40 ,CNTR_EVEN |CNTR_ODD }, + [C (RESULT_MISS )] = {0x41 ,CNTR_EVEN |CNTR_ODD }, + }, +}, +[C (BPU )] = { +/* Conditional branches / mispredicted */ + [C (OP_READ )] = { + [C (RESULT_ACCESS )] = {0x15 ,CNTR_EVEN |CNTR_ODD }, + [C (RESULT_MISS )] = {0x16 ,CNTR_EVEN |CNTR_ODD }, + }, +}, +}; +static const struct mips_perf_event loongson3_cache_map [PERF_COUNT_HW_CACHE_MAX ] [PERF_COUNT_HW_CACHE_OP_MAX ]
@@ -1720,8 +1770,8 @@ init_hw_perf_events(void)break ;case CPU_I6400 : mipspmu.name ="mips/I6400" ; - mipspmu.general_event_map = &mipsxxcore_event_map2; - mipspmu.cache_event_map = &mipsxxcore_cache_map2; + mipspmu.general_event_map = &i6400_event_map; + mipspmu.cache_event_map = &i6400_cache_map;break ;case CPU_1004K : mipspmu.name ="mips/1004K" ;
Greg Kroah-Hartman
maintainerPATCH 22/312 MIPS: math-emu: Fix m{add,sub}.s shifts
In reply to Greg Kroah-HartmanFrom: Paul Burton <[email protected]>
commit db57f29d50683afd75c7f8b9908af7669837c3a9 upstream.
The code in _sp_maddf (formerly ieee754sp_madd) appears to have been copied verbatim from ieee754sp_add, and although it's adding the unpacked "r" & "z" floats it kept using macros that operate on "x" & "y". This led to the addition being carried out incorrectly on some mismash of the product, accumulator & multiplicand fields. Typically this would lead to the assertions "ze == re" & "ze <= SP_EMAX" failing since ze & re hadn't been operated upon.
Patchwork: https://patchwork.linux-mips.org/patch/13159/
--- arch/mips/math-emu/ieee754sp.c | 3 ++- arch/mips/math-emu/ieee754sp.h | 16 +++++++--------- arch/mips/math-emu/sp_add.c | 6 ++++-- arch/mips/math-emu/sp_maddf.c | 13 ++++++++----- arch/mips/math-emu/sp_sub.c | 6 ++++-- 5 files changed, 25 insertions(+), 19 deletions(-)
arch/mips/math-emu/ieee754sp.c +2 -1
@@ -130,7 +130,8 @@ union ieee754sp ieee754sp_format(int sn, }else {/* sticky right shift es bits */ -SPXSRSXn (es); + xm =XSPSRS (xm, es); + xe += es;assert ((xm & (SP_HIDDEN_BIT <<3 )) ==0 );assert (xe ==SP_EMIN ); }
arch/mips/math-emu/ieee754sp.h +7 -9
@@ -46,19 +46,17 @@ static inline int ieee754sp_finite(union }/* 3bit extended single precision sticky right shift */ -#define SPXSRSXn (rs) \ - (xe += rs, \ - xm = (rs > (SP_FBITS+3))?1:((xm) >> (rs)) | ((xm) << (32-(rs)) != 0)) +#define XSPSRS (v, rs) \ + ((rs > (SP_FBITS+3))?1:((v) >> (rs)) | ((v) << (32-(rs)) != 0)) -#define SPXSRSX1 () \ - (xe++, (xm = (xm >> 1) | (xm & 1))) +#define XSPSRS1 (m) \ + ((m >> 1) | (m & 1)) -#define SPXSRSYn (rs) \ - (ye+=rs, \ - ym = (rs > (SP_FBITS+3))?1:((ym) >> (rs)) | ((ym) << (32-(rs)) != 0)) +#define SPXSRSX1 () \ + (xe++, (xm = XSPSRS1(xm)))#define SPXSRSY1 () \ - (ye++, (ym = (ym >> 1) | (ym & 1))) + (ye++, (ym = XSPSRS1(ym)))/* convert denormal to normalized with extended exponent */ #define SPDNORMx (m,e) \
arch/mips/math-emu/sp_add.c +4 -2
@@ -132,13 +132,15 @@ union ieee754sp ieee754sp_add(union ieee* Have to shift y fraction right to align. */ s = xe - ye; -SPXSRSYn (s); + ym =XSPSRS (ym, s); + ye += s; }else if (ye > xe) {/* * Have to shift x fraction right to align. */ s = ye - xe; -SPXSRSXn (s); + xm =XSPSRS (xm, s); + xe += s; }assert (xe == ye);assert (xe <=SP_EMAX );
arch/mips/math-emu/sp_maddf.c +8 -5
@@ -208,16 +208,18 @@ union ieee754sp ieee754sp_maddf(union ieif (ze > re) {/* -* Have to shift y fraction right to align. +* Have to shift r fraction right to align. */ s = ze - re; -SPXSRSYn (s); + rm =XSPSRS (rm, s); + re += s; }else if (re > ze) {/* -* Have to shift x fraction right to align. +* Have to shift z fraction right to align. */ s = re - ze; -SPXSRSYn (s); + zm =XSPSRS (zm, s); + ze += s; }assert (ze == re);assert (ze <=SP_EMAX );
@@ -230,7 +232,8 @@ union ieee754sp ieee754sp_maddf(union ie zm = zm + rm;if (zm >> (SP_FBITS +1 +3 )) {/* carry out */ -SPXSRSX1 (); + zm =XSPSRS1 (zm); + ze++; } }else {if (zm >= rm) {
arch/mips/math-emu/sp_sub.c +4 -2
@@ -134,13 +134,15 @@ union ieee754sp ieee754sp_sub(union ieee* have to shift y fraction right to align */ s = xe - ye; -SPXSRSYn (s); + ym =XSPSRS (ym, s); + ye += s; }else if (ye > xe) {/* * have to shift x fraction right to align */ s = ye - xe; -SPXSRSXn (s); + xm =XSPSRS (xm, s); + xe += s; }assert (xe == ye);assert (xe <=SP_EMAX );
Greg Kroah-Hartman
maintainerPATCH 57/312 dccp: limit sk_filter trim to payload
In reply to Greg Kroah-HartmanFrom: Willem de Bruijn <[email protected]>
commit 4f0c40d94461cfd23893a17335b2ab78ecb333c8 upstream.
Dccp verifies packet integrity, including length, at initial rcv in dccp_invalid_packet, later pulls headers in dccp_enqueue_skb.
A call to sk_filter in-between can cause __skb_pull to wrap skb->len. skb_copy_datagram_msg interprets this as a negative value, so (correctly) fails with EFAULT. The negative length is reported in ioctl SIOCINQ or possibly in a DCCP_WARN in dccp_close.
Introduce an sk_receive_skb variant that caps how small a filter program can trim packets, and call this in dccp with the header length. Excessively trimmed packets are now processed normally and queued for reception as 0B payloads.
--- include/net/sock.h | 8 +++++++- net/core/sock.c | 7 ++++--- net/dccp/ipv4.c | 2 +- net/dccp/ipv6.c | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-)
include/net/sock.h +7 -1
@@ -1651,7 +1651,13 @@ static inline void sock_put(struct sock*/ void sock_gen_put (struct sock *sk); -int sk_receive_skb (struct sock *sk,struct sk_buff *skb,const int nested); +int __sk_receive_skb (struct sock *sk,struct sk_buff *skb,const int nested, +unsigned int trim_cap); +static inline int sk_receive_skb (struct sock *sk,struct sk_buff *skb, +const int nested) +{ +return __sk_receive_skb (sk, skb, nested,1 ); +}static inline void sk_tx_queue_set (struct sock *sk,int tx_queue) {
net/core/sock.c +4 -3
@@ -484,11 +484,12 @@ int sock_queue_rcv_skb(struct sock *sk, }EXPORT_SYMBOL (sock_queue_rcv_skb); -int sk_receive_skb (struct sock *sk,struct sk_buff *skb,const int nested) +int __sk_receive_skb (struct sock *sk,struct sk_buff *skb, +const int nested,unsigned int trim_cap) {int rc =NET_RX_SUCCESS ; -if (sk_filter (sk, skb)) +if (sk_filter_trim_cap (sk, skb, trim_cap)) goto discard_and_relse; skb->dev =NULL ;
@@ -524,7 +525,7 @@ discard_and_relse:kfree_skb (skb); goto out; } -EXPORT_SYMBOL (sk_receive_skb); +EXPORT_SYMBOL (__sk_receive_skb);struct dst_entry *__sk_dst_check (struct sock *sk,u32 cookie) {
net/dccp/ipv4.c +1 -1
@@ -868,7 +868,7 @@ lookup: goto discard_and_relse;nf_reset (skb); -return sk_receive_skb (sk, skb,1 ); +return __sk_receive_skb (sk, skb,1 , dh->dccph_doff *4 ); no_dccp_socket:if (!xfrm4_policy_check (NULL ,XFRM_POLICY_IN , skb))
net/dccp/ipv6.c +1 -1
@@ -741,7 +741,7 @@ lookup:if (!xfrm6_policy_check (sk,XFRM_POLICY_IN , skb)) goto discard_and_relse; -return sk_receive_skb (sk, skb,1 ) ?-1 :0 ; +return __sk_receive_skb (sk, skb,1 , dh->dccph_doff *4 ) ?-1 :0 ; no_dccp_socket:if (!xfrm6_policy_check (NULL ,XFRM_POLICY_IN , skb))
Greg Kroah-Hartman
maintainerPATCH 43/312 ARM: dts: kirkwood: add kirkwood-ds112.dtb to Makefile
In reply to Greg Kroah-HartmanFrom: Heinrich Schuchardt <[email protected]>
commit fc5c796e12511a7c027b5a4438719dde2f796208 upstream.
Commit 2d0a7addbd10 ("ARM: Kirkwood: Add support for many Synology NAS devices") created the new file kirkwood-ds112.dts but did not add it to the Makefile.
--- arch/arm/boot/dts/Makefile | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/Makefile +1 -0
@@ -166,6 +166,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \ kirkwood-ds109.dtb \ kirkwood-ds110jv10.dtb \ kirkwood-ds111.dtb \ + kirkwood-ds112.dtb \ kirkwood-ds209.dtb \ kirkwood-ds210.dtb \ kirkwood-ds212.dtb \
Greg Kroah-Hartman
maintainerPATCH 41/312 ARM: dts: orion5x: fix the missing mtd flash on linkstation lswtgl
In reply to Greg Kroah-HartmanFrom: Roger Shimizu <[email protected]>
commit 44361a2cc13493fc41216d33bb9a562ec3a9cc4e upstream.
MTD flash stores u-boot and u-boot environment on linkstation lswtgl. The latter one can be easily read/write by u-boot-tools package in Debian.
--- arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+)
arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts +31 -0
@@ -228,6 +228,37 @@ }; }; +&devbus_bootcs { + status = "okay"; + devbus,keep-config; + + flash@0 { + compatible = "jedec-flash"; + reg = <0 0x40000>; + bank-width = <1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + header@0 { + reg = <0 0x30000>; + read-only; + }; + + uboot@30000 { + reg = <0x30000 0xF000>; + read-only; + }; + + uboot_env@3F000 { + reg = <0x3F000 0x1000>; + }; + }; + }; +}; + &mdio { status = "okay";
Greg Kroah-Hartman
maintainerPATCH 40/312 ARM: dts: orion5x: gpio pin fixes for linkstation lswtgl
In reply to Greg Kroah-HartmanFrom: Roger Shimizu <[email protected]>
commit ff61ee84e7aa5842d9e33c0b442f0b43a6a44eaf upstream.
Here're a few gpio pin related fixes:
- remove pinctrl-0 definition from pinctrl, since those pins are used in other places such as gpio-fan and regulators.
- keep initial state of power led
- fix for alarm pin of gpio-fan.
--- arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts +4 -4
@@ -1,7 +1,8 @@ /* * Device Tree file for Buffalo Linkstation LS-WTGL * - * Copyright (C) 2015, Roger Shimizu <[email protected]> + * Copyright (C) 2015, 2016 + * Roger Shimizu <[email protected]> * * This file is dual-licensed: you can use it either under the terms * of the GPL or the X11 license, at your option. Note that this dual
@@ -69,8 +70,6 @@ internal-regs { pinctrl: pinctrl@10000 { - pinctrl-0 = <&pmx_usb_power &pmx_power_hdd - &pmx_fan_low &pmx_fan_high &pmx_fan_lock>; pinctrl-names = "default"; pmx_led_power: pmx-leds {
@@ -162,6 +161,7 @@ led@1 { label = "lswtgl:blue:power"; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + default-state = "keep"; }; led@2 {
@@ -188,7 +188,7 @@ 3250 1 5000 0>; - alarm-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; + alarm-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; }; restart_poweroff {
Greg Kroah-Hartman
maintainerPATCH 37/312 ARM: dts: kirkwood: gpio pin fixes for linkstation ls-wvl/vl
In reply to Greg Kroah-HartmanFrom: Roger Shimizu <[email protected]>
commit 6f86e9adc53b4c0a2a4283692216d119019f0b8d upstream.
For kirkwood, gpio pins starts from 32 are in the 2nd bank, so it should be converted to "gpio1 <pin minus 32>" in dts file.
e.g. gpio 40 should be "gpio1 8"
The pin/bank issue was found when discussing Debian Bug #810894
[https://bugs.debian.org/810894#47]
--- arch/arm/boot/dts/kirkwood-lswvl.dts | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-)
arch/arm/boot/dts/kirkwood-lswvl.dts +13 -12
@@ -1,7 +1,8 @@ /* * Device Tree file for Buffalo Linkstation LS-WVL/VL * - * Copyright (C) 2015, [email protected] + * Copyright (C) 2015, 2016 + * Roger Shimizu <[email protected]> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License
@@ -156,21 +157,21 @@ button@1 { label = "Function Button"; linux,code = <KEY_OPTION>; - gpios = <&gpio0 45 GPIO_ACTIVE_LOW>; + gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; }; button@2 { label = "Power-on Switch"; linux,code = <KEY_RESERVED>; linux,input-type = <5>; - gpios = <&gpio0 46 GPIO_ACTIVE_LOW>; + gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; }; button@3 { label = "Power-auto Switch"; linux,code = <KEY_ESC>; linux,input-type = <5>; - gpios = <&gpio0 47 GPIO_ACTIVE_LOW>; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; };
@@ -185,38 +186,38 @@ led@1 { label = "lswvl:red:alarm"; - gpios = <&gpio0 36 GPIO_ACTIVE_LOW>; + gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; }; led@2 { label = "lswvl:red:func"; - gpios = <&gpio0 37 GPIO_ACTIVE_LOW>; + gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; }; led@3 { label = "lswvl:amber:info"; - gpios = <&gpio0 38 GPIO_ACTIVE_LOW>; + gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; }; led@4 { label = "lswvl:blue:func"; - gpios = <&gpio0 39 GPIO_ACTIVE_LOW>; + gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; }; led@5 { label = "lswvl:blue:power"; - gpios = <&gpio0 40 GPIO_ACTIVE_LOW>; + gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; default-state = "keep"; }; led@6 { label = "lswvl:red:hdderr0"; - gpios = <&gpio0 34 GPIO_ACTIVE_LOW>; + gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; }; led@7 { label = "lswvl:red:hdderr1"; - gpios = <&gpio0 35 GPIO_ACTIVE_LOW>; + gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; }; };
@@ -233,7 +234,7 @@ 3250 1 5000 0>; - alarm-gpios = <&gpio0 43 GPIO_ACTIVE_HIGH>; + alarm-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; }; restart_poweroff {
Greg Kroah-Hartman
maintainerPATCH 30/312 bpf, mips: fix off-by-one in ctx offset allocation
In reply to Greg Kroah-HartmanFrom: Daniel Borkmann <[email protected]>
commit b4e76f7e6d3200462c6354a6ad4ae167459e61f8 upstream.
Dan Carpenter reported [1] a static checker warning that ctx->offsets[] may be accessed off by one from build_body(), since it's allocated with fp->len * sizeof(*ctx.offsets) as length. The cBPF arm and ppc code doesn't have this issue as claimed, so only mips seems to be affected and should like most other JITs allocate with fp->len + 1. A few number of JITs (x86, sparc, arm64) handle this differently, where they only require fp->len array elements.
[1] http://www.spinics.net/lists/mips/msg64193.html
Patchwork: https://patchwork.linux-mips.org/patch/13814/
--- arch/mips/net/bpf_jit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/net/bpf_jit.c +1 -1
@@ -1207,7 +1207,7 @@ void bpf_jit_compile(struct bpf_prog *fpmemset (&ctx,0 ,sizeof (ctx)); - ctx.offsets =kcalloc (fp->len,sizeof (*ctx.offsets),GFP_KERNEL ); + ctx.offsets =kcalloc (fp->len +1 ,sizeof (*ctx.offsets),GFP_KERNEL );if (ctx.offsets ==NULL )return ;
Greg Kroah-Hartman
maintainerPATCH 35/312 ARM: imx: select SRC for i.MX7
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
commit f1858b0e801a45d801dc23bc1ff5be14805022c8 upstream.
The i.MX7 Kconfig option had a couple of missing select lines that I fixed already, but I missed HAVE_IMX_SRC:
arch/arm/mach-imx/built-in.o: In function `imx7d_init_irq':
platform-spi_imx.c:(.init.text+0x25a8): undefined reference to `imx_src_init'
This adds that one as well.
--- arch/arm/mach-imx/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-imx/Kconfig +1 -0
@@ -562,6 +562,7 @@ config SOC_IMX7D select ARM_GIC select HAVE_IMX_ANATOP select HAVE_IMX_MMDC + select HAVE_IMX_SRC help This enables support for Freescale i.MX7 Dual processor.
Greg Kroah-Hartman
maintainercover 4.4.223-rc1 review
This is the start of the stable review cycle for the 4.4.223 release. There are 312 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 10 May 2020 12:29:44 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.223-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 4.4.223-rc1
Thomas Pedersen <[email protected]>
mac80211: add ieee80211_is_any_nullfunc()
Takashi Iwai <[email protected]>
ALSA: hda: Match both PCI ID and SSID for driver blacklist
Jere Leppänen <[email protected]>
sctp: Fix SHUTDOWN CTSN Ack in the peer restart case
Herbert Xu <[email protected]>
macvlan: Fix potential use-after free for broadcasts
Florian Fainelli <[email protected]>
net: ep93xx_eth: Do not crash unloading module
Shmulik Ladkani <[email protected]>
net: skbuff: Remove errornous length validation in skb_vlan_pop()
Ivan Vecera <[email protected]>
bna: add missing per queue ethtool stat
Toshiaki Makita <[email protected]>
bridge: Fix problems around fdb entries pointing to the bridge device
Arend Van Spriel <[email protected]>
brcmfmac: restore stopping netdev queue when bus clogs up
Jaap Jan Meijer <[email protected]>
brcmfmac: add fallback for devices that do not report per-chain values
Laxman Dewangan <[email protected]>
pinctrl: tegra: Correctly check the supported configuration
Mans Rullgard <[email protected]>
ata: sata_dwc_460ex: remove incorrect locking
Neil Armstrong <[email protected]>
net: ethernet: davinci_emac: Fix platform_data overwrite
Aneesh Kumar K.V <[email protected]>
cxl: Fix DAR check & use REGION_ID instead of opencoding
Javier Martinez Canillas <[email protected]>
regulator: Try to resolve regulators supplies on registration
Sergei Shtylyov <[email protected]>
at803x: fix reset handling
Vivien Didelot <[email protected]>
net: dsa: mv88e6xxx: fix port VLAN maps
Charles Keepax <[email protected]>
regulator: core: Rely on regulator_dev_release to free constraints
Nicolas Schichan <[email protected]>
net: mv643xx_eth: fix packet corruption with TSO and tiny unaligned packets.
Nicolas Dichtel <[email protected]>
ovs/vxlan: fix rtnl notifications on iface deletion
Florian Fainelli <[email protected]>
net: ethoc: Fix early error paths
pravin shelar <[email protected]>
net: vxlan: lwt: Fix vxlan local traffic.
Arnd Bergmann <[email protected]>
mvpp2: use correct size for memset
Geert Uytterhoeven <[email protected]>
ravb: Add missing free_irq() call to ravb_close()
Cyrille Pitchen <[email protected]>
net: macb: replace macb_writel() call by queue_writel() to update queue ISR
Jisheng Zhang <[email protected]>
net: mvneta: fix trivial cut-off issue in mvneta_ethtool_update_stats
David Ahern <[email protected]>
net: icmp_route_lookup should use rt dev to determine L3 domain
Krzysztof Kozlowski <[email protected]>
hwrng: exynos - Disable runtime PM on driver unbind
Sabrina Dubroca <[email protected]>
l2tp: fix use-after-free during module unload
[email protected] <[email protected]>
net: ehea: avoid null pointer dereference
Vivien Didelot <[email protected]>
net: dsa: mv88e6xxx: enable SA learning on DSA ports
Nikolay Aleksandrov <[email protected]>
net: bridge: don't increment tx_dropped in br_do_proxy_arp
Johan Hovold <[email protected]>
net: hns: fix device reference leaks
Johan Hovold <[email protected]>
net: ethernet: ti: cpsw: fix secondary-emac probe error path
Johan Hovold <[email protected]>
net: ethernet: ti: cpsw: fix device and of_node leaks
Andrew Lunn <[email protected]>
net: ethernet: mvneta: Remove IFF_UNICAST_FLT which is not implemented
Neil Armstrong <[email protected]>
net: ethernet: davinci_emac: Fix devioctl while in fixed link
Florian Fainelli <[email protected]>
bnxt_en: Remove locking around txr->dev_state
Wei Yongjun <[email protected]>
net: axienet: Fix return value check in axienet_probe()
Eric Dumazet <[email protected]>
qdisc: fix a module refcount leak in qdisc_create_dflt()
Eric Dumazet <[email protected]>
bnxt: add a missing rcu synchronization
Nicolas Dichtel <[email protected]>
ovs/geneve: fix rtnl notifications on iface deletion
Johan Hovold <[email protected]>
net: ethernet: stmmac: dwmac-generic: fix probe error path
Eric Dumazet <[email protected]>
fq_codel: return non zero qlen in class dumps
Johan Hovold <[email protected]>
net: ethernet: stmmac: dwmac-rk: fix probe error path
Mathias Krause <[email protected]>
rtnl: reset calcit fptr in rtnl_unregister()
Johan Hovold <[email protected]>
net: ethernet: stmmac: dwmac-sti: fix probe error path
Florian Fainelli <[email protected]>
et131x: Fix logical vs bitwise check in et131x_tx_timeout()
David Ahern <[email protected]>
net: icmp6_send should use dst dev to determine L3 domain
Wei Yongjun <[email protected]>
tipc: fix the error handling in tipc_udp_enable()
Eric Dumazet <[email protected]>
macvtap: segmented packet is consumed
Wei Yongjun <[email protected]>
net: macb: add missing free_netdev() on error in macb_probe()
Jiri Benc <[email protected]>
cxgbi: fix uninitialized flowi6
Florian Fainelli <[email protected]>
net: bcmsysport: Device stats are unsigned long
Bert Kenward <[email protected]>
sfc: clear napi_hash state when copying channels
Andrew Rybchenko <[email protected]>
sfc: fix potential stack corruption from running past stat bitmask
Jiri Benc <[email protected]>
gre: reject GUE and FOU in collect metadata mode
Jiri Benc <[email protected]>
gre: build header correctly for collect metadata tunnels
Jiri Benc <[email protected]>
gre: do not assign header_ops in collect metadata mode
Nicolas Dichtel <[email protected]>
ovs/gre: fix rtnl notifications on iface deletion
Eric Dumazet <[email protected]>
net: bcmgenet: device stats are unsigned long
Petri Gynther <[email protected]>
net: bcmgenet: fix skb_len in bcmgenet_xmit_single()
Hariprasad Shenai <[email protected]>
cxgb4/cxgb4vf: Fixes regression in perf when tx vlan offload is disabled
Simon Horman <[email protected]>
openvswitch: update checksum in {push,pop}_mpls
Addy Ke <[email protected]>
spi: rockchip: modify DMA max burst to 1
Peter Ujfalusi <[email protected]>
dmaengine: edma: Add probe callback to edma_tptc_driver
Tahsin Erdogan <[email protected]>
dm: fix second blk_delay_queue() parameter to be in msec units not jiffies
Bartlomiej Zolnierkiewicz <[email protected]>
blk-mq: fix undefined behaviour in order_to_size()
Junxiao Bi <[email protected]>
gfs2: fix flock panic issue
Vivien Didelot <[email protected]>
net: dsa: mv88e6xxx: unlock DSA and CPU ports
Viresh Kumar <[email protected]>
Revert "cpufreq: Drop rwsem lock around CPUFREQ_GOV_POLICY_EXIT"
Marcin Nowakowski <[email protected]>
MIPS: perf: Remove incorrect odd/even counter handling for I6400
Tobias Jungel <[email protected]>
bonding: fix length of actor system
Andy Shevchenko <[email protected]>
ALSA: fm801: Initialize chip after IRQ handler is registered
Chuck Lever <[email protected]>
xprtrdma: Fix backchannel allocation of extra rpcrdma_reps
Eric Dumazet <[email protected]>
mlx4: do not call napi_schedule() without care
David Ahern <[email protected]>
ipv4: Fix table id reference in fib_sync_down_addr
Nicolas Dichtel <[email protected]>
vti6: fix input path
Mark Tomlinson <[email protected]>
net: Don't delete routes in different VRFs
David Ahern <[email protected]>
net: vrf: Fix dst reference counting
Marcin Niestroj <[email protected]>
power_supply: tps65217-charger: Fix NULL deref during property export
Liu Xiang <[email protected]>
power: bq27xxx_battery: Fix bq27541 AveragePower register address
Sasha Levin <[email protected]>
power: test_power: correctly handle empty writes
H. Nikolaus Schaller <[email protected]>
power: bq27xxx: fix register numbers of bq27500
H. Nikolaus Schaller <[email protected]>
power: bq27xxx: fix reading for bq27000 and bq27010
Peter Zijlstra <[email protected]>
sched/preempt: Fix preempt_count manipulations
Eric Dumazet <[email protected]>
pkt_sched: fq: use proper locking in fq_dump_stats()
Hadar Hen Zion <[email protected]>
net_sched: flower: Avoid dissection of unmasked keys
Peter Zijlstra <[email protected]>
sched/fair: Fix calc_cfs_shares() fixed point arithmetics width confusion
Elad Raz <[email protected]>
mlxsw: switchx2: Fix ethernet port initialization
Yotam Gigi <[email protected]>
mlxsw: switchx2: Fix misuse of hard_header_len
Moshe Shemesh <[email protected]>
net/mlx4_core: Fix QUERY FUNC CAP flags
Jack Morgenstein <[email protected]>
net/mlx4: Fix uninitialized fields in rule when adding promiscuous mode to device managed flow steering
Jack Morgenstein <[email protected]>
net/mlx4_en: Fix potential deadlock in port statistics flow
Jack Morgenstein <[email protected]>
net/mlx4_core: Do not access comm channel if it has not yet been initialized
Erez Shitrit <[email protected]>
net/mlx4_en: Process all completions in RX rings after port goes up
Jack Morgenstein <[email protected]>
net/mlx4_core: Fix the resource-type enum in res tracker to conform to FW spec
Alex Vesker <[email protected]>
net/mlx4_core: Check device state before unregistering it
Kamal Heib <[email protected]>
net/mlx4_en: Fix the return value of a failure in VLAN VID add/kill
Tariq Toukan <[email protected]>
net/mlx4_core: Fix access to uninitialized index
Eran Ben Elisha <[email protected]>
net/mlx4_core: Fix potential corruption in counters database
Daniel Borkmann <[email protected]>
bpf: fix map not being uncharged during map creation failure
Alexei Starovoitov <[email protected]>
bpf, trace: check event type in bpf_perf_event_read
Zi Shen Lim <[email protected]>
arm64: bpf: jit JMP_JSET_{X,K}Daniel Borkmann <[email protected]>
cls_bpf: reset class and reuse major in da
Laura Abbott <[email protected]>
clk: xgene: Don't call __pa on ioremaped address
Dong Aisheng <[email protected]>
clk: imx: clk-pllv3: fix incorrect handle of enet powerdown bit
Maxime Ripard <[email protected]>
clk: multiplier: Prevent the multiplier from under / over flowing
Tero Kristo <[email protected]>
clk: ti: omap3+: dpll: use non-locking version of clk_get_rate
Brian Norris <[email protected]>
clk: gpio: handle error codes for of_clk_get_parent_count()
Arnd Bergmann <[email protected]>
clk: st: avoid uninitialized variable use
Pablo Neira <[email protected]>
udp: restore UDPlite many-cast delivery
Liping Zhang <[email protected]>
netfilter: nft_dup: do not use sreg_dev if the user doesn't specify it
Liping Zhang <[email protected]>
netfilter: nf_tables: destroy the set if fail to add transaction
Liping Zhang <[email protected]>
netfilter: nft_dynset: fix panic if NFT_SET_HASH is not enabled
Liping Zhang <[email protected]>
netfilter: nf_tables: fix a wrong check to skip the inactive rules
David Ahern <[email protected]>
net: ipv6: Fix processing of RAs in presence of VRF
Nicolas Dichtel <[email protected]>
ipv6: add missing netconf notif when 'all' is updated
Eric Dumazet <[email protected]>
ipv6: do not abuse GFP_ATOMIC in inet6_netconf_notify_devconf()
Hannes Frederic Sowa <[email protected]>
ipv6: fix checksum annotation in udp6_csum_init
David Ahern <[email protected]>
net: vrf: Fix dev refcnt leak due to IPv6 prefix route
Eric Dumazet <[email protected]>
ipv4: accept u8 in IP_TOS ancillary data
Eric Dumazet <[email protected]>
ipv4: do not abuse GFP_ATOMIC in inet_netconf_notify_devconf()
Hannes Frederic Sowa <[email protected]>
ipv4: fix checksum annotation in udp4_csum_init
Alexander Duyck <[email protected]>
flow_dissector: Check for IP fragmentation even if not using IPv4 address
Alexander Duyck <[email protected]>
ipv4: Fix memory leak in exception case for splitting tries
Douglas Miller <[email protected]>
be2net: Don't leak iomapped memory on removal.
Stefan Wahren <[email protected]>
pinctrl: bcm2835: Fix memory leak in error path
Vince Hsu <[email protected]>
memory/tegra: Add number of TLB lines for Tegra124
Bart Van Assche <[email protected]>
target: Fix a memory leak in target_dev_lba_map_store()
Dan Carpenter <[email protected]>
qlcnic: use the correct ring in qlcnic_83xx_process_rcv_ring_diag()
Dan Carpenter <[email protected]>
qlcnic: potential NULL dereference in qlcnic_83xx_get_minidump_template()
Dan Carpenter <[email protected]>
qede: uninitialized variable in qede_start_xmit()
Dan Carpenter <[email protected]>
i40e: fix an uninitialized variable bug
Dan Carpenter <[email protected]>
power: ipaq-micro-battery: freeing the wrong variable
Dan Carpenter <[email protected]>
ethernet: micrel: fix some error codes
Dan Carpenter <[email protected]>
mfd: lp8788-irq: Uninitialized variable in irq handler
Dan Carpenter <[email protected]>
net: moxa: fix an error code
Dan Carpenter <[email protected]>
VFIO: platform: reset: fix a warning message condition
Dan Carpenter <[email protected]>
ath9k_htc: check for underflow in ath9k_htc_rx_msg()
Dan Carpenter <[email protected]>
cx23885: uninitialized variable in cx23885_av_work_handler()
Dan Carpenter <[email protected]>
am437x-vpfe: fix an uninitialized variable bug
Alexey Khoroshilov <[email protected]>
lirc_imon: do not leave imon_probe() with mutex held
Russell King <[email protected]>
rc: allow rc modules to be loaded if rc-main is not a module
Doug Berger <[email protected]>
net: systemport: suppress warnings on failed Rx SKB allocations
Doug Berger <[email protected]>
net: bcmgenet: suppress warnings on failed Rx SKB allocations
Nathan Chancellor <[email protected]>
lib/mpi: Fix building for powerpc with clang
Jeremie Francois (on alpha) <[email protected]>
scripts/config: allow colons in option strings for sed
Ronnie Sahlberg <[email protected]>
cifs: protect updating server->dstaddr with a spinlock
Xiyu Yang <[email protected]>
wimax/i2400m: Fix potential urb refcnt leak
Tyler Hicks <[email protected]>
selftests/ipc: Fix test failure seen after initial test run
YueHaibing <[email protected]>
iio:ad7797: Use correct attribute_group
Dan Carpenter <[email protected]>
mdio-sun4i: oops in error handling in probe
Robin Murphy <[email protected]>
iommu/dma: Respect IOMMU aperture when allocating
David Rivshin <[email protected]>
drivers: net: cpsw: don't ignore phy-mode if phy-handle is used
Johan Hovold <[email protected]>
net: dsa: slave: fix of-node leak and phy priority
Roosen Henri <[email protected]>
phy: micrel: Fix finding PHY properties in MAC node for KSZ9031.
Johan Hovold <[email protected]>
of_mdio: fix node leak in of_phy_register_fixed_link error path
Florian Fainelli <[email protected]>
net: phy: bcm7xxx: Fix shadow mode 2 disabling
Florian Fainelli <[email protected]>
net: phy: Fix phy_mac_interrupt()
Florian Fainelli <[email protected]>
net: phy: Avoid polling PHY with PHY_IGNORE_INTERRUPTS
Dan Carpenter <[email protected]>
NFC: nci: memory leak in nci_core_conn_create()
Chuck Lever <[email protected]>
sunrpc: Update RPCBIND_MAXNETIDLEN
Xin Long <[email protected]>
sctp: fix the transports round robin issue when init is retransmitted
Mahesh Salgaonkar <[email protected]>
powerpc/book3s: Fix MCE console messages for unrecoverable MCE.
Michael Neuling <[email protected]>
powerpc/tm: Fix stack pointer corruption in __tm_recheckpoint()
Naveen N. Rao <[email protected]>
perf tools: Fix perf regs mask generation
Adrian Hunter <[email protected]>
mmc: sdhci: Fix regression setting power on Trats2 board
Nicholas Mc Guire <[email protected]>
mmc: moxart: fix wait_for_completion_interruptible_timeout return variable type
Douglas Anderson <[email protected]>
mmc: dw_mmc: rockchip: Set the drive phase properly
Douglas Anderson <[email protected]>
clk: rockchip: Revert "clk: rockchip: reset init state before mmc card initialization"
Olof Johansson <[email protected]>
mmc: block: return error on failed mmc_blk_get()
Chuanxiao Dong <[email protected]>
mmc: debugfs: correct wrong voltage value
Russell King <[email protected]>
mmc: sd: limit SD card power limit according to cards capabilities
Jisheng Zhang <[email protected]>
mmc: sdhci: restore behavior when setting VDD via external regulator
Andy Shevchenko <[email protected]>
Revert "ACPI / LPSS: allow to use specific PM domain during ->probe()"
Maciej S. Szmigiero <[email protected]>
ASoC: fsl_ssi: mark SACNT register volatile
Sudip Mukherjee <[email protected]>
ASoC: tegra_alc5632: check return value
Dan Carpenter <[email protected]>
ASoC: Intel: pass correct parameter in sst_alloc_stream_mrfld()
Robert Jarzmik <[email protected]>
mtd: nand: pxa3xx_nand: fix dmaengine initialization
Boris Brezillon <[email protected]>
mtd: nand: denali: add missing nand_release() call in denali_remove()
Eric Dumazet <[email protected]>
net: get rid of an signed integer overflow in ip_idents_reserve()
Chuck Lever <[email protected]>
NFS: Fix an LOCK/OPEN race when unlinking an open file
Ilan Peer <[email protected]>
mac80211: Fix BW upgrade for TDLS peers
Arik Nemtsov <[email protected]>
mac80211: TDLS: change BW calculation for WIDER_BW peers
Arik Nemtsov <[email protected]>
mac80211: TDLS: always downgrade invalid chandefs
Johannes Berg <[email protected]>
mac80211: fix mgmt-tx abort cookie and leak
Ilan Tayari <[email protected]>
xfrm: Fix memory leak of aead algorithm name
Mathias Krause <[email protected]>
xfrm_user: propagate sec ctx allocation errors
Alexey Kodanev <[email protected]>
net/xfrm_input: fix possible NULL deref of tunnel.ip6->parms.i_key
Philipp Zabel <[email protected]>
Input: edt-ft5x06 - fix setting gain, offset, and threshold via device tree
Dmitry Torokhov <[email protected]>
Input: gpio-keys - fix check for disabling unsupported keys
Dan Carpenter <[email protected]>
Btrfs: clean up an error code in btrfs_init_space_info()
William Breathitt Gray <[email protected]>
isa: Call isa_bus_init before dependent ISA bus drivers register
Olaf Hering <[email protected]>
Drivers: hv: utils: use memdup_user in hvt_op_write
Krzysztof Kozlowski <[email protected]>
serial: samsung: Fix possible out of bounds access on non-DT platform
Stephen Boyd <[email protected]>
tty: serial: msm: Support more bauds
Simon Wunderlich <[email protected]>
batman-adv: replace WARN with rate limited output on non-existing VLAN
Sven Eckelmann <[email protected]>
batman-adv: Fix lockdep annotation of batadv_tlv_container_remove
David Ahern <[email protected]>
net: ipv6: tcp reset, icmp need to consider L3 domain
Sowmini Varadhan <[email protected]>
RDS:TCP: Synchronize rds_tcp_accept_one with rds_send_xmit when resetting t_sock
Eric Dumazet <[email protected]>
tcp: do not set rtt_min to 1
Johannes Weiner <[email protected]>
net: tcp_memcontrol: properly detect ancestor socket pressure
Yotam Gigi <[email protected]>
mlxsw: spectrum: Fix misuse of hard_header_len
Ido Schimmel <[email protected]>
mlxsw: spectrum: Indicate support for autonegotiation
Nogah Frankel <[email protected]>
mlxsw: spectrum: Don't count internal TX header bytes to stats
Ido Schimmel <[email protected]>
mlxsw: spectrum: Disable learning according to STP state
Ido Schimmel <[email protected]>
mlxsw: spectrum: Don't forward packets when STP state is DISABLED
Honggang Li <[email protected]>
RDMA/cxgb3: device driver frees DMA memory with different size
Chuck Lever <[email protected]>
xprtrdma: rpcrdma_bc_receive_call() should init rq_private_buf.len
Chuck Lever <[email protected]>
xprtrdma: xprt_rdma_free() must not release backchannel reqs
Chuck Lever <[email protected]>
xprtrdma: Fix additional uses of spin_lock_irqsave(rb_lock)
Dan Carpenter <[email protected]>
xprtrdma: checking for NULL instead of IS_ERR()
Raja Mani <[email protected]>
ath10k: free cached fw bin contents when get board id fails
Boris Brezillon <[email protected]>
mtd: nand: fix ONFI parameter page layout
Eric Dumazet <[email protected]>
bonding: prevent out of bound accesses
Johan Hovold <[email protected]>
phy: fix device reference leaks
[email protected] <[email protected]>
irda: Free skb on irda_accept error path.
Jiri Kosina <[email protected]>
btrfs: cleaner_kthread() doesn't need explicit freeze
WANG Cong <[email protected]>
sch_tbf: update backlog as well
WANG Cong <[email protected]>
sch_sfb: keep backlog updated with qlen
WANG Cong <[email protected]>
sch_qfq: keep backlog updated with qlen
WANG Cong <[email protected]>
sch_prio: update backlog as well
WANG Cong <[email protected]>
sch_hfsc: always keep backlog updated
WANG Cong <[email protected]>
sch_drr: update backlog as well
WANG Cong <[email protected]>
net_sched: keep backlog updated with qlen
Matthew Finlay <[email protected]>
net/mlx5e: Copy all L2 headers into inline segment
Mohamad Haj Yahia <[email protected]>
net/mlx5: Fix pci error recovery flow
Mohamad Haj Yahia <[email protected]>
net/mlx5: Add timeout handle to commands with callback
Mohamad Haj Yahia <[email protected]>
net/mlx5: Fix potential deadlock in command mode change
Daniel Jurgens <[email protected]>
net/mlx5: Fix wait_vital for VFs and remove fixed sleep
Mohamad Haj Yahia <[email protected]>
net/mlx5: Avoid calling sleeping function by the health poll thread
Wang Sheng-Hui <[email protected]>
net/mlx5: use mlx5_buf_alloc_node instead of mlx5_buf_alloc in mlx5_wq_ll_create
Eli Cohen <[email protected]>
net/mlx5e: Fix blue flame quota logic
Majd Dibbiny <[email protected]>
net/mlx5: Fix masking of reserved bits in XRCD number
Majd Dibbiny <[email protected]>
net/mlx5: Fix the size of modify QP mailbox
Rana Shahout <[email protected]>
net/mlx5e: Fix MLX5E_100BASE_T define
Eran Ben Elisha <[email protected]>
IB/mlx5: Fix FW version diaplay in sysfs
Or Gerlitz <[email protected]>
net/mlx5: Make command timeout way shorter
Leon Romanovsky <[email protected]>
IB/mlx5: Fix RC transport send queue overhead computation
Noa Osherovich <[email protected]>
net/mlx5: Avoid passing dma address 0 to firmware
Peter Griffin <[email protected]>
c8sectpfe: Rework firmware loading mechanism
Brian Norris <[email protected]>
firmware: actually return NULL on failed request_firmware_nowait()
Alexey Kardashevskiy <[email protected]>
powerpc/pci/of: Parse unassigned resources
Alexander Duyck <[email protected]>
GRE: Disable segmentation offloads w/ CSUM and we are encapsulated via FOU
Nicolas Dichtel <[email protected]>
ovs/gre,geneve: fix error path when creating an iface
Matan Barak <[email protected]>
IB/mlx4: Initialize hop_limit when creating address handle
Ido Schimmel <[email protected]>
mlxsw: Treat local port 64 as valid
Franky Lin <[email protected]>
brcmfmac: add eth_type_trans back for PCIe full dongle
Alex Williamson <[email protected]>
vfio/pci: Allow VPD short read
Bjorn Helgaas <[email protected]>
alpha/PCI: Call iomem_is_exclusive() for IORESOURCE_MEM, but not IORESOURCE_IO
Daniel Jurgens <[email protected]>
net/mlx4_core: Implement pci_resume callback
Bjorn Helgaas <[email protected]>
PCI: Supply CPU physical address (not bus address) to iomem_is_exclusive()
Ido Schimmel <[email protected]>
mlxsw: pci: Correctly determine if descriptor queue is full
Daniel Jurgens <[email protected]>
net/mlx4_core: Do not BUG_ON during reset when PCI is offline
Willem de Bruijn <[email protected]>
dccp: limit sk_filter trim to payload
Chin-Ran Lo <[email protected]>
Bluetooth: btmrvl: fix hung task warning dump
Emmanuel Grumbach <[email protected]>
iwlwifi: set max firmware version of 7265 to 17
Amitkumar Karwar <[email protected]>
mwifiex: add missing check for PCIe8997 chipset
chunfan chen <[email protected]>
mwifiex: fix IBSS data path issue.
Vegard Nossum <[email protected]>
xfrm: fix crash in XFRM_MSG_GETSA netlink handler
Pablo Neira Ayuso <[email protected]>
netfilter: nfnetlink: use original skbuff when acking batches
Andy Shevchenko <[email protected]>
ALSA: fm801: detect FM-only card earlier
Andy Shevchenko <[email protected]>
ALSA: fm801: propagate TUNER_ONLY bit when autodetected
Andy Shevchenko <[email protected]>
ALSA: fm801: explicitly free IRQ line
Dan Carpenter <[email protected]>
x86/apic/uv: Silence a shift wrapping warning
Jan Beulich <[email protected]>
x86/LDT: Print the real LDT base address
Stephane Eranian <[email protected]>
perf/x86: Fix filter_events() bug with event mappings
Suman Anna <[email protected]>
ARM: OMAP2+: hwmod: fix _idle() hwmod state sanity check sequence
Heinrich Schuchardt <[email protected]>
ARM: dts: kirkwood: add kirkwood-ds112.dtb to Makefile
Heinrich Schuchardt <[email protected]>
ARM: dts: kirkwood: use unique machine name for ds112
Roger Shimizu <[email protected]>
ARM: dts: orion5x: fix the missing mtd flash on linkstation lswtgl
Roger Shimizu <[email protected]>
ARM: dts: orion5x: gpio pin fixes for linkstation lswtgl
Roger Shimizu <[email protected]>
ARM: dts: kirkwood: gpio-leds fixes for linkstation ls-wvl/vl
Roger Shimizu <[email protected]>
ARM: dts: kirkwood: gpio-leds fixes for linkstation ls-wxl/wsxl
Roger Shimizu <[email protected]>
ARM: dts: kirkwood: gpio pin fixes for linkstation ls-wvl/vl
Roger Shimizu <[email protected]>
ARM: dts: kirkwood: gpio pin fixes for linkstation ls-wxl/wsxl
Arnd Bergmann <[email protected]>
ARM: imx: select SRC for i.MX7
Geert Uytterhoeven <[email protected]>
ARM: dts: armadillo800eva Correct extal1 frequency to 24 MHz
Hidehiro Kawai <[email protected]>
mips/panic: replace smp_send_stop() with kdump friendly version in panic path
James Hogan <[email protected]>
MIPS: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO
Dan Carpenter <[email protected]>
MIPS: RM7000: Double locking bug in rm7k_tc_disable()
Daniel Borkmann <[email protected]>
bpf, mips: fix off-by-one in ctx offset allocation
Dan Carpenter <[email protected]>
MIPS: Octeon: Off by one in octeon_irq_gpio_map()
James Hogan <[email protected]>
MIPS: c-r4k: Fix protected_writeback_scache_line for EVA
James Hogan <[email protected]>
MIPS: SMP: Update cpu_foreign_map on CPU disable
James Hogan <[email protected]>
MIPS: KVM: Fix translation of MFC0 ErrCtl
James Hogan <[email protected]>
MIPS: Fix little endian microMIPS MSA encodings
James Hogan <[email protected]>
MIPS: Fix 64-bit HTW configuration
James Hogan <[email protected]>
MIPS: perf: Fix I6400 event numbers
Paul Burton <[email protected]>
MIPS: math-emu: Fix m{add,sub}.s shifts
Paul Burton <[email protected]>
MIPS: Fix BC1{EQ,NE}Z return offset calculation
Paul Burton <[email protected]>
MIPS: math-emu: Fix BC1{EQ,NE}Z emulation
Florian Fainelli <[email protected]>
MIPS: BMIPS: Adjust mips-hpt-frequency for BCM7435
James Hogan <[email protected]>
MIPS: Fix HTW config on XPA kernel without LPA enabled
Florian Fainelli <[email protected]>
MIPS: BMIPS: Pretty print BMIPS5200 processor name
Florian Fainelli <[email protected]>
MIPS: BMIPS: local_r4k___flush_cache_all needs to blast S-cache
Florian Fainelli <[email protected]>
MIPS: BMIPS: Clear MIPS_CACHE_ALIASES earlier
Florian Fainelli <[email protected]>
MIPS: BMIPS: BMIPS5000 has I cache filing from D cache
Matt Redfearn <[email protected]>
MIPS: scall: Handle seccomp filters which redirect syscalls
Paul Burton <[email protected]>
MIPS: smp-cps: Stop printing EJTAG exceptions to UART
Florian Fainelli <[email protected]>
MIPS: BMIPS: Fix PRID_IMP_BMIPS5000 masking for BMIPS5200
James Hogan <[email protected]>
MIPS: ptrace: Drop cp0_tcstatus from regoffset_table[]
Jaedon Shin <[email protected]>
MIPS: Fix macro typo
Felipe Balbi <[email protected]>
usb: gadget: udc: core: don't starve DMA resources
Iago Abal <[email protected]>
usb: gadget: pch_udc: reorder spin_[un]lock to avoid deadlock
Andy Shevchenko <[email protected]>
usb: gadged: pch_udc: get rid of redundant assignments
Krzysztof Opasiak <[email protected]>
usb: gadget: f_acm: Fix configfs attr name
Ben Hutchings <[email protected]>
staging: rtl8192u: Fix crash due to pointers being "confusing"
Vasily Averin <[email protected]>
drm/qxl: qxl_release leak in qxl_draw_dirty_fb()
Vasily Averin <[email protected]>
drm/qxl: qxl_release use after free
Amitkumar Karwar <[email protected]>
mwifiex: fix PCIe register information for 8997 chipset
-------------
Diffstat:
Makefile | 4 +- arch/alpha/kernel/pci-sysfs.c | 4 +- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/kirkwood-ds112.dts | 2 +- arch/arm/boot/dts/kirkwood-lswvl.dts | 25 +-- arch/arm/boot/dts/kirkwood-lswxl.dts | 31 ++-- arch/arm/boot/dts/orion5x-linkstation-lswtgl.dts | 39 ++++- arch/arm/boot/dts/r8a7740-armadillo800eva.dts | 2 +- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-omap2/omap_hwmod.c | 12 +- arch/arm64/net/bpf_jit_comp.c | 1 + arch/mips/boot/dts/brcm/bcm7435.dtsi | 2 +- arch/mips/cavium-octeon/octeon-irq.c | 2 +- arch/mips/cavium-octeon/setup.c | 14 ++ arch/mips/cavium-octeon/smp.c | 1 + arch/mips/include/asm/asmmacro.h | 99 ++++++------ arch/mips/include/asm/elf.h | 1 + arch/mips/include/asm/kexec.h | 1 + arch/mips/include/asm/msa.h | 21 +-- arch/mips/include/asm/r4kcache.h | 4 + arch/mips/include/asm/smp.h | 2 + arch/mips/include/uapi/asm/auxvec.h | 2 + arch/mips/kernel/bmips_vec.S | 9 +- arch/mips/kernel/branch.c | 18 +-- arch/mips/kernel/cps-vec.S | 1 - arch/mips/kernel/cpu-probe.c | 5 +- arch/mips/kernel/crash.c | 18 ++- arch/mips/kernel/machine_kexec.c | 1 + arch/mips/kernel/perf_event_mipsxx.c | 60 ++++++- arch/mips/kernel/ptrace.c | 3 - arch/mips/kernel/scall32-o32.S | 11 +- arch/mips/kernel/scall64-64.S | 3 +- arch/mips/kernel/scall64-n32.S | 14 +- arch/mips/kernel/scall64-o32.S | 14 +- arch/mips/kernel/setup.c | 2 +- arch/mips/kernel/smp-bmips.c | 1 + arch/mips/kernel/smp-cps.c | 1 + arch/mips/kernel/smp.c | 2 +- arch/mips/kvm/dyntrans.c | 2 +- arch/mips/loongson64/loongson-3/smp.c | 1 + arch/mips/math-emu/cp1emu.c | 11 +- arch/mips/math-emu/ieee754sp.c | 3 +- arch/mips/math-emu/ieee754sp.h | 16 +- arch/mips/math-emu/sp_add.c | 6 +- arch/mips/math-emu/sp_maddf.c | 13 +- arch/mips/math-emu/sp_sub.c | 6 +- arch/mips/mm/c-r4k.c | 13 +- arch/mips/mm/sc-rm7k.c | 2 +- arch/mips/mm/tlbex.c | 16 +- arch/mips/net/bpf_jit.c | 2 +- arch/powerpc/kernel/mce.c | 3 +- arch/powerpc/kernel/pci_of_scan.c | 12 +- arch/powerpc/kernel/tm.S | 3 +- arch/powerpc/platforms/powernv/opal.c | 1 + arch/x86/kernel/apic/x2apic_uv_x.c | 4 +- arch/x86/kernel/cpu/perf_event.c | 11 +- arch/x86/kernel/process_64.c | 2 +- block/blk-mq.c | 2 +- drivers/acpi/acpi_lpss.c | 8 +- drivers/ata/sata_dwc_460ex.c | 4 +- drivers/base/firmware_class.c | 8 +- drivers/base/isa.c | 2 +- drivers/bluetooth/btmrvl_sdio.c | 3 +- drivers/char/hw_random/exynos-rng.c | 9 ++ drivers/clk/clk-gpio.c | 6 +- drivers/clk/clk-multiplier.c | 20 ++- drivers/clk/clk-xgene.c | 10 +- drivers/clk/imx/clk-pllv3.c | 8 +- drivers/clk/rockchip/clk-mmc-phase.c | 11 -- drivers/clk/st/clkgen-fsyn.c | 17 +- drivers/clk/ti/dpll3xxx.c | 3 +- drivers/cpufreq/cpufreq.c | 5 - drivers/dma/edma.c | 6 + drivers/gpu/drm/qxl/qxl_cmd.c | 5 +- drivers/gpu/drm/qxl/qxl_display.c | 6 +- drivers/gpu/drm/qxl/qxl_draw.c | 13 +- drivers/gpu/drm/qxl/qxl_ioctl.c | 5 +- drivers/hv/hv_utils_transport.c | 9 +- drivers/iio/adc/ad7793.c | 2 +- drivers/infiniband/hw/cxgb3/cxio_hal.c | 2 +- drivers/infiniband/hw/mlx4/ah.c | 1 + drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/infiniband/hw/mlx5/qp.c | 12 +- drivers/input/keyboard/gpio_keys.c | 29 +++- drivers/input/touchscreen/edt-ft5x06.c | 18 ++- drivers/iommu/dma-iommu.c | 11 +- drivers/md/dm.c | 2 +- drivers/media/pci/cx23885/cx23885-av.c | 2 +- drivers/media/platform/am437x/am437x-vpfe.c | 2 +- .../media/platform/sti/c8sectpfe/c8sectpfe-core.c | 65 +++----- drivers/media/rc/rc-main.c | 2 +- drivers/memory/tegra/tegra124.c | 1 + drivers/mfd/lp8788-irq.c | 2 +- drivers/misc/cxl/fault.c | 2 +- drivers/mmc/card/block.c | 4 +- drivers/mmc/core/debugfs.c | 2 +- drivers/mmc/core/sd.c | 20 ++- drivers/mmc/host/dw_mmc-rockchip.c | 64 ++++++++ drivers/mmc/host/moxart-mmc.c | 5 +- drivers/mmc/host/sdhci-pxav3.c | 22 +++ drivers/mmc/host/sdhci.c | 44 +++-- drivers/mmc/host/sdhci.h | 4 + drivers/mtd/nand/denali.c | 11 +- drivers/mtd/nand/pxa3xx_nand.c | 2 +- drivers/net/bonding/bond_3ad.c | 11 +- drivers/net/bonding/bond_alb.c | 7 +- drivers/net/bonding/bond_netlink.c | 3 +- drivers/net/dsa/mv88e6xxx.c | 9 +- drivers/net/ethernet/agere/et131x.c | 2 +- drivers/net/ethernet/broadcom/bcmsysport.c | 5 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 11 +- drivers/net/ethernet/brocade/bna/bnad_ethtool.c | 7 +- drivers/net/ethernet/cadence/macb.c | 4 +- drivers/net/ethernet/chelsio/cxgb4/sge.c | 2 +- drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 2 +- drivers/net/ethernet/cirrus/ep93xx_eth.c | 4 + drivers/net/ethernet/emulex/benet/be.h | 1 + drivers/net/ethernet/emulex/benet/be_main.c | 4 + drivers/net/ethernet/ethoc.c | 10 +- drivers/net/ethernet/hisilicon/hns/hnae.c | 8 +- drivers/net/ethernet/ibm/ehea/ehea_main.c | 9 +- drivers/net/ethernet/intel/i40e/i40e_hmc.c | 2 +- drivers/net/ethernet/marvell/mv643xx_eth.c | 4 +- drivers/net/ethernet/marvell/mvneta.c | 11 +- drivers/net/ethernet/marvell/mvpp2.c | 2 +- drivers/net/ethernet/mellanox/mlx4/catas.c | 11 +- drivers/net/ethernet/mellanox/mlx4/cmd.c | 9 ++ drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 28 +++- drivers/net/ethernet/mellanox/mlx4/en_port.c | 4 +- drivers/net/ethernet/mellanox/mlx4/fw.c | 5 +- drivers/net/ethernet/mellanox/mlx4/fw.h | 2 +- drivers/net/ethernet/mellanox/mlx4/intf.c | 3 + drivers/net/ethernet/mellanox/mlx4/main.c | 39 +++-- drivers/net/ethernet/mellanox/mlx4/mcg.c | 11 +- drivers/net/ethernet/mellanox/mlx4/mlx4.h | 5 +- drivers/net/ethernet/mellanox/mlx4/port.c | 13 +- .../net/ethernet/mellanox/mlx4/resource_tracker.c | 10 +- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 117 ++++++++------ drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 8 +- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 7 +- drivers/net/ethernet/mellanox/mlx5/core/health.c | 11 +- drivers/net/ethernet/mellanox/mlx5/core/main.c | 84 +++++----- .../net/ethernet/mellanox/mlx5/core/pagealloc.c | 26 ++- drivers/net/ethernet/mellanox/mlx5/core/qp.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/wq.c | 15 +- drivers/net/ethernet/mellanox/mlxsw/pci.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/port.h | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 11 +- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 4 +- drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 3 +- drivers/net/ethernet/micrel/ks8842.c | 10 +- drivers/net/ethernet/moxa/moxart_ether.c | 4 +- drivers/net/ethernet/qlogic/qede/qede_main.c | 2 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 2 +- .../net/ethernet/qlogic/qlcnic/qlcnic_minidump.c | 8 +- drivers/net/ethernet/renesas/ravb_main.c | 2 + drivers/net/ethernet/sfc/ef10.c | 3 +- drivers/net/ethernet/sfc/efx.c | 3 + .../net/ethernet/stmicro/stmmac/dwmac-generic.c | 12 +- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 11 +- drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 11 +- drivers/net/ethernet/ti/cpsw-phy-sel.c | 3 + drivers/net/ethernet/ti/cpsw.c | 14 +- drivers/net/ethernet/ti/davinci_emac.c | 7 +- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 +- drivers/net/geneve.c | 14 +- drivers/net/macvlan.c | 10 +- drivers/net/macvtap.c | 2 +- drivers/net/phy/at803x.c | 6 +- drivers/net/phy/bcm7xxx.c | 2 +- drivers/net/phy/mdio-sun4i.c | 4 +- drivers/net/phy/micrel.c | 12 +- drivers/net/phy/phy.c | 46 +++--- drivers/net/phy/phy_device.c | 2 + drivers/net/vrf.c | 177 ++------------------- drivers/net/vxlan.c | 62 +++++--- drivers/net/wimax/i2400m/usb-fw.c | 1 + drivers/net/wireless/ath/ath10k/core.c | 2 +- drivers/net/wireless/ath/ath9k/htc_hst.c | 2 +- drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 16 ++ drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | 22 ++- drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c | 2 + drivers/net/wireless/iwlwifi/iwl-7000.c | 2 +- drivers/net/wireless/mwifiex/pcie.h | 9 +- drivers/net/wireless/mwifiex/sta_event.c | 10 +- drivers/net/wireless/mwifiex/wmm.c | 6 +- drivers/of/of_mdio.c | 5 +- drivers/pci/pci-sysfs.c | 7 +- drivers/pinctrl/bcm/pinctrl-bcm2835.c | 2 +- drivers/pinctrl/pinctrl-tegra.c | 2 +- drivers/power/bq27xxx_battery.c | 20 ++- drivers/power/ipaq_micro_battery.c | 2 +- drivers/power/test_power.c | 2 + drivers/power/tps65217_charger.c | 6 +- drivers/regulator/core.c | 38 +++-- drivers/scsi/cxgbi/libcxgbi.c | 1 + drivers/spi/spi-rockchip.c | 12 +- drivers/staging/media/lirc/lirc_imon.c | 2 + drivers/staging/rtl8192u/r8192U_core.c | 4 +- drivers/target/target_core_configfs.c | 6 +- drivers/tty/serial/msm_serial.c | 99 ++++++++---- drivers/tty/serial/samsung.c | 4 +- drivers/usb/gadget/function/f_acm.c | 4 +- drivers/usb/gadget/udc/pch_udc.c | 30 ++-- drivers/usb/gadget/udc/udc-core.c | 2 +- drivers/vfio/pci/vfio_pci_config.c | 3 +- .../vfio/platform/reset/vfio_platform_amdxgbe.c | 2 +- fs/btrfs/disk-io.c | 2 +- fs/btrfs/extent-tree.c | 2 +- fs/cifs/connect.c | 2 + fs/gfs2/file.c | 5 +- fs/nfs/nfs4proc.c | 4 + include/asm-generic/preempt.h | 4 +- include/linux/cpufreq.h | 4 - include/linux/ieee80211.h | 9 ++ include/linux/mlx5/driver.h | 3 +- include/linux/mlx5/qp.h | 1 + include/linux/mtd/nand.h | 4 +- include/linux/netdevice.h | 5 +- include/linux/sunrpc/msg_prot.h | 4 +- include/net/bonding.h | 7 +- include/net/ip6_fib.h | 2 + include/net/ip6_route.h | 3 + include/net/ip_fib.h | 3 +- include/net/route.h | 3 + include/net/sch_generic.h | 5 +- include/net/sock.h | 18 ++- include/net/xfrm.h | 4 +- kernel/bpf/syscall.c | 4 +- kernel/sched/fair.c | 27 ++-- kernel/trace/bpf_trace.c | 4 + lib/mpi/longlong.h | 34 ++-- net/batman-adv/main.c | 2 +- net/batman-adv/translation-table.c | 6 +- net/bridge/br_fdb.c | 52 +++--- net/bridge/br_input.c | 7 +- net/core/dev.c | 1 + net/core/flow_dissector.c | 17 +- net/core/rtnetlink.c | 1 + net/core/skbuff.c | 10 +- net/core/sock.c | 7 +- net/dccp/ipv4.c | 2 +- net/dccp/ipv6.c | 2 +- net/dsa/slave.c | 7 +- net/ipv4/devinet.c | 12 +- net/ipv4/fib_frontend.c | 3 +- net/ipv4/fib_semantics.c | 8 +- net/ipv4/fib_trie.c | 4 +- net/ipv4/fou.c | 6 + net/ipv4/gre_offload.c | 8 + net/ipv4/icmp.c | 4 +- net/ipv4/ip_gre.c | 46 ++++-- net/ipv4/ip_sockglue.c | 7 +- net/ipv4/netfilter/nft_dup_ipv4.c | 6 +- net/ipv4/route.c | 17 +- net/ipv4/tcp_input.c | 5 +- net/ipv4/udp.c | 13 +- net/ipv6/addrconf.c | 21 ++- net/ipv6/icmp.c | 5 +- net/ipv6/ip6_checksum.c | 7 +- net/ipv6/ip6_vti.c | 4 +- net/ipv6/ip6mr.c | 13 +- net/ipv6/netfilter/nft_dup_ipv6.c | 6 +- net/ipv6/route.c | 75 ++++++--- net/ipv6/tcp_ipv6.c | 7 +- net/ipv6/udp.c | 6 +- net/ipv6/xfrm6_input.c | 15 +- net/ipv6/xfrm6_tunnel.c | 2 +- net/irda/af_irda.c | 5 +- net/l2tp/l2tp_core.c | 3 + net/mac80211/ieee80211_i.h | 4 + net/mac80211/mlme.c | 2 +- net/mac80211/offchannel.c | 5 +- net/mac80211/rx.c | 8 +- net/mac80211/status.c | 5 +- net/mac80211/tdls.c | 43 ++++- net/mac80211/tx.c | 2 +- net/mac80211/vht.c | 30 +++- net/netfilter/nf_tables_api.c | 4 +- net/netfilter/nf_tables_core.c | 2 +- net/netfilter/nfnetlink.c | 6 +- net/netfilter/nft_dynset.c | 3 + net/nfc/nci/core.c | 6 +- net/openvswitch/actions.c | 20 ++- net/rds/tcp.c | 2 +- net/rds/tcp_listen.c | 40 +++-- net/sched/cls_bpf.c | 13 +- net/sched/cls_flower.c | 28 ++-- net/sched/sch_drr.c | 4 + net/sched/sch_fq.c | 32 ++-- net/sched/sch_fq_codel.c | 2 +- net/sched/sch_generic.c | 11 +- net/sched/sch_hfsc.c | 12 +- net/sched/sch_prio.c | 4 + net/sched/sch_qfq.c | 3 + net/sched/sch_sfb.c | 3 + net/sched/sch_tbf.c | 4 + net/sctp/associola.c | 2 +- net/sctp/sm_make_chunk.c | 6 +- net/sctp/transport.c | 2 +- net/sunrpc/xprtrdma/backchannel.c | 22 +-- net/sunrpc/xprtrdma/transport.c | 3 + net/sunrpc/xprtrdma/verbs.c | 41 ++--- net/sunrpc/xprtrdma/xprt_rdma.h | 2 +- net/tipc/udp_media.c | 5 +- net/xfrm/xfrm_input.c | 14 +- net/xfrm/xfrm_state.c | 1 + net/xfrm/xfrm_user.c | 15 +- scripts/config | 5 +- sound/pci/fm801.c | 71 +++++---- sound/pci/hda/hda_intel.c | 9 +- sound/soc/fsl/fsl_ssi.c | 8 +- sound/soc/intel/atom/sst/sst_stream.c | 2 +- sound/soc/tegra/tegra_alc5632.c | 12 +- tools/perf/util/perf_regs.c | 8 +- tools/testing/selftests/ipc/msgque.c | 2 +- 318 files changed, 2119 insertions(+), 1364 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 9/312 MIPS: Fix macro typo
From: Jaedon Shin <[email protected]>
commit 2549cc967ebb4043f3507b55e3dc579f44d3b516 upstream.
Change the CONFIG_MIPS_CMDLINE_EXTEND to CONFIG_MIPS_CMDLINE_DTB_EXTEND to resolve the EXTEND_WITH_PROM macro.
Patchwork: https://patchwork.linux-mips.org/patch/11909/
--- arch/mips/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/kernel/setup.c +1 -1
@@ -695,7 +695,7 @@ static void __init request_crashkernel(s#define USE_PROM_CMDLINE IS_ENABLED(CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER)#define USE_DTB_CMDLINE IS_ENABLED(CONFIG_MIPS_CMDLINE_FROM_DTB) -#define EXTEND_WITH_PROM IS_ENABLED(CONFIG_MIPS_CMDLINE_EXTEND) +#define EXTEND_WITH_PROM IS_ENABLED(CONFIG_MIPS_CMDLINE_DTB_EXTEND)static void __init arch_mem_init (char **cmdline_p) {
Greg Kroah-Hartman
maintainerPATCH 19/312 MIPS: BMIPS: Adjust mips-hpt-frequency for BCM7435
In reply to Greg Kroah-HartmanFrom: Florian Fainelli <[email protected]>
commit 80fa40acaa1dad5a0a9c15ed2e5d2e72461843f5 upstream.
The CPU actually runs at 1405Mhz which gives us a 175625000 Hz MIPS timer frequency (CPU frequency / 8).
Patchwork: https://patchwork.linux-mips.org/patch/13132/
--- arch/mips/boot/dts/brcm/bcm7435.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/boot/dts/brcm/bcm7435.dtsi +1 -1
@@ -7,7 +7,7 @@ #address-cells = <1>; #size-cells = <0>; - mips-hpt-frequency = <163125000>; + mips-hpt-frequency = <175625000>; cpu@0 { compatible = "brcm,bmips5200";
Greg Kroah-Hartman
maintainerPATCH 2/312 drm/qxl: qxl_release use after free
In reply to Greg Kroah-HartmanFrom: Vasily Averin <[email protected]>
commit 933db73351d359f74b14f4af095808260aff11f9 upstream.
qxl_release should not be accesses after qxl_push_*_ring_release() calls:
userspace driver can process submitted command quickly, move qxl_release into release_ring, generate interrupt and trigger garbage collector.
It can lead to crashes in qxl driver or trigger memory corruption in some kmalloc-192 slab object
Gerd Hoffmann proposes to swap the qxl_release_fence_buffer_objects() + qxl_push_{cursor,command}_ring_release() calls to close that race window.
--- drivers/gpu/drm/qxl/qxl_cmd.c | 5 ++--- drivers/gpu/drm/qxl/qxl_display.c | 6 +++--- drivers/gpu/drm/qxl/qxl_draw.c | 8 ++++---- drivers/gpu/drm/qxl/qxl_ioctl.c | 5 +---- 4 files changed, 10 insertions(+), 14 deletions(-)
drivers/gpu/drm/qxl/qxl_cmd.c +2 -3
@@ -529,8 +529,8 @@ int qxl_hw_surface_alloc(struct qxl_devi/* no need to add a release to the fence for this surface bo, since it is only released when we ask to destroy the surface and it would never signal otherwise */ -qxl_push_command_ring_release (qdev, release,QXL_CMD_SURFACE , false);qxl_release_fence_buffer_objects (release); +qxl_push_command_ring_release (qdev, release,QXL_CMD_SURFACE , false); surf->hw_surf_alloc = true;spin_lock (&qdev->surf_id_idr_lock);
@@ -572,9 +572,8 @@ int qxl_hw_surface_dealloc(struct qxl_de cmd->surface_id = id;qxl_release_unmap (qdev, release, &cmd->release_info); -qxl_push_command_ring_release (qdev, release,QXL_CMD_SURFACE , false); -qxl_release_fence_buffer_objects (release); +qxl_push_command_ring_release (qdev, release,QXL_CMD_SURFACE , false);return 0 ; }
drivers/gpu/drm/qxl/qxl_display.c +3 -3
@@ -292,8 +292,8 @@ qxl_hide_cursor(struct qxl_device *qdev) cmd->type =QXL_CURSOR_HIDE ;qxl_release_unmap (qdev, release, &cmd->release_info); -qxl_push_cursor_ring_release (qdev, release,QXL_CMD_CURSOR , false);qxl_release_fence_buffer_objects (release); +qxl_push_cursor_ring_release (qdev, release,QXL_CMD_CURSOR , false);return 0 ; }
@@ -390,8 +390,8 @@ static int qxl_crtc_cursor_set2(struct d cmd->u.set.visible =1 ;qxl_release_unmap (qdev, release, &cmd->release_info); -qxl_push_cursor_ring_release (qdev, release,QXL_CMD_CURSOR , false);qxl_release_fence_buffer_objects (release); +qxl_push_cursor_ring_release (qdev, release,QXL_CMD_CURSOR , false);/* finish with the userspace bo */ ret =qxl_bo_reserve (user_bo, false);
@@ -450,8 +450,8 @@ static int qxl_crtc_cursor_move(struct d cmd->u.position.y = qcrtc->cur_y + qcrtc->hot_spot_y;qxl_release_unmap (qdev, release, &cmd->release_info); -qxl_push_cursor_ring_release (qdev, release,QXL_CMD_CURSOR , false);qxl_release_fence_buffer_objects (release); +qxl_push_cursor_ring_release (qdev, release,QXL_CMD_CURSOR , false);return 0 ; }
drivers/gpu/drm/qxl/qxl_draw.c +4 -4
@@ -245,8 +245,8 @@ void qxl_draw_opaque_fb(const struct qxlqxl_bo_physical_address (qdev, dimage->bo,0 );qxl_release_unmap (qdev, release, &drawable->release_info); -qxl_push_command_ring_release (qdev, release,QXL_CMD_DRAW , false);qxl_release_fence_buffer_objects (release); +qxl_push_command_ring_release (qdev, release,QXL_CMD_DRAW , false); out_free_palette:if (palette_bo)
@@ -385,8 +385,8 @@ void qxl_draw_dirty_fb(struct qxl_device }qxl_bo_kunmap (clips_bo); -qxl_push_command_ring_release (qdev, release,QXL_CMD_DRAW , false);qxl_release_fence_buffer_objects (release); +qxl_push_command_ring_release (qdev, release,QXL_CMD_DRAW , false); out_release_backoff:if (ret)
@@ -436,8 +436,8 @@ void qxl_draw_copyarea(struct qxl_device drawable->u.copy_bits.src_pos.y = sy;qxl_release_unmap (qdev, release, &drawable->release_info); -qxl_push_command_ring_release (qdev, release,QXL_CMD_DRAW , false);qxl_release_fence_buffer_objects (release); +qxl_push_command_ring_release (qdev, release,QXL_CMD_DRAW , false); out_free_release:if (ret)
@@ -480,8 +480,8 @@ void qxl_draw_fill(struct qxl_draw_fillqxl_release_unmap (qdev, release, &drawable->release_info); -qxl_push_command_ring_release (qdev, release,QXL_CMD_DRAW , false);qxl_release_fence_buffer_objects (release); +qxl_push_command_ring_release (qdev, release,QXL_CMD_DRAW , false); out_free_release:if (ret)
drivers/gpu/drm/qxl/qxl_ioctl.c +1 -4
@@ -257,11 +257,8 @@ static int qxl_process_single_command(stapply_surf_reloc (qdev, &reloc_info[i]); } +qxl_release_fence_buffer_objects (release); ret =qxl_push_command_ring_release (qdev, release, cmd->type, true); -if (ret) -qxl_release_backoff_reserve_list (release); -else -qxl_release_fence_buffer_objects (release); out_free_bos: out_free_release:
Greg Kroah-Hartman
maintainerPATCH 1/312 mwifiex: fix PCIe register information for 8997 chipset
In reply to Greg Kroah-HartmanFrom: Amitkumar Karwar <[email protected]>
commit ce0c58d998410fb91c63a70e749e98bb0e67eb67 upstream.
This patch corrects some information in mwifiex_pcie_card_reg() structure for 8997 chipset
--- drivers/net/wireless/mwifiex/pcie.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/mwifiex/pcie.h +4 -4
@@ -210,17 +210,17 @@ static const struct mwifiex_pcie_card_re .cmdrsp_addr_lo = PCIE_SCRATCH_4_REG, .cmdrsp_addr_hi = PCIE_SCRATCH_5_REG, .tx_rdptr = 0xC1A4, - .tx_wrptr = 0xC1A8, - .rx_rdptr = 0xC1A8, + .tx_wrptr = 0xC174, + .rx_rdptr = 0xC174, .rx_wrptr = 0xC1A4, .evt_rdptr = PCIE_SCRATCH_10_REG, .evt_wrptr = PCIE_SCRATCH_11_REG, .drv_rdy = PCIE_SCRATCH_12_REG, .tx_start_ptr = 16, .tx_mask = 0x0FFF0000, - .tx_wrap_mask = 0x01FF0000, + .tx_wrap_mask = 0x1FFF0000, .rx_mask = 0x00000FFF, - .rx_wrap_mask = 0x000001FF, + .rx_wrap_mask = 0x00001FFF, .tx_rollover_ind = BIT(28), .rx_rollover_ind = BIT(12), .evt_rollover_ind = MWIFIEX_BD_FLAG_EVT_ROLLOVER_IND,
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.223 release. There are 312 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 10 May 2020 12:29:44 +0000. Anything received after that time might be too late.
This is not a complete list of errors.
arm64:allmodconfig
drivers/spi/spi-rockchip.c: In function 'rockchip_spi_prepare_dma':drivers/spi/spi-rockchip.c:461:19: error: 'struct dma_slave_caps' has no member named 'max_burst'
arm:allmodconfig
drivers/mtd/nand/pxa3xx_nand.c: In function 'alloc_nand_resource':drivers/mtd/nand/pxa3xx_nand.c:1753:7: error: 'np' undeclared
mips:defconfig
Lots of
In file included from ./arch/mips/include/asm/fpu.h:24,
from arch/mips/kernel/branch.c:16:./arch/mips/include/asm/msa.h: In function 'read_msa_ir':./arch/mips/include/asm/msa.h:204:2: error: expected ':' or ')' before '_ASM_INSN_IF_MIPS'
and similar errors.
arch/mips/mm/tlbex.c: In function 'config_htw_params':arch/mips/mm/tlbex.c:2334:13: error: 'MIPS_PWSIZE_PS_MASK' undeclared
All mips builds are badly broken.
Guenter
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.223 release. There are 312 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 10 May 2020 12:29:44 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.223-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.4.y
and the diffstat can be found below.thanks,
greg k-h
<trim>
Quoted 2 lines
Addy Ke <[email protected]>
spi: rockchip: modify DMA max burst to 1
While building kernel Image for arm architecture the following error noticed on stable-rc 4.4 kernel branch
# make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc CC="sccache
arm-linux-gnueabihf-gcc" O=build zImage
#
#
# make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc CC="sccache
arm-linux-gnueabihf-gcc" O=build modules
#
../drivers/spi/spi-rockchip.c: In function ‘rockchip_spi_prepare_dma’:
../drivers/spi/spi-rockchip.c:461:19: error: ‘struct dma_slave_caps’
has no member named ‘max_burst’
461 | if (rs->dma_caps.max_burst > 4)
| ^
../drivers/spi/spi-rockchip.c:481:19: error: ‘struct dma_slave_caps’
has no member named ‘max_burst’
481 | if (rs->dma_caps.max_burst > 4)
| ^full build log,
https://gitlab.com/Linaro/lkft/kernel-runs/-/jobs/544289003
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Greg Kroah-Hartman
maintainerQuoted 11 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.223 release. There are 312 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 10 May 2020 12:29:44 +0000. Anything received after that time might be too late.
This is not a complete list of errors.
Yeah, I knew this was going to be a rough one. I was hoping the "early warning" messages from Linaro would have caught most of these, oh well :(
Quoted 5 lines
arm64:allmodconfig
drivers/spi/spi-rockchip.c: In function 'rockchip_spi_prepare_dma':drivers/spi/spi-rockchip.c:461:19: error: 'structdma_slave_caps' has no member named 'max_burst'
Now fixed.
Quoted 4 lines
arm:allmodconfig
drivers/mtd/nand/pxa3xx_nand.c: In function 'alloc_nand_resource':drivers/mtd/nand/pxa3xx_nand.c:1753:7: error: 'np' undeclared
Now fixed.
Quoted 9 lines
mips:defconfig
Lots of
In file included from
./arch/mips/include/asm/fpu.h:24,
fromarch/mips/kernel/branch.c:16:./arch/mips/include/asm/msa.h: In function 'read_msa_ir':./arch/mips/include/asm/msa.h:204:2: error: expected ':' or ')' before '_ASM_INSN_IF_MIPS'
Quoted 6 lines
and similar errors.
arch/mips/mm/tlbex.c: In function 'config_htw_params':arch/mips/mm/tlbex.c:2334:13: error: 'MIPS_PWSIZE_PS_MASK' undeclaredAll mips builds are badly broken.
Odd, I thought I had tested mips locally, I guess I got it completly wrong... Let me go through those again...
I'll push out a -rc2 after digging into the mips mess...
greg k-h
Greg Kroah-Hartman
maintainerQuoted 37 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.223 release. There are 312 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 10 May 2020 12:29:44 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.223-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.4.y
and the diffstat can be found below.thanks,
greg k-h
<trim>
Quoted 2 lines
Addy Ke <[email protected]>
spi: rockchip: modify DMA max burst to 1While building kernel Image for arm architecture the following error noticed on stable-rc 4.4 kernel branch
# make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc CC="sccache arm-linux-gnueabihf-gcc" O=build zImage # # # make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc CC="sccache arm-linux-gnueabihf-gcc" O=build modules # ../drivers/spi/spi-rockchip.c: In function ‘rockchip_spi_prepare_dma’:
Quoted 8 lines
../drivers/spi/spi-rockchip.c:461:19: error: ‘struct dma_slave_caps’
has no member named ‘max_burst’
461 | if (rs->dma_caps.max_burst > 4)
| ^
../drivers/spi/spi-rockchip.c:481:19: error: ‘struct dma_slave_caps’
has no member named ‘max_burst’
481 | if (rs->dma_caps.max_burst > 4)
| ^I just dropped the offending patch, Guenter beat you to it :)
greg k-h
Quoted 11 lines · Greg Kroah-Hartman
Quoted 10 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.223 release. There are 312 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 10 May 2020 12:29:44 +0000. Anything received after that time might be too late.
Quoted 6 lines
Quoted 1 line
This is not a complete list of errors.
Yeah, I knew this was going to be a rough one. I was hoping the "early warning" messages from Linaro would have caught most of these, oh well :(
To be fair, I had noticed the errors yesterday. I just thought this was so bad that it looked like a stray (bad) push to me, and I didn't send feedback. Maybe I should always send feedback if I see errors prior to an -rc release. I don't want to spam people with noise, so I am not sure. Any thoughts on that ?
Guenter
Greg Kroah-Hartman
maintainerQuoted 19 lines · Guenter Roeck
Quoted 11 lines · Greg Kroah-Hartman
Quoted 10 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.223 release. There are 312 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun, 10 May 2020 12:29:44 +0000. Anything received after that time might be too late.
Quoted 6 lines
Quoted 1 line
This is not a complete list of errors.
Yeah, I knew this was going to be a rough one. I was hoping the "early warning" messages from Linaro would have caught most of these, oh well :(
Quoted 5 lines
To be fair, I had noticed the errors yesterday. I just thought this was so bad that it looked like a stray (bad) push to me, and I didn't send feedback. Maybe I should always send feedback if I see errors prior to an -rc release. I don't want to spam people with noise, so I am not sure. Any thoughts on that ?
If the tree is broken, I'd like to know about it. Rarely do I know that it is broken and leave it alone. One exception would be last night when it was too late for me to fix the build issues, but Sasha was kind enough to do so.
So it's not noise to me, if it's easy enough for you to do so.
I think I fixed up the MIPS stuff, turns out gcc was just crashing on a filesystem driver with an internal error. I think I need a different version of gcc if I want to build more arches...
I'll go push out a -rc with this fixed up now, thanks.
greg k-h