Skip to content
  • Jérôme Pouiller's avatar
    29d84944
    staging: wfx: fix the warning "inconsistent notification" · 29d84944
    Jérôme Pouiller authored
    
    
    In some circumstances, Tx traffic is sent without associated station but
    the station exists when the Tx status is received. Beside that, the
    driver keep a counter associated to each station. So, in this case, the
    counter is not incremented, but is decremented. In this case a warning
    "inconsistent notification" appears:
    
       ------------[ cut here ]------------
       WARNING: CPU: 3 PID: 82 at /home/jerome/wfx/data_tx.c:469 wfx_skb_dtor+0x1a4/0x1d4 [wfx]
       inconsistent notification
       Modules linked in: [...]
       CPU: 3 PID: 82 Comm: kworker/3:1H Tainted: G         C O      4.19.57-v7l+ #1244
       Hardware name: BCM2835
       Workqueue: events_highpri bh_work [wfx]
       [<c0212c8c>] (unwind_backtrace) from [<c020d49c>] (show_stack+0x20/0x24)
       [<c020d49c>] (show_stack) from [<c0976220>] (dump_stack+0xd4/0x118)
       [<c0976220>] (dump_stack) from [<c0222270>] (__warn+0x104/0x11c)
       [<c0222270>] (__warn) from [<c02222e0>] (warn_slowpath_fmt+0x58/0x74)
       [<c02222e0>] (warn_slowpath_fmt) from [<bf497b48>] (wfx_skb_dtor+0x1a4/0x1d4 [wfx])
       [<bf497b48>] (wfx_skb_dtor [wfx]) from [<bf4988b4>] (wfx_tx_confirm_cb+0x198/0x2f0 [wfx])
       [<bf4988b4>] (wfx_tx_confirm_cb [wfx]) from [<bf49d054>] (hif_tx_confirm+0x50/0x70 [wfx])
       [<bf49d054>] (hif_tx_confirm [wfx]) from [<bf49d42c>] (wfx_handle_rx+0x128/0x22c [wfx])
       [<bf49d42c>] (wfx_handle_rx [wfx]) from [<bf4953cc>] (bh_work+0x3cc/0x964 [wfx])
       [<bf4953cc>] (bh_work [wfx]) from [<c023dab8>] (process_one_work+0x170/0x458)
       [<c023dab8>] (process_one_work) from [<c023ddfc>] (worker_thread+0x5c/0x5a4)
       [<c023ddfc>] (worker_thread) from [<c02440e8>] (kthread+0x138/0x168)
       [<c02440e8>] (kthread) from [<c02010ac>] (ret_from_fork+0x14/0x28)
       Exception stack(0xee199fb0 to 0xee199ff8)
       9fa0:                                     00000000 00000000 00000000 00000000
       9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
       9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
       ---[ end trace 64b9e754e12ef7de ]---
    
    This patch fix this race between the station creation and the Tx data.
    
    Fixes: 7d2d2bfd ("staging: wfx: relocate "buffered" information to sta_priv")
    Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
    Link: https://lore.kernel.org/r/20200427134031.323403-11-Jerome.Pouiller@silabs.com
    
    
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    29d84944
    staging: wfx: fix the warning "inconsistent notification"
    Jérôme Pouiller authored
    
    
    In some circumstances, Tx traffic is sent without associated station but
    the station exists when the Tx status is received. Beside that, the
    driver keep a counter associated to each station. So, in this case, the
    counter is not incremented, but is decremented. In this case a warning
    "inconsistent notification" appears:
    
       ------------[ cut here ]------------
       WARNING: CPU: 3 PID: 82 at /home/jerome/wfx/data_tx.c:469 wfx_skb_dtor+0x1a4/0x1d4 [wfx]
       inconsistent notification
       Modules linked in: [...]
       CPU: 3 PID: 82 Comm: kworker/3:1H Tainted: G         C O      4.19.57-v7l+ #1244
       Hardware name: BCM2835
       Workqueue: events_highpri bh_work [wfx]
       [<c0212c8c>] (unwind_backtrace) from [<c020d49c>] (show_stack+0x20/0x24)
       [<c020d49c>] (show_stack) from [<c0976220>] (dump_stack+0xd4/0x118)
       [<c0976220>] (dump_stack) from [<c0222270>] (__warn+0x104/0x11c)
       [<c0222270>] (__warn) from [<c02222e0>] (warn_slowpath_fmt+0x58/0x74)
       [<c02222e0>] (warn_slowpath_fmt) from [<bf497b48>] (wfx_skb_dtor+0x1a4/0x1d4 [wfx])
       [<bf497b48>] (wfx_skb_dtor [wfx]) from [<bf4988b4>] (wfx_tx_confirm_cb+0x198/0x2f0 [wfx])
       [<bf4988b4>] (wfx_tx_confirm_cb [wfx]) from [<bf49d054>] (hif_tx_confirm+0x50/0x70 [wfx])
       [<bf49d054>] (hif_tx_confirm [wfx]) from [<bf49d42c>] (wfx_handle_rx+0x128/0x22c [wfx])
       [<bf49d42c>] (wfx_handle_rx [wfx]) from [<bf4953cc>] (bh_work+0x3cc/0x964 [wfx])
       [<bf4953cc>] (bh_work [wfx]) from [<c023dab8>] (process_one_work+0x170/0x458)
       [<c023dab8>] (process_one_work) from [<c023ddfc>] (worker_thread+0x5c/0x5a4)
       [<c023ddfc>] (worker_thread) from [<c02440e8>] (kthread+0x138/0x168)
       [<c02440e8>] (kthread) from [<c02010ac>] (ret_from_fork+0x14/0x28)
       Exception stack(0xee199fb0 to 0xee199ff8)
       9fa0:                                     00000000 00000000 00000000 00000000
       9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
       9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
       ---[ end trace 64b9e754e12ef7de ]---
    
    This patch fix this race between the station creation and the Tx data.
    
    Fixes: 7d2d2bfd ("staging: wfx: relocate "buffered" information to sta_priv")
    Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
    Link: https://lore.kernel.org/r/20200427134031.323403-11-Jerome.Pouiller@silabs.com
    
    
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading