Bug 7120 - raw1394: ARM requests call sleeping functions in atomic context
Summary: raw1394: ARM requests call sleeping functions in atomic context
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: IEEE1394 (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Stefan Richter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-07 12:02 UTC by Stefan Richter
Modified: 2006-10-01 15:40 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.17
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
proposed fix to arm_{register,unregister,get_buf,set_buf} (5.09 KB, patch)
2006-09-14 13:10 UTC, Stefan Richter
Details | Diff

Description Stefan Richter 2006-09-07 12:02:19 UTC
Most recent kernel where this bug did not occur: unknown

(kernel used was actually 2.6.17.11 plus 1394 driver updates from end of August
2006)

Problem Description: Some of libraw1394's ARM related requests cause raw1394 to
call sleeping functions while interrupts are disabled. This leads to warnings (I
suppose if the kernel was compiled with sleep-inside-spinlock checking) or to
lockups if the sleeping functions actually need to sleep.

Sep  7 20:47:50 shuttle kernel: BUG: sleeping function called from invalid
context at arch/i386/lib/usercopy.c:607
Sep  7 20:47:50 shuttle kernel: in_atomic():1, irqs_disabled():1
Sep  7 20:47:50 shuttle kernel:  <c011a4b1> __might_sleep+0xa1/0xc0  <c0158967>
__vmalloc+0x27/0x30
Sep  7 20:47:50 shuttle kernel:  <c01f5371> copy_to_user+0x21/0x80  <f89a58f5>
arm_register+0x405/0x4c0 [raw1394]
Sep  7 20:47:50 shuttle kernel:  <f89a686e> raw1394_write+0xae/0xe0 [raw1394] 
<c0165fc0> vfs_write+0xd0/0x1e0
Sep  7 20:47:50 shuttle kernel:  <c01661a1> sys_write+0x51/0x80  <c010315b>
sysenter_past_esp+0x54/0x75

Steps to reproduce: Run any libraw1394 client with ARM handling. The above
output occured at startup of Oracle's Endpoint.

Actual lockups were reported too:
http://article.gmane.org/gmane.linux.kernel.firewire.user/1961
Comment 1 Stefan Richter 2006-09-14 13:07:58 UTC
Proposed patch posted:
http://permalink.gmane.org/gmane.linux.kernel.firewire.devel/7825
Comment 2 Stefan Richter 2006-09-14 13:10:25 UTC
Created attachment 9023 [details]
proposed fix to arm_{register,unregister,get_buf,set_buf}
Comment 3 Stefan Richter 2006-10-01 15:40:53 UTC
fix went into Linux 2.6.18-git16

Note You need to log in before you can comment on or make changes to this bug.