Search Linux Wireless

Re: [PATCH] nl80211: fix nlmsg allocation in cfg80211_ft_event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2018-05-17 at 11:43 -0700, Jeff Johnson wrote:
> 
> > -	msg = nlmsg_new(100 + ft_event->ric_ies_len, GFP_KERNEL);
> > +	msg = nlmsg_new(100 + ft_event->ies_len + ft_event->ric_ies_len,
> > +			GFP_KERNEL);
> >  	if (!msg)
> >  		return;
> 
> should these really be nla_total_size(ft_event->ies_len) + 
> nla_total_size(ft_event->ric_ies_len) to properly account for the NLA 
> header + padding? or do we consider that to be noise captured by the 
> "100"?

We do, technically we should have something like nla_total_size() of
various things including all those wiphy, ifindex, MAC attributes etc.
so we just get lazy...

johannes



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux