Commit d1fabc68 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files
Per-next-PR merge.

net/smc/af_smc.c
  b5dd4d69 ("net/smc: llc_conf_mutex refactor, replace it with rw_semaphore")
  e40b801b ("net/smc: fix potential panic dues to unprotected smc_llc_srv_add_link()")
https://lore.kernel.org/all/20230221124008.6303c330@canb.auug.org.au/



Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 4d4266e3 f922c7b1
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -4814,9 +4814,9 @@ F: net/sched/sch_etf.c
F:	net/sched/sch_taprio.c
CC2520 IEEE-802.15.4 RADIO DRIVER
M:	Varka Bhadram <varkabhadram@gmail.com>
M:	Stefan Schmidt <stefan@datenfreihafen.org>
L:	linux-wpan@vger.kernel.org
S:	Maintained
S:	Odd Fixes
F:	Documentation/devicetree/bindings/net/ieee802154/cc2520.txt
F:	drivers/net/ieee802154/cc2520.c
@@ -10013,6 +10013,7 @@ F: drivers/clk/clk-versaclock5.c
IEEE 802.15.4 SUBSYSTEM
M:	Alexander Aring <alex.aring@gmail.com>
M:	Stefan Schmidt <stefan@datenfreihafen.org>
M:	Miquel Raynal <miquel.raynal@bootlin.com>
L:	linux-wpan@vger.kernel.org
S:	Maintained
W:	https://linux-wpan.org/
@@ -12828,9 +12829,9 @@ F: drivers/iio/potentiometer/mcp4018.c
F:	drivers/iio/potentiometer/mcp4531.c
MCR20A IEEE-802.15.4 RADIO DRIVER
M:	Xue Liu <liuxuenetmail@gmail.com>
M:	Stefan Schmidt <stefan@datenfreihafen.org>
L:	linux-wpan@vger.kernel.org
S:	Maintained
S:	Odd Fixes
W:	https://github.com/xueliu/mcr20a-linux
F:	Documentation/devicetree/bindings/net/ieee802154/mcr20a.txt
F:	drivers/net/ieee802154/mcr20a.c
@@ -14193,9 +14194,9 @@ T: git git://linuxtv.org/media_tree.git
F:	drivers/media/radio/radio-mr800.c
MRF24J40 IEEE 802.15.4 RADIO DRIVER
M:	Alan Ott <alan@signal11.us>
M:	Stefan Schmidt <stefan@datenfreihafen.org>
L:	linux-wpan@vger.kernel.org
S:	Maintained
S:	Odd Fixes
F:	Documentation/devicetree/bindings/net/ieee802154/mrf24j40.txt
F:	drivers/net/ieee802154/mrf24j40.c
+2 −9
Original line number Diff line number Diff line
@@ -176,15 +176,6 @@ void bcmgenet_phy_power_set(struct net_device *dev, bool enable)

static void bcmgenet_moca_phy_setup(struct bcmgenet_priv *priv)
{
	u32 reg;

	if (!GENET_IS_V5(priv)) {
		/* Speed settings are set in bcmgenet_mii_setup() */
		reg = bcmgenet_sys_readl(priv, SYS_PORT_CTRL);
		reg |= LED_ACT_SOURCE_MAC;
		bcmgenet_sys_writel(priv, reg, SYS_PORT_CTRL);
	}

	if (priv->hw_params->flags & GENET_HAS_MOCA_LINK_DET)
		fixed_phy_set_link_update(priv->dev->phydev,
					  bcmgenet_fixed_phy_link_update);
@@ -217,6 +208,8 @@ int bcmgenet_mii_config(struct net_device *dev, bool init)

		if (!phy_name) {
			phy_name = "MoCA";
			if (!GENET_IS_V5(priv))
				port_ctrl |= LED_ACT_SOURCE_MAC;
			bcmgenet_moca_phy_setup(priv);
		}
		break;
+2 −2
Original line number Diff line number Diff line
@@ -523,9 +523,9 @@ irqreturn_t lan966x_ptp_irq_handler(int irq, void *args)
		if (WARN_ON(!skb_match))
			continue;

		spin_lock(&lan966x->ptp_ts_id_lock);
		spin_lock_irqsave(&lan966x->ptp_ts_id_lock, flags);
		lan966x->ptp_skbs--;
		spin_unlock(&lan966x->ptp_ts_id_lock);
		spin_unlock_irqrestore(&lan966x->ptp_ts_id_lock, flags);

		/* Get the h/w timestamp */
		lan966x_get_hwtimestamp(lan966x, &ts, delay);
+9 −2
Original line number Diff line number Diff line
@@ -973,8 +973,15 @@ static int qede_alloc_fp_array(struct qede_dev *edev)
		goto err;
	}

	mem = krealloc(edev->coal_entry, QEDE_QUEUE_CNT(edev) *
	if (!edev->coal_entry) {
		mem = kcalloc(QEDE_MAX_RSS_CNT(edev),
			      sizeof(*edev->coal_entry), GFP_KERNEL);
	} else {
		mem = krealloc(edev->coal_entry,
			       QEDE_QUEUE_CNT(edev) * sizeof(*edev->coal_entry),
			       GFP_KERNEL);
	}

	if (!mem) {
		DP_ERR(edev, "coalesce entry allocation failed\n");
		kfree(edev->coal_entry);
+67 −58
Original line number Diff line number Diff line
@@ -650,54 +650,22 @@ static int pppol2tp_tunnel_mtu(const struct l2tp_tunnel *tunnel)
	return mtu - PPPOL2TP_HEADER_OVERHEAD;
}

/* connect() handler. Attach a PPPoX socket to a tunnel UDP socket
 */
static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,
			    int sockaddr_len, int flags)
