Bug 250898 - Missing critical phys_to_virt in lib/swiotlb.c
Summary: Missing critical phys_to_virt in lib/swiotlb.c
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.5
Hardware: All
OS: Linux
low
low
Target Milestone: ---
: ---
Assignee: Anton Arapov
QA Contact: Martin Jenner
URL:
Whiteboard:
Depends On: 248102
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-08-04 19:23 UTC by Anton Arapov
Modified: 2014-06-18 08:00 UTC (History)
8 users (show)

Fixed In Version: RHBA-2007-0791
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-15 16:31:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed patch (570 bytes, patch)
2007-08-04 22:35 UTC, Anton Arapov
no flags Details | Diff
proposed patch (579 bytes, patch)
2007-08-06 16:29 UTC, Anton Arapov
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0791 0 normal SHIPPED_LIVE Updated kernel packages available for Red Hat Enterprise Linux 4 Update 6 2007-11-14 18:25:55 UTC

Description Anton Arapov 2007-08-04 19:23:15 UTC
+++ This bug was initially created as a clone of Bug #248102 +++

RHEL5 Kernel panics when loading megaraid_mbox module:

megaraid: fw version:[713S] bios version:[G401]
scsi2 : LSI Logic MegaRAID driver
scsi[2]: scanning scsi channel 0 [Phy 0] for non-raid devices
Unable to handle kernel paging request at ffff80ff0a3b5000 RIP: 
 [<ffffffff80140ca0>] sync_single+0x20/0x7b
PGD 0 
Oops: 0000 [1] SMP 
last sysfs file: /class/input/input0/name
CPU 0 
Modules linked in: megaraid_mbox megaraid_mm ata_piix libata sd_mod scsi_mod
Pid: 0, comm: swapper Not tainted 2.6.18-8.1.4.el5 #1
RIP: 0010:[<ffffffff80140ca0>]  [<ffffffff80140ca0>] sync_single+0x20/0x7b
RSP: 0018:ffffffff80402e88  EFLAGS: 00010246
RAX: ffffffffe0000000 RBX: ffff81015ee46080 RCX: 0000000000000002
RDX: ffff81000a3b5000 RSI: 0000000006395000 RDI: ffff81015f14b870
RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000024
R10: 0000000006395000 R11: 0000000000013409 R12: 0000000000000000
R13: 0000000000000001 R14: ffff81015f14b870 R15: ffff81015fee8000
FS:  0000000000000000(0000) GS:ffffffff8038a000(0000) knlGS:0000000000000000
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: ffff80ff0a3b5000 CR3: 0000000000201000 CR4: 00000000000006e0
Process swapper (pid: 0, threadinfo ffffffff803ba000, task ffffffff802d1ae0)
Stack:  ffffffff8014192f ffff81015f3e1858 ffff81015e8c2980 ffff81015f0b4000
 ffff81015e8c2980 ffff81015f0b4008 ffffffff8808082a ffff81015f3e0000
 ffffffff80402ec8 ffff81015f0b4008 ffff81015f0b4008 0000000000000000
Call Trace:
 <IRQ>  [<ffffffff8014192f>] swiotlb_sync_sg_for_cpu+0xb2/0xcb
 [<ffffffff8808082a>] :megaraid_mbox:megaraid_mbox_dpc+0x4c0/0x591
 [<ffffffff8008e7a0>] tasklet_action+0x62/0xac
 [<ffffffff80011c19>] __do_softirq+0x5e/0xd5
 [<ffffffff80075658>] end_level_ioapic_vector+0x9/0x16
 [<ffffffff8005c330>] call_softirq+0x1c/0x28
 [<ffffffff8006a312>] do_softirq+0x2c/0x85
 [<ffffffff8006a19a>] do_IRQ+0xec/0xf5
 [<ffffffff80054f2e>] mwait_idle+0x0/0x4a
 [<ffffffff8005b649>] ret_from_intr+0x0/0xa
 <EOI>  [<ffffffff80054f64>] mwait_idle+0x36/0x4a
 [<ffffffff80046fb7>] cpu_idle+0x95/0xb8
 [<ffffffff803c57f6>] start_kernel+0x220/0x225
 [<ffffffff803c5237>] _sinittext+0x237/0x23e


Code: 48 8b 04 c2 74 07 41 ff c8 75 45 eb 21 83 f9 02 74 04 85 c9 
RIP  [<ffffffff80140ca0>] sync_single+0x20/0x7b
 RSP <ffffffff80402e88>
CR2: ffff80ff0a3b5000
 <0>Kernel panic - not syncing: Fatal exception
 <0>Rebooting in 30 seconds..

It is known issue fixed in upstream and in stable 2.6.20.2 kernel by patch
"Missing critical phys_to_virt in lib/swiotlb.c":
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.20.y.git;a=commit;h=e16b67f9a0ac6d9f89f680b7f3b439abfb1dac5e
http://lkml.org/lkml/2007/2/4/116

Thanks to AltLinux kernel Team for assistance in the bug reproducing and
investigation.

-- Additional comment from riel on 2007-08-03 18:54 EST --
A trivial fix for a bug that blocks people with certain hardware configurations
from running RHEL.

This one needs to go in soon.

Comment 1 Anton Arapov 2007-08-04 22:35:00 UTC
Created attachment 160703 [details]
proposed patch

Comment 2 Rik van Riel 2007-08-04 23:00:17 UTC
Anton, has this bug been reproduced in RHEL4?

Comment 3 Anton Arapov 2007-08-06 11:20:31 UTC
Rik, I can't reproduce this bug, because I haven't necessary hardware for it.
Bug was blindly cloned due to Pete Zaitcev request. I've dig it up logically
throw the sources, and I believe 2.6.9 kernel has exact the same issue.

Comment 4 Anton Arapov 2007-08-06 16:29:11 UTC
Created attachment 160759 [details]
proposed patch

the same as att#160703, just fixed indentation.

Comment 7 Tom Coughlan 2007-08-23 21:55:53 UTC
Andrius, the original BZ was for 5.1. When Anton posted the patch to rhkl, Pete
Z. suggested that it needs to be fixed in 4.6 as well. Note BTW that the patch
is in 
arch/ia64/lib/swiotlb.c, not megaraid. When the subject of testing the patch
came up in rhkl, Anton made the case that this is not necessary because the
patch is straight-forward and well understood.  

Setting devel_ack. This should go in 4.6 as an exception, to avoid system crashes. 

Comment 8 RHEL Program Management 2007-08-23 21:56:38 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 11 Jason Baron 2007-09-26 15:54:25 UTC
committed in stream U6 build 60. A test kernel with this patch is available from
http://people.redhat.com/~jbaron/rhel4/


Comment 14 errata-xmlrpc 2007-11-15 16:31:07 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 the 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/RHBA-2007-0791.html



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