Bug 434800

Summary: xenkbd can crash when probe fails
Product: Red Hat Enterprise Linux 5 Reporter: Markus Armbruster <armbru>
Component: kernel-xenAssignee: Markus Armbruster <armbru>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.1CC: xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 496206 (view as bug list) Environment:
Last Closed: 2009-01-20 20:07: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:
Bug Depends On: 434802    
Bug Blocks: 448753, 496206    

Description Markus Armbruster 2008-02-25 16:18:41 UTC
Description of problem:
When xenkbd_probe() fails, it calls xenkbd_remove() to clean up.  

If it fails before the input device successfully registered, info->dev is still
null, and xenkbd_remove() must not call input_unregister_device() for it.

If it fails before info->irq gets its real value, xenkbd_resume() calls
unbind_from_irqhandler() for irq 0 when it should do nothing

How reproducible:
Haven't tried.

Comment 1 Markus Armbruster 2008-02-26 14:29:54 UTC
The most likely trigger is when there's not enough memory for the new device. 
Not too likely, especially because the device is compiled in and thus probes
fairly early.

When the bug bites, the driver dereferences a null pointer during cleanup from a
failed probe.

Comment 2 Markus Armbruster 2008-02-26 15:12:08 UTC
See bug 434802 for a proposed fix.


Comment 3 RHEL Program Management 2008-06-09 21:58:47 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 Don Zickus 2008-07-18 20:06:57 UTC
in kernel-2.6.18-98.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Comment 6 Markus Armbruster 2008-07-21 16:43:13 UTC
*** Bug 451807 has been marked as a duplicate of this bug. ***

Comment 7 Markus Armbruster 2008-07-21 16:43:53 UTC
*** Bug 434806 has been marked as a duplicate of this bug. ***

Comment 8 Markus Armbruster 2008-07-21 16:45:39 UTC
*** Bug 434802 has been marked as a duplicate of this bug. ***

Comment 11 errata-xmlrpc 2009-01-20 20:07:17 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-0225.html