Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 4 product line. The current stable release is 4.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 314631

Summary: [RHEL 4.5] fix netpoll deadlock
Product: Red Hat Enterprise Linux 4 Reporter: Flavio Leitner <fleitner>
Component: kernelAssignee: Neil Horman <nhorman>
Status: CLOSED DUPLICATE QA Contact: Martin Jenner <mjenner>
Severity: high Docs Contact:
Priority: high    
Version: 4.5CC: jbaron, jmoyer, tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-04 18:34:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Proposed patch to fix the deadlock none

Description Flavio Leitner 2007-10-01 19:43:51 UTC
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):
2.6.9-55

Additional info:
The IT have an attached patch to fix it from Bryan Mason.

Comment 1 Flavio Leitner 2007-10-01 19:43:51 UTC
Created attachment 212751 [details]
Proposed patch to fix the deadlock

Comment 2 Flavio Leitner 2007-10-01 19:45:52 UTC
Hi,

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;
252
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.

-Flavio

Comment 4 RHEL Program Management 2007-10-04 17:33:48 UTC
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
release.

Comment 5 Neil Horman 2007-10-04 18:34:17 UTC

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