mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Conflicting commits, all resolutions pretty trivial: drivers/bus/mhi/pci_generic.c5c2c853159("bus: mhi: pci-generic: configurable network interface MRU")56f6f4c4eb("bus: mhi: pci_generic: Apply no-op for wake using sideband wake boolean") drivers/nfc/s3fwrn5/firmware.ca0302ff590("nfc: s3fwrn5: remove unnecessary label")46573e3ab0("nfc: s3fwrn5: fix undefined parameter values in dev_err()")801e541c79("nfc: s3fwrn5: fix undefined parameter values in dev_err()") MAINTAINERS7d901a1e87("net: phy: add Maxlinear GPY115/21x/24x driver")8a7b46fa79("MAINTAINERS: add Yasushi SHOJI as reviewer for the Microchip CAN BUS Analyzer Tool driver") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -1076,11 +1076,16 @@ static bool j1939_session_deactivate_locked(struct j1939_session *session)
|
||||
|
||||
static bool j1939_session_deactivate(struct j1939_session *session)
|
||||
{
|
||||
struct j1939_priv *priv = session->priv;
|
||||
bool active;
|
||||
|
||||
j1939_session_list_lock(session->priv);
|
||||
j1939_session_list_lock(priv);
|
||||
/* This function should be called with a session ref-count of at
|
||||
* least 2.
|
||||
*/
|
||||
WARN_ON_ONCE(kref_read(&session->kref) < 2);
|
||||
active = j1939_session_deactivate_locked(session);
|
||||
j1939_session_list_unlock(session->priv);
|
||||
j1939_session_list_unlock(priv);
|
||||
|
||||
return active;
|
||||
}
|
||||
@@ -1874,7 +1879,7 @@ static void j1939_xtp_rx_dat_one(struct j1939_session *session,
|
||||
if (!session->transmission)
|
||||
j1939_tp_schedule_txtimer(session, 0);
|
||||
} else {
|
||||
j1939_tp_set_rxtimeout(session, 250);
|
||||
j1939_tp_set_rxtimeout(session, 750);
|
||||
}
|
||||
session->last_cmd = 0xff;
|
||||
consume_skb(se_skb);
|
||||
|
||||
+18
-2
@@ -546,10 +546,18 @@ static int raw_setsockopt(struct socket *sock, int level, int optname,
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
rtnl_lock();
|
||||
lock_sock(sk);
|
||||
|
||||
if (ro->bound && ro->ifindex)
|
||||
if (ro->bound && ro->ifindex) {
|
||||
dev = dev_get_by_index(sock_net(sk), ro->ifindex);
|
||||
if (!dev) {
|
||||
if (count > 1)
|
||||
kfree(filter);
|
||||
err = -ENODEV;
|
||||
goto out_fil;
|
||||
}
|
||||
}
|
||||
|
||||
if (ro->bound) {
|
||||
/* (try to) register the new filters */
|
||||
@@ -588,6 +596,7 @@ static int raw_setsockopt(struct socket *sock, int level, int optname,
|
||||
dev_put(dev);
|
||||
|
||||
release_sock(sk);
|
||||
rtnl_unlock();
|
||||
|
||||
break;
|
||||
|
||||
@@ -600,10 +609,16 @@ static int raw_setsockopt(struct socket *sock, int level, int optname,
|
||||
|
||||
err_mask &= CAN_ERR_MASK;
|
||||
|
||||
rtnl_lock();
|
||||
lock_sock(sk);
|
||||
|
||||
if (ro->bound && ro->ifindex)
|
||||
if (ro->bound && ro->ifindex) {
|
||||
dev = dev_get_by_index(sock_net(sk), ro->ifindex);
|
||||
if (!dev) {
|
||||
err = -ENODEV;
|
||||
goto out_err;
|
||||
}
|
||||
}
|
||||
|
||||
/* remove current error mask */
|
||||
if (ro->bound) {
|
||||
@@ -627,6 +642,7 @@ static int raw_setsockopt(struct socket *sock, int level, int optname,
|
||||
dev_put(dev);
|
||||
|
||||
release_sock(sk);
|
||||
rtnl_unlock();
|
||||
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user