Bug 314631 - [RHEL 4.5] fix netpoll deadlock
[RHEL 4.5] fix netpoll deadlock
Status: CLOSED DUPLICATE of bug 313751
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
high Severity high
: rc
: ---
Assigned To: Neil Horman
Martin Jenner
Depends On:
  Show dependency treegraph
Reported: 2007-10-01 15:43 EDT by Flavio Leitner
Modified: 2007-12-18 15:47 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-04 14:34:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed patch to fix the deadlock (1.38 KB, patch)
2007-10-01 15:43 EDT, Flavio Leitner
no flags Details | Diff

  None (edit)
Description Flavio Leitner 2007-10-01 15:43:51 EDT
Description of problem:

Deadlock scenario in netpoll - This is invoked by printk via netlog. printk is
called from interrupt context in some cases - if interrupt hits after xmit_lock
is locked by the kernel then there is a possibility of spinlock deadlock.

Version-Release number of selected component (if applicable):

Additional info:
The IT have an attached patch to fix it from Bryan Mason.
Comment 1 Flavio Leitner 2007-10-01 15:43:51 EDT
Created attachment 212751 [details]
Proposed patch to fix the deadlock
Comment 2 Flavio Leitner 2007-10-01 15:45:52 EDT

I've checked upstream code and there the code does:
249         if (skb_queue_len(&npinfo->txq) == 0 &&
250                     npinfo->poll_owner != smp_processor_id()) {
251                 unsigned long flags;
253                 local_irq_save(flags);
254                 /* try until next clock tick */
255                 for (tries = jiffies_to_usecs(1)/USEC_PER_POLL;
256                      tries > 0; --tries) {
257                         if (netif_tx_trylock(dev)) {

I just note on line 253 we are disabling the local irqs.

Comment 4 RHEL Product and Program Management 2007-10-04 13:33:48 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 5 Neil Horman 2007-10-04 14:34:17 EDT

*** This bug has been marked as a duplicate of 313751 ***

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