]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
wifi: mac80211_hwsim: add back erroneously removed cast
authorJohannes Berg <johannes.berg@intel.com>
Mon, 11 Jul 2022 11:14:24 +0000 (13:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2022 13:15:19 +0000 (15:15 +0200)
commit 58b6259d820d63c2adf1c7541b54cce5a2ae6073 upstream.

The robots report that we're now casting to a differently
sized integer, which is correct, and the previous patch
had erroneously removed it.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 4ee186fa7e40 ("wifi: mac80211_hwsim: fix race condition in pending packet")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Cc: Jeongik Cha <jeongik@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/mac80211_hwsim.c

index 1a769c66ce67e52ca834ee80fa93a667009045fb..9a18ea28a490d76b906cae740dd28a2223e4a9c6 100644 (file)
@@ -3540,7 +3540,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,
                u64 skb_cookie;
 
                txi = IEEE80211_SKB_CB(skb);
-               skb_cookie = (u64)txi->rate_driver_data[0];
+               skb_cookie = (u64)(uintptr_t)txi->rate_driver_data[0];
 
                if (skb_cookie == ret_skb_cookie) {
                        __skb_unlink(skb, &data2->pending);