OSDN Git Service

staging: rtl8188eu: use GFP_ATOMIC under spinlock
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 8 Jul 2014 10:54:23 +0000 (13:54 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2014 19:19:36 +0000 (12:19 -0700)
commit11306d1f20ca4ef8a0f383618423e0ee7979e94a
treebf95a0c4726d58f63cf3b5e01257e0bd8a6978d8
parenta5bde3a163cc4701e693c7c1d9cb9d6c9b888c75
staging: rtl8188eu: use GFP_ATOMIC under spinlock

We're holding a spinlock here so we can't do sleeping allocations.
The call tree is:
  rtw_sta_flush() <-- takes spin_lock_bh(&pstapriv->asoc_list_lock);
  --> ap_free_sta()
      --> rtw_clearstakey_cmd()

Originally these calls were rtw_zmalloc() and then we switched them to
kzalloc() in fadbe0cd5292 ('staging: rtl8188eu:Remove rtw_zmalloc(),
wrapper for kzalloc()') and that made the bugs show up for my static
checker.  The original code was buggy as well but my static checker
couldn't parse it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_cmd.c