wait_event_interruptible wake_up_interruptible timming问题

时间:2012-06-09 08:59:07

标签: linux linux-kernel

我有两个线程异步作用于页面上的“PG_uptodate”位。第一个线程在PG_uptodate上调用wait_event_interruptible()并等待从磁盘io更新页面。第二个线程设置页面的PG_uptodate位并调用wake_up_interruptible(),以便为要更新的页面休眠的线程被唤醒。我遇到了下面转储的内核崩溃:

  41.192000] Unable to handle kernel NULL pointer dereference at virtual address 00000000

 [   41.192000] [<c008efdc>] (wake_bit_function+0x0/0xcc) from [<c0063c38>]     
                wake_up_common+0xb0/0xf8)
 [   41.192000]  r7:c0da350c r6:c05919b8 r5:c0da3518 r4:e7f5fb04
 [   41.192000] [<c0063b88>] (__wake_up_common+0x0/0xf8) from [<c0063e74>]  
                (__wake_up+0x48/0x5c)

 [   41.192000] [<c0063e2c>] (__wake_up+0x0/0x5c) from [<c018a1ac>] 
                (bio_end_io_read+0x88/0xdc)
 [   41.192000]  r8:00000000 r7:54602a40 r6:00000001 r5:e85bc0b4 r4:e867e700
 [   41.192000] [<c018a124>] (bio_end_io_read+0x0/0xdc) from [<c0164324>] 
                (bio_endio+0x70/0x74)
 [   41.192000]  r7:00000088 r6:e8ff5b60 r5:00000000 r4:e867e700
 [   41.192000] [<c01642b4>] (bio_endio+0x0/0x74) from [<c0245080>] 
                (req_bio_endio+0xc8/0xec)
 [   41.192000]  r5:00000000 r4:e867e700
 [   41.192000] [<c0244fb8>] (req_bio_endio+0x0/0xec) from [<c02452e0>] 
                (blk_update_request+0x23c/0x524)

         .......... 
         ..........

任何人都可以指出我如何解决这个问题。

谢谢, 卡皮尔

0 个答案:

没有答案