<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:΢ÈíÑźÚ
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>is it possible that printk cause deadlock? the path is as below:<div><br><div>1. taskA runs on CPU0, and run schedule to acqire the rq->lock.</div><div>2. taskA calls printk while holding rq->lock.</div><div>3. taskA holds <span style="font-size: 12pt; ">console_sem.</span></div><div>4. taskB runs on CPU1, and call console_lock(), which is blocked by <span style="font-size: 12pt; ">console_sem and queue itslef to the wait list.</span></div><div><span style="font-size: 12pt; ">5. taskB migrates from CPU1 to cpu0. will this step occur?</span></div><div>6. taskA calls up(&console_sem)--> wake_up_process()-->try_to_wake_up()-->ttwu_queue()-->raw_spin_lock(&rq->lock). here taskA tries to acquire the rq->lock of CPU0 again. </div><div><br></div><div><br></div></div>                                            </div></body>
</html>