提交 3329bdfc 编写于 作者: D David S. Miller

decnet: Add missing neigh->ha locking to dn_neigh_output_packet()

Basically, mirror the logic in neigh_connected_output().
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f79d52c2
...@@ -205,17 +205,23 @@ static int dn_neigh_output_packet(struct sk_buff *skb) ...@@ -205,17 +205,23 @@ static int dn_neigh_output_packet(struct sk_buff *skb)
struct neighbour *neigh = dst_get_neighbour_noref(dst); struct neighbour *neigh = dst_get_neighbour_noref(dst);
struct net_device *dev = neigh->dev; struct net_device *dev = neigh->dev;
char mac_addr[ETH_ALEN]; char mac_addr[ETH_ALEN];
unsigned int seq;
int err;
dn_dn2eth(mac_addr, rt->rt_local_src); dn_dn2eth(mac_addr, rt->rt_local_src);
if (dev_hard_header(skb, dev, ntohs(skb->protocol), neigh->ha, do {
mac_addr, skb->len) >= 0) seq = read_seqbegin(&neigh->ha_lock);
return dev_queue_xmit(skb); err = dev_hard_header(skb, dev, ntohs(skb->protocol),
neigh->ha, mac_addr, skb->len);
if (net_ratelimit()) } while (read_seqretry(&neigh->ha_lock, seq));
printk(KERN_DEBUG "dn_neigh_output_packet: oops, can't send packet\n");
if (err >= 0)
kfree_skb(skb); err = dev_queue_xmit(skb);
return -EINVAL; else {
kfree_skb(skb);
err = -EINVAL;
}
return err;
} }
static int dn_long_output(struct neighbour *neigh, struct sk_buff *skb) static int dn_long_output(struct neighbour *neigh, struct sk_buff *skb)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册