netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Jiri Benc <jbenc@suse.cz>
Cc: netdev <netdev@vger.kernel.org>, Ivo Van Doorn <ivdoorn@gmail.com>
Subject: d80211: ieee80211_hw handlers in atomic context
Date: Wed, 04 Oct 2006 17:59:57 +0200	[thread overview]
Message-ID: <4523DA7D.2080604@web.de> (raw)

Hello Jiri,

Ivo suggested to bring this issue to a broader audience, specifically to
the stack maintainer.

Trying to run my Asus WL167G with rt2500usb I faced the following:

BUG: scheduling while atomic: swapper/0x00000102/0
 <c0103055> show_trace+0x12/0x14
 <c01035e0> dump_stack+0x1c/0x1e
 <c025fad1> schedule+0x5f/0x652
 <c0260324> wait_for_completion+0xb8/0x134
 <d0988fa1> usb_start_wait_urb+0x89/0xcb [usbcore]
 <d0989192> usb_control_msg+0xb2/0xcc [usbcore]
 <d089d127> rt2x00_vendor_request+0x85/0xbb [rt2500usb]
 <d08a1350> rt2500usb_config+0x5e/0x3d7 [rt2500usb]
 <d0823496> ieee80211_hw_config+0x2c/0x93 [80211]
 <d0829950> ieee80211_ioctl_siwfreq+0x132/0x141 [80211]
 <d082ee8b> ieee80211_sta_join_ibss+0xcc/0x5af [80211]
 <d082f698> ieee80211_sta_find_ibss+0x32a/0x374 [80211]
 <d08317f8> ieee80211_sta_timer+0x81/0x1b4 [80211]
 <c011ac50> run_timer_softirq+0x171/0x205
 <c0117536> __do_softirq+0x41/0x90
 <c01175bc> do_softirq+0x37/0x4a
 <c01176b7> irq_exit+0x2d/0x45
 <c0104316> do_IRQ+0x53/0x5f

The reason is the invocation of rt2500usb's config handler in atomic
context (timer handler). But this service requires schedulable context
to submit and wait for some URBs.

That raises the question how to resolve the conflict best, at stack
level by pushing such work into thread context (workqueues?) or at
driver level by deferring these requests (if feasible at all without
breaking the stack's timing)? What other callback handlers in
ieee80211_hw can currently be called in atomic context? Given that all
USB WLAN adapters will have to cope with this issue in some way, it may
be wise to find a common solution.

Ivo told me about a patch for d80211 that moved certain timers to thread
context, effectively avoiding to call config from timer handlers, but I
didn't find any trace yet. Is there some modification in this direction
already scheduled? I'm not necessarily looking for work, at best I would
just enjoy to use it. ;)

Jan

             reply	other threads:[~2006-10-04 16:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-04 15:59 Jan Kiszka [this message]
2006-10-04 16:07 ` d80211: ieee80211_hw handlers in atomic context Ivo van Doorn
2006-10-04 16:31   ` Jan Kiszka
2006-10-04 16:34     ` Ivo van Doorn
2006-10-04 16:38       ` Jiri Benc
2006-10-04 16:51         ` Jan Kiszka
2006-10-04 17:22           ` Ivo van Doorn
2006-10-05 11:37             ` Jiri Benc
2006-10-05 15:00               ` Ivo van Doorn
2006-10-05 15:13                 ` Jan Kiszka
2006-10-05 15:32                   ` Ivo van Doorn
2006-10-05 15:39                     ` Jiri Benc
2006-10-05 15:39                       ` Ivo van Doorn
2006-10-05 15:13                 ` Jiri Benc
2006-10-05 15:35                   ` Ivo van Doorn
2006-10-05 11:29           ` Jiri Benc
2006-10-05 14:52             ` Ivo van Doorn
2006-10-04 16:11 ` Jiri Benc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4523DA7D.2080604@web.de \
    --to=jan.kiszka@web.de \
    --cc=ivdoorn@gmail.com \
    --cc=jbenc@suse.cz \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).