On Fri, 2017-04-07 at 20:26 +0200, Johannes Berg wrote:
> 
> +     if (nlk->flags & NETLINK_F_EXT_ACK) {
> +             if (exterr && exterr->msg)
> +                     WARN_ON(nla_put_string(skb,
> NLMSGERR_ATTR_MSG,
> +                                            exterr->msg));
> +             if (exterr && exterr->msg_offset)
> +                     WARN_ON(nla_put_u32(skb, NLMSGERR_ATTR_OFFS,
> +                                         exterr->msg_offset));
> +             if (exterr && exterr->attr)
> +                     WARN_ON(nla_put_u16(skb, NLMSGERR_ATTR_ATTR,
> +                                         exterr->attr));
> +     }

I forgot to check (err != 0) here, which can cause inconsistencies -
noticed that while just adding the error case Jamal wanted. I'll send
out that as a separate patch, and squash it later when I resubmit.

johannes

Reply via email to