Johannes Berg c1df932c05 mac80211: fix off-channel mgmt-tx uninitialized variable usage
In the last change here, I neglected to update the cookie in one code
path: when a mgmt-tx has no real cookie sent to userspace as it doesn't
wait for a response, but is off-channel. The original code used the SKB
pointer as the cookie and always assigned the cookie to the TX SKB in
ieee80211_start_roc_work(), but my change turned this around and made
the code rely on a valid cookie being passed in.

Unfortunately, the off-channel no-wait TX path wasn't assigning one at
all, resulting in an uninitialized stack value being used. This wasn't
handed back to userspace as a cookie (since in the no-wait case there
isn't a cookie), but it was tested for non-zero to distinguish between
mgmt-tx and off-channel.

Fix this by assigning a dummy non-zero cookie unconditionally, and get
rid of a misleading comment and some dead code while at it. I'll clean
up the ACK SKB handling separately later.

Fixes: 3b79af973cf4 ("mac80211: stop using pointers as userspace cookies")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-02 22:27:53 +01:00
..
2015-01-27 11:07:35 +01:00
2015-01-27 11:09:13 +01:00
2014-11-04 13:18:21 +01:00
2014-04-09 14:49:43 +02:00
2015-03-30 10:48:26 +02:00
2015-08-14 17:49:53 +02:00
2015-07-17 15:37:54 +02:00
2015-07-17 15:38:01 +02:00
2015-05-11 19:16:04 +02:00
2015-10-14 18:40:26 +02:00
2015-11-03 10:42:47 +01:00
2014-04-09 14:49:43 +02:00
2015-11-03 10:42:47 +01:00
2013-12-18 10:33:06 +01:00
2015-05-11 14:51:29 +02:00
2012-03-13 14:54:16 -04:00
2015-10-14 18:40:26 +02:00