Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1320480

Re: [PATCH] net/mac80211/agg-rx.c: fix use of uninitialised values

From Johannes Berg <johannes@sipsolutions.net>
Newsgroups linux.kernel
Subject Re: [PATCH] net/mac80211/agg-rx.c: fix use of uninitialised values
Date 2016-01-28 10:50 +0100
Message-ID <qVRnd-1sZ-23@gated-at.bofh.it> (permalink)
References <qV9Pc-3ib-11@gated-at.bofh.it> <qVAw3-5GW-29@gated-at.bofh.it> <qVHHc-2KP-21@gated-at.bofh.it> <qVRnd-1sZ-25@gated-at.bofh.it> <qVHHc-2KP-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 2016-01-28 at 10:27 +1100, Julian Calaby wrote:
> 
> This looks like a "big hammer" solution to this problem.

It is, in a way, but it also avoids future errors like it.

> I'd prefer to just set ->removed to false right after we set
> ->auto_seq as that should be faster, however I don't know if
> __ieee80211_start_rx_ba_session() is a fast path so I don't know if
> this is saving anything.

It's not supposed to be called frequently, no.

> On another note, this is an error that should be pretty easy to spot.
> Could any of the automated tools find cases where a struct containing
> a bool variable is kmalloc'd and returned without assigning all the
> bools?

I think you'd quickly drown in false positives, since "return" isn't
necessarily something that means it needs to have been fully
initialized.

johannes

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

UBSAN: Undefined behaviour in net/mac80211/rx.c:924:18 Chris Bainbridge <chris.bainbridge@gmail.com> - 2016-01-26 12:20 +0100
  [PATCH] net/mac80211/agg-rx.c: fix use of uninitialised values Chris Bainbridge <chris.bainbridge@gmail.com> - 2016-01-27 16:50 +0100
    Re: [PATCH] net/mac80211/agg-rx.c: fix use of uninitialised values Julian Calaby <julian.calaby@gmail.com> - 2016-01-28 00:30 +0100
      Re: [PATCH] net/mac80211/agg-rx.c: fix use of uninitialised values Johannes Berg <johannes@sipsolutions.net> - 2016-01-28 10:50 +0100
        Re: [PATCH] net/mac80211/agg-rx.c: fix use of uninitialised values Julian Calaby <julian.calaby@gmail.com> - 2016-01-28 11:20 +0100
          Re: [PATCH] net/mac80211/agg-rx.c: fix use of uninitialised values Julia Lawall <julia.lawall@lip6.fr> - 2016-01-28 11:30 +0100
      Re: [PATCH] net/mac80211/agg-rx.c: fix use of uninitialised values Johannes Berg <johannes@sipsolutions.net> - 2016-01-28 13:40 +0100
      Re: [PATCH] net/mac80211/agg-rx.c: fix use of uninitialised values Dan Carpenter <dan.carpenter@oracle.com> - 2016-01-28 13:40 +0100
    Re: [PATCH] net/mac80211/agg-rx.c: fix use of uninitialised values Johannes Berg <johannes@sipsolutions.net> - 2016-01-28 10:50 +0100

csiph-web