Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1654971
| From | Kalle Valo <kvalo@codeaurora.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: cw1200: Fix a sleep-in-atomic bug in cw1200_tx_confirm_cb and cw1200_cqm_bssloss_sm |
| Date | 2017-06-01 11:50 +0200 |
| Message-ID | <tNuTU-Pb-9@gated-at.bofh.it> (permalink) |
| References | <tNobL-52F-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Jia-Ju Bai <baijiaju1990@163.com> wrote: > The driver may sleep under a spin lock, and the function call path is: > cw1200_tx_confirm_cb (acquire the lock by spin_lock) > __cw1200_cqm_bssloss_sm > cancel_work_sync --> may sleep > > cw1200_cqm_bssloss_sm > __cw1200_cqm_bssloss_sm > cancel_work_sync --> may sleep > > To fix it, the lock is released before cancel_work_sync, and the lock > is acquired again after this function. > > Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com> I assume that you haven't tested this on a real device and only compile tested. You should mention that in the commit log. Releasing a lock held by calling function is evil. Did you do any lock analysis or are you just blindly releasing locks to fix a warning in your tool? Also I would like to have an ack from a reviewer before I can take patches like this. Patch set to Changes Requested. -- https://patchwork.kernel.org/patch/9758613/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] cw1200: Fix a sleep-in-atomic bug in cw1200_tx_confirm_cb and cw1200_cqm_bssloss_sm Jia-Ju Bai <baijiaju1990@163.com> - 2017-06-01 04:40 +0200 Re: cw1200: Fix a sleep-in-atomic bug in cw1200_tx_confirm_cb and cw1200_cqm_bssloss_sm Kalle Valo <kvalo@codeaurora.org> - 2017-06-01 11:50 +0200
csiph-web