[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1491594063.5800.15.camel@sipsolutions.net>
Date: Fri, 07 Apr 2017 21:41:03 +0200
From: Johannes Berg <johannes@...solutions.net>
To: linux-wireless@...r.kernel.org, netdev@...r.kernel.org
Cc: pablo@...filter.org
Subject: Re: [RFC 1/3] netlink: extended error reporting
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
Powered by blists - more mailing lists