[PATCH 39/64] mac80211: Use memset_after() to clear tx status
Johannes Berg
johannes at sipsolutions.net
Fri Aug 13 07:41:40 UTC 2021
On Sat, 2021-07-31 at 08:55 -0700, Kees Cook wrote:
>
> > @@ -278,9 +278,7 @@ static void carl9170_tx_release(struct kref *ref)
> > BUILD_BUG_ON(
> > offsetof(struct ieee80211_tx_info, status.ack_signal) != 20);
> >
> >
> > - memset(&txinfo->status.ack_signal, 0,
> > - sizeof(struct ieee80211_tx_info) -
> > - offsetof(struct ieee80211_tx_info, status.ack_signal));
> > + memset_after(&txinfo->status, 0, rates);
FWIW, I think we should also remove the BUILD_BUG_ON() now in all the
places - that was meant to give people a hint to update if some field
ordering etc. changed, but now that it's "after rates" this is no longer
necessary.
johannes
More information about the dri-devel
mailing list