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 445054

Summary: 8250 serial port lock recursion
Product: Red Hat Enterprise Linux 4 Reporter: Herbert van den Bergh <herbert.van.den.bergh>
Component: kernelAssignee: Prarit Bhargava <prarit>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.5CC: arozansk, greg.marsden, riek, vgoyal
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: 2009-05-18 19:33:32 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:
Bug Depends On:    
Bug Blocks: 461304    
Attachments:
Description Flags
panic stack trace
none
fix for recursive lock request in 8250.c
none
RHEL4 fix for this issue none

Description Herbert van den Bergh 2008-05-03 01:16:45 UTC
Description of problem:

Customer is running EL4.5 as a HVM guest under Xen, using a terminal window and
xm console to connect to the virtual serial console of the vm.  When the user
pastes a large amount of text (>512 bytes) into the console window, the guest
kernel panics (UP) or deadlocks (SMP).

The bug is due to a recursive lock request caused by not releasing the port lock
in drivers/serial/8250.c:receive_chars()

This is the same problem as reported upstream, with a fix posted here:
http://lkml.org/lkml/2005/2/4/77
The second part of this fix was introduced in el4.5 but the first part was
missed.  However, the first part is needed as well.

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

How reproducible:
Every time.

Steps to Reproduce:
1. start a xen hvm guest running the el 4.5 kernel
2. connect to the guest console with the command "xm console <domain>"
3. copy and paste more than 512 bytes into the console window
  
Actual results:
guest kernel panic or deadlock

Expected results:
no guest kernel panic or deadlock

Additional info:

Comment 1 Herbert van den Bergh 2008-05-03 01:16:45 UTC
Created attachment 304435 [details]
panic stack trace

Comment 2 Herbert van den Bergh 2008-05-03 01:18:53 UTC
Created attachment 304436 [details]
fix for recursive lock request in 8250.c

Comment 3 Prarit Bhargava 2008-05-06 13:55:44 UTC
Can't seem to get to the link above.

http://marc.info/?l=linux-kernel&m=110780844815293&w=2

The second part of the patch was submitted by Aris .. cc'ing him on this BZ.

The first part of the patch makes sense and IMO is stable enough to be included.
 I'll create a patch and test.

P.

Comment 4 Prarit Bhargava 2008-05-06 14:09:07 UTC
Sorry -- wrong link:  

http://marc.info/?l=linux-kernel&m=110751569018181&w=2

P.

Comment 5 Prarit Bhargava 2008-05-06 17:57:39 UTC
Created attachment 304667 [details]
RHEL4 fix for this issue

Comment 6 RHEL Program Management 2008-06-26 12:46:28 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 7 RHEL Program Management 2008-09-03 13:09:12 UTC
Updating PM score.

Comment 8 Vivek Goyal 2008-09-12 19:58:12 UTC
Committed in 78.9.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/

Comment 11 errata-xmlrpc 2009-05-18 19:33:32 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2009-1024.html