From: Jiri Slaby <jirislaby@gmail.com>
To: linux-driver@qlogic.com
Cc: davem@davemloft.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>
Subject: [PATCH 1/1] Net: qla3xxx, remove sleeping in atomic
Date: Fri, 19 Jun 2009 17:13:32 +0200 [thread overview]
Message-ID: <1245424412-15106-1-git-send-email-jirislaby@gmail.com> (raw)
Hi, we've found this sleep-inside-spinlock.
The fix below totally untested, please review carefully.
--
We cannot sleep in ql_reset_work under spinlock, unlock before sleep,
relock after.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
drivers/net/qla3xxx.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index 8a823ec..bbc6d4d 100644
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -3837,7 +3837,9 @@ static void ql_reset_work(struct work_struct *work)
16) | ISP_CONTROL_RI));
}
+ spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
ssleep(1);
+ spin_lock_irqsave(&qdev->hw_lock, hw_flags);
} while (--max_wait_time);
spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
--
1.6.3.2
caught by stanse
next reply other threads:[~2009-06-19 15:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-19 15:13 Jiri Slaby [this message]
2009-06-20 8:21 ` David Miller
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=1245424412-15106-1-git-send-email-jirislaby@gmail.com \
--to=jirislaby@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-driver@qlogic.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®