You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
Merge branch 'cve-fixes-2022-10-13'
Pull in the fixes for various scan parsing bugs found by Sönke Huster by fuzzing.
This commit is contained in:
@@ -120,7 +120,7 @@ required delays, as defined per the RGMII standard, several options may be
|
||||
available:
|
||||
|
||||
* Some SoCs may offer a pin pad/mux/controller capable of configuring a given
|
||||
set of pins'strength, delays, and voltage; and it may be a suitable
|
||||
set of pins' strength, delays, and voltage; and it may be a suitable
|
||||
option to insert the expected 2ns RGMII delay.
|
||||
|
||||
* Modifying the PCB design to include a fixed delay (e.g: using a specifically
|
||||
|
||||
@@ -18487,6 +18487,7 @@ F: drivers/misc/sgi-xp/
|
||||
SHARED MEMORY COMMUNICATIONS (SMC) SOCKETS
|
||||
M: Karsten Graul <kgraul@linux.ibm.com>
|
||||
M: Wenjia Zhang <wenjia@linux.ibm.com>
|
||||
M: Jan Karcher <jaka@linux.ibm.com>
|
||||
L: linux-s390@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://www.ibm.com/developerworks/linux/linux390/
|
||||
|
||||
@@ -2345,8 +2345,7 @@ HFC_init(void)
|
||||
static void __exit
|
||||
HFC_cleanup(void)
|
||||
{
|
||||
if (timer_pending(&hfc_tl))
|
||||
del_timer_sync(&hfc_tl);
|
||||
del_timer_sync(&hfc_tl);
|
||||
|
||||
pci_unregister_driver(&hfc_driver);
|
||||
}
|
||||
|
||||
@@ -1169,6 +1169,11 @@ static int adin1110_port_bridge_leave(struct adin1110_port_priv *port_priv,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static bool adin1110_port_dev_check(const struct net_device *dev)
|
||||
{
|
||||
return dev->netdev_ops == &adin1110_netdev_ops;
|
||||
}
|
||||
|
||||
static int adin1110_netdevice_event(struct notifier_block *unused,
|
||||
unsigned long event, void *ptr)
|
||||
{
|
||||
@@ -1177,6 +1182,9 @@ static int adin1110_netdevice_event(struct notifier_block *unused,
|
||||
struct netdev_notifier_changeupper_info *info = ptr;
|
||||
int ret = 0;
|
||||
|
||||
if (!adin1110_port_dev_check(dev))
|
||||
return NOTIFY_DONE;
|
||||
|
||||
switch (event) {
|
||||
case NETDEV_CHANGEUPPER:
|
||||
if (netif_is_bridge_master(info->upper_dev)) {
|
||||
@@ -1202,11 +1210,6 @@ static void adin1110_disconnect_phy(void *data)
|
||||
phy_disconnect(data);
|
||||
}
|
||||
|
||||
static bool adin1110_port_dev_check(const struct net_device *dev)
|
||||
{
|
||||
return dev->netdev_ops == &adin1110_netdev_ops;
|
||||
}
|
||||
|
||||
static int adin1110_port_set_forwarding_state(struct adin1110_port_priv *port_priv)
|
||||
{
|
||||
struct adin1110_priv *priv = port_priv->priv;
|
||||
|
||||
@@ -17,8 +17,3 @@ obj-$(CONFIG_BGMAC_BCMA) += bgmac-bcma.o bgmac-bcma-mdio.o
|
||||
obj-$(CONFIG_BGMAC_PLATFORM) += bgmac-platform.o
|
||||
obj-$(CONFIG_SYSTEMPORT) += bcmsysport.o
|
||||
obj-$(CONFIG_BNXT) += bnxt/
|
||||
|
||||
# FIXME: temporarily silence -Warray-bounds on non W=1+ builds
|
||||
ifndef KBUILD_EXTRA_WARN
|
||||
CFLAGS_tg3.o += -Wno-array-bounds
|
||||
endif
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include <linux/math64.h>
|
||||
#include <linux/refcount.h>
|
||||
#include <net/pkt_cls.h>
|
||||
#include <net/pkt_sched.h>
|
||||
#include <net/tc_act/tc_gate.h>
|
||||
|
||||
static u16 enetc_get_max_gcl_len(struct enetc_hw *hw)
|
||||
|
||||
@@ -1182,8 +1182,10 @@ static int mcs_register_interrupts(struct mcs *mcs)
|
||||
mcs_reg_write(mcs, MCSX_PAB_TX_SLAVE_PAB_INT_ENB, 0xff);
|
||||
|
||||
mcs->tx_sa_active = alloc_mem(mcs, mcs->hw->sc_entries);
|
||||
if (!mcs->tx_sa_active)
|
||||
if (!mcs->tx_sa_active) {
|
||||
ret = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
return ret;
|
||||
exit:
|
||||
|
||||
@@ -133,7 +133,7 @@ static int cn10k_mcs_alloc_rsrc(struct otx2_nic *pfvf, enum mcs_direction dir,
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
goto fail;
|
||||
};
|
||||
}
|
||||
|
||||
mutex_unlock(&mbox->lock);
|
||||
|
||||
@@ -284,7 +284,7 @@ static int cn10k_mcs_write_sc_cam(struct otx2_nic *pfvf,
|
||||
|
||||
sc_req = otx2_mbox_alloc_msg_mcs_rx_sc_cam_write(mbox);
|
||||
if (!sc_req) {
|
||||
return -ENOMEM;
|
||||
ret = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -594,7 +594,7 @@ static int cn10k_mcs_ena_dis_flowid(struct otx2_nic *pfvf, u16 hw_flow_id,
|
||||
|
||||
req = otx2_mbox_alloc_msg_mcs_flowid_ena_entry(mbox);
|
||||
if (!req) {
|
||||
return -ENOMEM;
|
||||
ret = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -1653,6 +1653,7 @@ int cn10k_mcs_init(struct otx2_nic *pfvf)
|
||||
return 0;
|
||||
fail:
|
||||
dev_err(pfvf->dev, "Cannot notify PN wrapped event\n");
|
||||
mutex_unlock(&mbox->lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -2810,7 +2810,7 @@ static int otx2_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
err = register_netdev(netdev);
|
||||
if (err) {
|
||||
dev_err(dev, "Failed to register netdevice\n");
|
||||
goto err_del_mcam_entries;
|
||||
goto err_mcs_free;
|
||||
}
|
||||
|
||||
err = otx2_wq_init(pf);
|
||||
@@ -2849,6 +2849,8 @@ err_mcam_flow_del:
|
||||
otx2_mcam_flow_del(pf);
|
||||
err_unreg_netdev:
|
||||
unregister_netdev(netdev);
|
||||
err_mcs_free:
|
||||
cn10k_mcs_free(pf);
|
||||
err_del_mcam_entries:
|
||||
otx2_mcam_flow_del(pf);
|
||||
err_ptp_destroy:
|
||||
|
||||
@@ -96,6 +96,8 @@ int prestera_mall_replace(struct prestera_flow_block *block,
|
||||
|
||||
list_for_each_entry(binding, &block->binding_list, list) {
|
||||
err = prestera_span_rule_add(binding, port, block->ingress);
|
||||
if (err == -EEXIST)
|
||||
return err;
|
||||
if (err)
|
||||
goto rollback;
|
||||
}
|
||||
|
||||
@@ -11,8 +11,3 @@ mtk_eth-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_debugfs.o
|
||||
endif
|
||||
obj-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_ops.o
|
||||
obj-$(CONFIG_NET_MEDIATEK_STAR_EMAC) += mtk_star_emac.o
|
||||
|
||||
# FIXME: temporarily silence -Warray-bounds on non W=1+ builds
|
||||
ifndef KBUILD_EXTRA_WARN
|
||||
CFLAGS_mtk_ppe.o += -Wno-array-bounds
|
||||
endif
|
||||
|
||||
@@ -1051,7 +1051,8 @@ struct net_device_context {
|
||||
u32 vf_alloc;
|
||||
/* Serial number of the VF to team with */
|
||||
u32 vf_serial;
|
||||
|
||||
/* completion variable to confirm vf association */
|
||||
struct completion vf_add;
|
||||
/* Is the current data path through the VF NIC? */
|
||||
bool data_path_is_vf;
|
||||
|
||||
|
||||
@@ -1580,6 +1580,10 @@ static void netvsc_send_vf(struct net_device *ndev,
|
||||
|
||||
net_device_ctx->vf_alloc = nvmsg->msg.v4_msg.vf_assoc.allocated;
|
||||
net_device_ctx->vf_serial = nvmsg->msg.v4_msg.vf_assoc.serial;
|
||||
|
||||
if (net_device_ctx->vf_alloc)
|
||||
complete(&net_device_ctx->vf_add);
|
||||
|
||||
netdev_info(ndev, "VF slot %u %s\n",
|
||||
net_device_ctx->vf_serial,
|
||||
net_device_ctx->vf_alloc ? "added" : "removed");
|
||||
|
||||
@@ -2313,6 +2313,18 @@ static struct net_device *get_netvsc_byslot(const struct net_device *vf_netdev)
|
||||
|
||||
}
|
||||
|
||||
/* Fallback path to check synthetic vf with
|
||||
* help of mac addr
|
||||
*/
|
||||
list_for_each_entry(ndev_ctx, &netvsc_dev_list, list) {
|
||||
ndev = hv_get_drvdata(ndev_ctx->device_ctx);
|
||||
if (ether_addr_equal(vf_netdev->perm_addr, ndev->perm_addr)) {
|
||||
netdev_notice(vf_netdev,
|
||||
"falling back to mac addr based matching\n");
|
||||
return ndev;
|
||||
}
|
||||
}
|
||||
|
||||
netdev_notice(vf_netdev,
|
||||
"no netdev found for vf serial:%u\n", serial);
|
||||
return NULL;
|
||||
@@ -2409,6 +2421,11 @@ static int netvsc_vf_changed(struct net_device *vf_netdev, unsigned long event)
|
||||
if (net_device_ctx->data_path_is_vf == vf_is_up)
|
||||
return NOTIFY_OK;
|
||||
|
||||
if (vf_is_up && !net_device_ctx->vf_alloc) {
|
||||
netdev_info(ndev, "Waiting for the VF association from host\n");
|
||||
wait_for_completion(&net_device_ctx->vf_add);
|
||||
}
|
||||
|
||||
ret = netvsc_switch_datapath(ndev, vf_is_up);
|
||||
|
||||
if (ret) {
|
||||
@@ -2440,6 +2457,7 @@ static int netvsc_unregister_vf(struct net_device *vf_netdev)
|
||||
|
||||
netvsc_vf_setxdp(vf_netdev, NULL);
|
||||
|
||||
reinit_completion(&net_device_ctx->vf_add);
|
||||
netdev_rx_handler_unregister(vf_netdev);
|
||||
netdev_upper_dev_unlink(vf_netdev, ndev);
|
||||
RCU_INIT_POINTER(net_device_ctx->vf_netdev, NULL);
|
||||
@@ -2479,6 +2497,7 @@ static int netvsc_probe(struct hv_device *dev,
|
||||
|
||||
INIT_DELAYED_WORK(&net_device_ctx->dwork, netvsc_link_change);
|
||||
|
||||
init_completion(&net_device_ctx->vf_add);
|
||||
spin_lock_init(&net_device_ctx->lock);
|
||||
INIT_LIST_HEAD(&net_device_ctx->reconfig_events);
|
||||
INIT_DELAYED_WORK(&net_device_ctx->vf_takeover, netvsc_vf_setup);
|
||||
|
||||
@@ -1192,7 +1192,7 @@ void macvlan_common_setup(struct net_device *dev)
|
||||
{
|
||||
ether_setup(dev);
|
||||
|
||||
dev->min_mtu = 0;
|
||||
/* ether_setup() has set dev->min_mtu to ETH_MIN_MTU. */
|
||||
dev->max_mtu = ETH_MAX_MTU;
|
||||
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
|
||||
netif_keep_dst(dev);
|
||||
|
||||
@@ -14,6 +14,7 @@ if PSE_CONTROLLER
|
||||
|
||||
config PSE_REGULATOR
|
||||
tristate "Regulator based PSE controller"
|
||||
depends on REGULATOR || COMPILE_TEST
|
||||
help
|
||||
This module provides support for simple regulator based Ethernet Power
|
||||
Sourcing Equipment without automatic classification support. For
|
||||
|
||||
@@ -4973,6 +4973,8 @@ static int hwsim_cloned_frame_received_nl(struct sk_buff *skb_2,
|
||||
}
|
||||
|
||||
rx_status.rate_idx = nla_get_u32(info->attrs[HWSIM_ATTR_RX_RATE]);
|
||||
if (rx_status.rate_idx >= data2->hw->wiphy->bands[rx_status.band]->n_bitrates)
|
||||
goto out;
|
||||
rx_status.signal = nla_get_u32(info->attrs[HWSIM_ATTR_SIGNAL]);
|
||||
|
||||
hdr = (void *)skb->data;
|
||||
|
||||
@@ -3657,6 +3657,7 @@ ptp_ocp_detach_sysfs(struct ptp_ocp *bp)
|
||||
struct device *dev = &bp->dev;
|
||||
|
||||
sysfs_remove_link(&dev->kobj, "ttyGNSS");
|
||||
sysfs_remove_link(&dev->kobj, "ttyGNSS2");
|
||||
sysfs_remove_link(&dev->kobj, "ttyMAC");
|
||||
sysfs_remove_link(&dev->kobj, "ptp");
|
||||
sysfs_remove_link(&dev->kobj, "pps");
|
||||
|
||||
@@ -185,21 +185,27 @@ static inline int
|
||||
ieee802154_sockaddr_check_size(struct sockaddr_ieee802154 *daddr, int len)
|
||||
{
|
||||
struct ieee802154_addr_sa *sa;
|
||||
int ret = 0;
|
||||
|
||||
sa = &daddr->addr;
|
||||
if (len < IEEE802154_MIN_NAMELEN)
|
||||
return -EINVAL;
|
||||
switch (sa->addr_type) {
|
||||
case IEEE802154_ADDR_NONE:
|
||||
break;
|
||||
case IEEE802154_ADDR_SHORT:
|
||||
if (len < IEEE802154_NAMELEN_SHORT)
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
case IEEE802154_ADDR_LONG:
|
||||
if (len < IEEE802154_NAMELEN_LONG)
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void ieee802154_addr_from_sa(struct ieee802154_addr *a,
|
||||
|
||||
@@ -1681,7 +1681,7 @@ int dsa_port_phylink_create(struct dsa_port *dp)
|
||||
pl = phylink_create(&dp->pl_config, of_fwnode_handle(dp->dn),
|
||||
mode, &dsa_port_phylink_mac_ops);
|
||||
if (IS_ERR(pl)) {
|
||||
pr_err("error creating PHYLINK: %ld\n", PTR_ERR(dp->pl));
|
||||
pr_err("error creating PHYLINK: %ld\n", PTR_ERR(pl));
|
||||
return PTR_ERR(pl);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user