Merge branch 'qeth-fixes'
Julian Wiedmann says: ==================== s390/qeth: fixes 2018-09-12 please apply the following qeth fixes for -net. Patch 1 resolves a regression in an error path, while patch 2 enables the SG support by default that was newly introduced with 4.19. Patch 3 takes care of a longstanding problem with large-order allocations, and patch 4 fixes a potential out-of-bounds access. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
6b4d24de29
|
@ -25,6 +25,7 @@
|
|||
#include <linux/netdevice.h>
|
||||
#include <linux/netdev_features.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
#include <net/iucv/af_iucv.h>
|
||||
#include <net/dsfield.h>
|
||||
|
@ -4699,7 +4700,7 @@ static int qeth_query_oat_command(struct qeth_card *card, char __user *udata)
|
|||
|
||||
priv.buffer_len = oat_data.buffer_len;
|
||||
priv.response_len = 0;
|
||||
priv.buffer = kzalloc(oat_data.buffer_len, GFP_KERNEL);
|
||||
priv.buffer = vzalloc(oat_data.buffer_len);
|
||||
if (!priv.buffer) {
|
||||
rc = -ENOMEM;
|
||||
goto out;
|
||||
|
@ -4740,7 +4741,7 @@ static int qeth_query_oat_command(struct qeth_card *card, char __user *udata)
|
|||
rc = -EFAULT;
|
||||
|
||||
out_free:
|
||||
kfree(priv.buffer);
|
||||
vfree(priv.buffer);
|
||||
out:
|
||||
return rc;
|
||||
}
|
||||
|
@ -5706,6 +5707,8 @@ static struct net_device *qeth_alloc_netdev(struct qeth_card *card)
|
|||
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
|
||||
dev->hw_features |= NETIF_F_SG;
|
||||
dev->vlan_features |= NETIF_F_SG;
|
||||
if (IS_IQD(card))
|
||||
dev->features |= NETIF_F_SG;
|
||||
}
|
||||
|
||||
return dev;
|
||||
|
@ -5768,8 +5771,10 @@ static int qeth_core_probe_device(struct ccwgroup_device *gdev)
|
|||
qeth_update_from_chp_desc(card);
|
||||
|
||||
card->dev = qeth_alloc_netdev(card);
|
||||
if (!card->dev)
|
||||
if (!card->dev) {
|
||||
rc = -ENOMEM;
|
||||
goto err_card;
|
||||
}
|
||||
|
||||
qeth_determine_capabilities(card);
|
||||
enforced_disc = qeth_enforce_discipline(card);
|
||||
|
|
|
@ -423,7 +423,7 @@ static int qeth_l2_process_inbound_buffer(struct qeth_card *card,
|
|||
default:
|
||||
dev_kfree_skb_any(skb);
|
||||
QETH_CARD_TEXT(card, 3, "inbunkno");
|
||||
QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN);
|
||||
QETH_DBF_HEX(CTRL, 3, hdr, sizeof(*hdr));
|
||||
continue;
|
||||
}
|
||||
work_done++;
|
||||
|
|
|
@ -1390,7 +1390,7 @@ static int qeth_l3_process_inbound_buffer(struct qeth_card *card,
|
|||
default:
|
||||
dev_kfree_skb_any(skb);
|
||||
QETH_CARD_TEXT(card, 3, "inbunkno");
|
||||
QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN);
|
||||
QETH_DBF_HEX(CTRL, 3, hdr, sizeof(*hdr));
|
||||
continue;
|
||||
}
|
||||
work_done++;
|
||||
|
|
Loading…
Reference in New Issue