lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 06 Mar 2023 21:45:16 +0100
From:   Johannes Berg <johannes@...solutions.net>
To:     Simon Horman <simon.horman@...igine.com>,
        Jaewan Kim <jaewan@...gle.com>
Cc:     gregkh@...uxfoundation.org, linux-wireless@...r.kernel.org,
        netdev@...r.kernel.org, kernel-team@...roid.com, adelva@...gle.com
Subject: Re: [PATCH v8 3/5] mac80211_hwsim: add PMSR request support via
 virtio

On Mon, 2023-03-06 at 18:12 +0100, Simon Horman wrote:
> 
> >  
> > +static int mac80211_hwsim_send_pmsr_ftm_request_peer(struct sk_buff *msg,
> > +						     struct cfg80211_pmsr_ftm_request_peer *request)
> > +{
> > +	struct nlattr *ftm;
> > +
> > +	if (!request->requested)
> > +		return -EINVAL;
> > +
> > +	ftm = nla_nest_start(msg, NL80211_PMSR_TYPE_FTM);
> > +	if (!ftm)
> > +		return -ENOBUFS;
> > +
> > +	if (nla_put_u32(msg, NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE, request->preamble))
> 
> nit: I suspect that you need to invoke nla_nest_cancel() in
>      error paths to unwind nla_nest_start() calls.

The entire message is discarded if that happens, I think? Doesn't seem
all that necessary in that case.

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