On 11/02/14 18:12, Andrew Lunn wrote:
- batadv_v_ogm_start_timer(bat_priv);
+out:
- return;
If you jump to out because netdev_alloc_skb_ip_align() failed, don't you want to start the timer again? I would assume it is a transient problem not being able to get memory for the skb, and the next time the timer goes off it might work?
Now that I think about it I agree with you. If netdev_alloc_skb_ip_align() fails either: - the situation is permanent -> OOM soon - or the situation is transient -> we should try re-scheduling the task.
- bat_priv->bat_v.ogm_buff_len = BATADV_OGM2_HLEN;
- ogm_buff = kmalloc(bat_priv->bat_v.ogm_buff_len, GFP_ATOMIC);
Maybe use kzalloc to ensure it is zero?
Not really needed because each field is explicitly assigned later. But to be sure we sit on the safe side we can do that: in the end we are not in the fastpath here.
Cheers,