Skip to content

Commit adf6f8c

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Merge in networking bug fixes for merge window. Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents c431047 + e58c191 commit adf6f8c

9 files changed

Lines changed: 22 additions & 11 deletions

File tree

‎drivers/net/dsa/sja1105/sja1105_main.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -557,15 +557,15 @@ static int sja1105_parse_rgmii_delays(struct sja1105_private *priv,
557557
int i;
558558

559559
for (i = 0; i < SJA1105_NUM_PORTS; i++) {
560-
if (ports->role == XMII_MAC)
560+
if (ports[i].role == XMII_MAC)
561561
continue;
562562

563-
if (ports->phy_mode == PHY_INTERFACE_MODE_RGMII_RXID ||
564-
ports->phy_mode == PHY_INTERFACE_MODE_RGMII_ID)
563+
if (ports[i].phy_mode == PHY_INTERFACE_MODE_RGMII_RXID ||
564+
ports[i].phy_mode == PHY_INTERFACE_MODE_RGMII_ID)
565565
priv->rgmii_rx_delay[i] = true;
566566

567-
if (ports->phy_mode == PHY_INTERFACE_MODE_RGMII_TXID ||
568-
ports->phy_mode == PHY_INTERFACE_MODE_RGMII_ID)
567+
if (ports[i].phy_mode == PHY_INTERFACE_MODE_RGMII_TXID ||
568+
ports[i].phy_mode == PHY_INTERFACE_MODE_RGMII_ID)
569569
priv->rgmii_tx_delay[i] = true;
570570

571571
if ((priv->rgmii_rx_delay[i] || priv->rgmii_tx_delay[i]) &&

‎drivers/net/macvlan.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,11 @@ static void macvlan_broadcast_enqueue(struct macvlan_port *port,
359359
}
360360
spin_unlock(&port->bc_queue.lock);
361361

362+
schedule_work(&port->bc_work);
363+
362364
if (err)
363365
goto free_nskb;
364366

365-
schedule_work(&port->bc_work);
366367
return;
367368

368369
free_nskb:

‎drivers/net/phy/mdio_bus.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ static int mdiobus_register_reset(struct mdio_device *mdiodev)
6262
struct reset_control *reset = NULL;
6363

6464
if (mdiodev->dev.of_node)
65-
reset = devm_reset_control_get_exclusive(&mdiodev->dev,
66-
"phy");
65+
reset = of_reset_control_get_exclusive(mdiodev->dev.of_node,
66+
"phy");
6767
if (IS_ERR(reset)) {
6868
if (PTR_ERR(reset) == -ENOENT || PTR_ERR(reset) == -ENOTSUPP)
6969
reset = NULL;
@@ -107,6 +107,8 @@ int mdiobus_unregister_device(struct mdio_device *mdiodev)
107107
if (mdiodev->bus->mdio_map[mdiodev->addr] != mdiodev)
108108
return -EINVAL;
109109

110+
reset_control_put(mdiodev->reset_ctrl);
111+
110112
mdiodev->bus->mdio_map[mdiodev->addr] = NULL;
111113

112114
return 0;

‎drivers/net/slip/slip.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,7 @@ static int slip_open(struct tty_struct *tty)
855855
sl->tty = NULL;
856856
tty->disc_data = NULL;
857857
clear_bit(SLF_INUSE, &sl->flags);
858+
sl_free_netdev(sl->dev);
858859
free_netdev(sl->dev);
859860

860861
err_exit:

‎include/net/sctp/structs.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,6 +1243,9 @@ struct sctp_ep_common {
12431243
/* What socket does this endpoint belong to? */
12441244
struct sock *sk;
12451245

1246+
/* Cache netns and it won't change once set */
1247+
struct net *net;
1248+
12461249
/* This is where we receive inbound chunks. */
12471250
struct sctp_inq inqueue;
12481251

‎net/sctp/associola.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ static struct sctp_association *sctp_association_init(
6464
/* Discarding const is appropriate here. */
6565
asoc->ep = (struct sctp_endpoint *)ep;
6666
asoc->base.sk = (struct sock *)sk;
67+
asoc->base.net = sock_net(sk);
6768

6869
sctp_endpoint_hold(asoc->ep);
6970
sock_hold(asoc->base.sk);

‎net/sctp/endpointola.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
110110

111111
/* Remember who we are attached to. */
112112
ep->base.sk = sk;
113+
ep->base.net = sock_net(sk);
113114
sock_hold(ep->base.sk);
114115

115116
return ep;

‎net/sctp/input.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ static inline int sctp_hash_cmp(struct rhashtable_compare_arg *arg,
882882
if (!sctp_transport_hold(t))
883883
return err;
884884

885-
if (!net_eq(sock_net(t->asoc->base.sk), x->net))
885+
if (!net_eq(t->asoc->base.net, x->net))
886886
goto out;
887887
if (x->lport != htons(t->asoc->base.bind_addr.port))
888888
goto out;
@@ -897,7 +897,7 @@ static inline __u32 sctp_hash_obj(const void *data, u32 len, u32 seed)
897897
{
898898
const struct sctp_transport *t = data;
899899

900-
return sctp_hashfn(sock_net(t->asoc->base.sk),
900+
return sctp_hashfn(t->asoc->base.net,
901901
htons(t->asoc->base.bind_addr.port),
902902
&t->ipaddr, seed);
903903
}

‎net/sctp/sm_statefuns.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2160,8 +2160,10 @@ enum sctp_disposition sctp_sf_do_5_2_4_dupcook(
21602160

21612161
/* Update socket peer label if first association. */
21622162
if (security_sctp_assoc_request((struct sctp_endpoint *)ep,
2163-
chunk->skb))
2163+
chunk->skb)) {
2164+
sctp_association_free(new_asoc);
21642165
return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
2166+
}
21652167

21662168
/* Set temp so that it won't be added into hashtable */
21672169
new_asoc->temp = 1;

0 commit comments

Comments
 (0)