static struct l2tp_tunnel *pppol2tp_tunnel_get(struct net *net,
					       const struct l2tp_connect_info *info,
					       bool *new_tunnel)
{
	struct sock *sk = sock->sk;
	struct pppox_sock *po = pppox_sk(sk);
	struct l2tp_session *session = NULL;
	struct l2tp_connect_info info;
	struct l2tp_tunnel *tunnel;
	struct pppol2tp_session *ps;
	struct l2tp_session_cfg cfg = { 0, };
	bool drop_refcnt = false;
	bool drop_tunnel = false;
	bool new_session = false;
	bool new_tunnel = false;
	int error;

	error = pppol2tp_sockaddr_get_info(uservaddr, sockaddr_len, &info);
	if (error < 0)
		return error;

	lock_sock(sk);

	/* Check for already bound sockets */
	error = -EBUSY;
	if (sk->sk_state & PPPOX_CONNECTED)
		goto end;

	/* We don't supporting rebinding anyway */
	error = -EALREADY;
	if (sk->sk_user_data)
		goto end; /* socket is already attached */

	/* Don't bind if tunnel_id is 0 */
	error = -EINVAL;
	if (!info.tunnel_id)
		goto end;
	*new_tunnel = false;

	tunnel = l2tp_tunnel_get(sock_net(sk), info.tunnel_id);
	if (tunnel)
		drop_tunnel = true;
	tunnel = l2tp_tunnel_get(net, info->tunnel_id);

	/* Special case: create tunnel context if session_id and
	 * peer_session_id is 0. Otherwise look up tunnel using supplied
	 * tunnel id.
	 */
	if (!info.session_id && !info.peer_session_id) {
	if (!info->session_id && !info->peer_session_id) {
		if (!tunnel) {
			struct l2tp_tunnel_cfg tcfg = {
				.encap = L2TP_ENCAPTYPE_UDP,
@@ -706,40 +674,82 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,
			/* Prevent l2tp_tunnel_register() from trying to set up
			 * a kernel socket.
			 */
			if (info.fd < 0) {
				error = -EBADF;
				goto end;
			}
			if (info->fd < 0)
				return ERR_PTR(-EBADF);

			error = l2tp_tunnel_create(info.fd,
						   info.version,
						   info.tunnel_id,
						   info.peer_tunnel_id, &tcfg,
			error = l2tp_tunnel_create(info->fd,
						   info->version,
						   info->tunnel_id,
						   info->peer_tunnel_id, &tcfg,
						   &tunnel);
			if (error < 0)
				goto end;
				return ERR_PTR(error);

			l2tp_tunnel_inc_refcount(tunnel);
			error = l2tp_tunnel_register(tunnel, sock_net(sk),
						     &tcfg);
			error = l2tp_tunnel_register(tunnel, net, &tcfg);
			if (error < 0) {
				kfree(tunnel);
				goto end;
				return ERR_PTR(error);
			}
			drop_tunnel = true;
			new_tunnel = true;

			*new_tunnel = true;
		}
	} else {
		/* Error if we can't find the tunnel */
		error = -ENOENT;
		if (!tunnel)
			goto end;
			return ERR_PTR(-ENOENT);

		/* Error if socket is not prepped */
		if (!tunnel->sock)
			goto end;
		if (!tunnel->sock) {
			l2tp_tunnel_dec_refcount(tunnel);
			return ERR_PTR(-ENOENT);
		}
	}

	return tunnel;
}

/* connect() handler. Attach a PPPoX socket to a tunnel UDP socket
 */
static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,
			    int sockaddr_len, int flags)
{
	struct sock *sk = sock->sk;
	struct pppox_sock *po = pppox_sk(sk);
	struct l2tp_session *session = NULL;
	struct l2tp_connect_info info;
	struct l2tp_tunnel *tunnel;
	struct pppol2tp_session *ps;
	struct l2tp_session_cfg cfg = { 0, };
	bool drop_refcnt = false;
	bool new_session = false;
	bool new_tunnel = false;
	int error;

	error = pppol2tp_sockaddr_get_info(uservaddr, sockaddr_len, &info);
	if (error < 0)
		return error;

	/* Don't bind if tunnel_id is 0 */
	if (!info.tunnel_id)
		return -EINVAL;

	tunnel = pppol2tp_tunnel_get(sock_net(sk), &info, &new_tunnel);
	if (IS_ERR(tunnel))
		return PTR_ERR(tunnel);

	lock_sock(sk);

	/* Check for already bound sockets */
	error = -EBUSY;
	if (sk->sk_state & PPPOX_CONNECTED)
		goto end;

	/* We don't supporting rebinding anyway */
	error = -EALREADY;
	if (sk->sk_user_data)
		goto end; /* socket is already attached */

	if (tunnel->peer_tunnel_id == 0)
		tunnel->peer_tunnel_id = info.peer_tunnel_id;

@@ -840,7 +850,6 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,
	}
	if (drop_refcnt)
		l2tp_session_dec_refcount(session);
	if (drop_tunnel)
	l2tp_tunnel_dec_refcount(tunnel);
	release_sock(sk);

Loading