diff options
author | Liu, Jinsong <jinsong.liu@intel.com> | 2012-06-12 23:11:16 +0800 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-07-19 15:51:40 -0400 |
commit | 1b2a05516e42149a5e9f0f5aeba2c7fa9574b3f4 (patch) | |
tree | b3ebd18e79b2ef3db67dc9d457898c1d791d0fca /drivers/rtc/rtc-at32ap700x.c | |
parent | f65c9bb3fb725551d3e405f4d092caf24929cebe (diff) | |
download | linux-1b2a05516e42149a5e9f0f5aeba2c7fa9574b3f4.tar.gz linux-1b2a05516e42149a5e9f0f5aeba2c7fa9574b3f4.tar.bz2 linux-1b2a05516e42149a5e9f0f5aeba2c7fa9574b3f4.zip |
xen/mce: schedule a workqueue to avoid sleep in atomic context
copy_to_user might sleep and print a stack trace if it is executed
in an atomic spinlock context. Like this:
(XEN) CMCI: send CMCI to DOM0 through virq
BUG: sleeping function called from invalid context at /home/konradinux/kernel.h:199
in_atomic(): 1, irqs_disabled(): 0, pid: 4581, name: mcelog
Pid: 4581, comm: mcelog Tainted: G O 3.5.0-rc1upstream-00003-g149000b-dirty #1
[<ffffffff8109ad9a>] __might_sleep+0xda/0x100
[<ffffffff81329b0b>] xen_mce_chrdev_read+0xab/0x140
[<ffffffff81148945>] vfs_read+0xc5/0x190
[<ffffffff81148b0c>] sys_read+0x4c/0x90
[<ffffffff815bd039>] system_call_fastpath+0x16
This patch schedule a workqueue for IRQ handler to poll the data,
and use mutex instead of spinlock, so copy_to_user sleep in atomic
context would not occur.
Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Suggested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/rtc/rtc-at32ap700x.c')
0 files changed, 0 insertions, 0 deletions