On Mon, 2018-01-15 at 15:48 +0100, Benjamin Beichler wrote:

> > > +         if (get_hwsim_data_ref_from_addr(
> > > +                         nla_data(info->attrs[HWSIM_ATTR_PERM_ADDR]))) {
> > > +                 pr_debug("mac80211_hwsim: perm MAC already in use\n");
> > > +                 return -EINVAL;
> > > +         }
> > 
> > This is racy afaict - remove it and return a clash later when you fail
> > to insert the new radio.
> 
> Ehm yes, actually exactly this test is already in the rhashtable patch.
> But maybe I should also change there the error print to a NL_ERR_MSG() ?

Oh, really? I just sent that out, but whatever, we have enough time to
fix it :-)

And yes, using netlink extended ack messages here as well would be
good.

johannes

Reply via email to