On Fri, 2017-01-06 at 18:39 +0100, Jesper Dangaard Brouer wrote:
> @@ -648,13 +668,17 @@ void icmp_send(struct sk_buff *skb_in, int type, int > code, __be32 info) > } > } > > - icmp_param = kmalloc(sizeof(*icmp_param), GFP_ATOMIC); > - if (!icmp_param) > - return; > - > sk = icmp_xmit_lock(net); > if (!sk) > - goto out_free; > + goto out; > + > + /* Check global sysctl_icmp_msgs_per_sec ratelimit */ > + if (!icmpv4_global_allow(net, type, code)) > + goto out_unlock; > + > + icmp_param = kmalloc(sizeof(*icmp_param), GFP_ATOMIC); > + if (!icmp_param) > + goto out_unlock; Truth be told, I have no idea why we allocate dynamic memory for "struct icmp_bxm " : It is 112 bytes.