Merge "net: qualcomm: rmnet: Fix use after free while sending command ack"
This commit is contained in:
commit
28a395c729
|
@ -67,7 +67,7 @@ static void rmnet_map_send_ack(struct sk_buff *skb,
|
|||
struct rmnet_port *port)
|
||||
{
|
||||
struct rmnet_map_control_command *cmd;
|
||||
int xmit_status;
|
||||
struct net_device *dev = skb->dev;
|
||||
|
||||
if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV4)
|
||||
skb_trim(skb,
|
||||
|
@ -78,9 +78,9 @@ static void rmnet_map_send_ack(struct sk_buff *skb,
|
|||
cmd = RMNET_MAP_GET_CMD_START(skb);
|
||||
cmd->cmd_type = type & 0x03;
|
||||
|
||||
netif_tx_lock(skb->dev);
|
||||
xmit_status = skb->dev->netdev_ops->ndo_start_xmit(skb, skb->dev);
|
||||
netif_tx_unlock(skb->dev);
|
||||
netif_tx_lock(dev);
|
||||
dev->netdev_ops->ndo_start_xmit(skb, dev);
|
||||
netif_tx_unlock(dev);
|
||||
}
|
||||
|
||||
/* Process MAP command frame and send N/ACK message as appropriate. Message cmd
|
||||
|
|
|
@ -227,6 +227,10 @@ void rmnet_vnd_setup(struct net_device *rmnet_dev)
|
|||
|
||||
rmnet_dev->needs_free_netdev = true;
|
||||
rmnet_dev->ethtool_ops = &rmnet_ethtool_ops;
|
||||
|
||||
/* This perm addr will be used as interface identifier by IPv6 */
|
||||
rmnet_dev->addr_assign_type = NET_ADDR_RANDOM;
|
||||
eth_random_addr(rmnet_dev->perm_addr);
|
||||
}
|
||||
|
||||
/* Exposed API */
|
||||
|
|
|
@ -2216,6 +2216,7 @@ static int ipv6_generate_eui64(u8 *eui, struct net_device *dev)
|
|||
return addrconf_ifid_ieee1394(eui, dev);
|
||||
case ARPHRD_TUNNEL6:
|
||||
case ARPHRD_IP6GRE:
|
||||
case ARPHRD_RAWIP:
|
||||
return addrconf_ifid_ip6tnl(eui, dev);
|
||||
}
|
||||
return -1;
|
||||
|
@ -3247,7 +3248,8 @@ static void addrconf_dev_config(struct net_device *dev)
|
|||
(dev->type != ARPHRD_IP6GRE) &&
|
||||
(dev->type != ARPHRD_IPGRE) &&
|
||||
(dev->type != ARPHRD_TUNNEL) &&
|
||||
(dev->type != ARPHRD_NONE)) {
|
||||
(dev->type != ARPHRD_NONE) &&
|
||||
(dev->type != ARPHRD_RAWIP)) {
|
||||
/* Alas, we support only Ethernet autoconfiguration. */
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue