Bug 612275

Summary: WARNING: at arch/x86/mm/ioremap.c:148 __ioremap_caller+0x160/0x30e()
Product: Red Hat Enterprise MRG Reporter: John Kacur <jkacur>
Component: realtime-kernelAssignee: John Kacur <jkacur>
Status: CLOSED ERRATA QA Contact: David Sommerseth <davids>
Severity: low Docs Contact:
Priority: low    
Version: 1.2CC: bhu, bugproxy, lgoncalv, ovasik, williams
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-14 15:31: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
Use dmi info to whitelist machines
none
Use DMI to only load on a select few IBM servers (whitespace fixes) none

Description John Kacur 2010-07-07 18:15:52 UTC
------------[ cut here ]------------
WARNING: at arch/x86/mm/ioremap.c:148 __ioremap_caller+0x160/0x30e()
Hardware name: PowerEdge M610
Modules linked in: ibm_rtl(+) autofs4 hidp rfcomm l2cap crc16 bluetooth rfkill lockd sunrpc ipv6 loop dm_multipath scsi_dh video output sbs sbshc battery ac parport_pc lp parport joydev sg bnx2 dcdbas snd_seq_dummy snd_seq_oss snd_seq_midi_event button tpm_tis tpm tpm_bios snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd soundcore snd_page_alloc i7core_edac edac_core iTCO_wdt iTCO_vendor_support pcspkr dm_snapshot dm_zero dm_mirror dm_region_hash dm_log dm_mod lpfc scsi_transport_fc scsi_tgt shpchp mptsas mptscsih mptbase scsi_transport_sas sd_mod scsi_mod crc_t10dif ext3 jbd mbcache uhci_hcd ohci_hcd ehci_hcd [last unloaded: microcode]
Pid: 15880, comm: modprobe Not tainted 2.6.33.5-rt23.24.el5rt #1
Call Trace:
 [<ffffffff81026266>] ? __ioremap_caller+0x160/0x30e
 [<ffffffff810422f3>] warn_slowpath_common+0x7c/0x94
 [<ffffffff8104231f>] warn_slowpath_null+0x14/0x16
 [<ffffffff81026266>] __ioremap_caller+0x160/0x30e
 [<ffffffffa007204c>] ? ioremap+0xe/0x10 [ibm_rtl]
 [<ffffffffa00720b5>] ? init_module+0x0/0xae [ibm_rtl]
 [<ffffffff810264b1>] ioremap_nocache+0x17/0x19
 [<ffffffffa007204c>] ioremap+0xe/0x10 [ibm_rtl]
 [<ffffffffa00720eb>] init_module+0x36/0xae [ibm_rtl]
 [<ffffffffa00720b5>] ? init_module+0x0/0xae [ibm_rtl]
 [<ffffffff810001fa>] do_one_initcall+0x5f/0x14f
 [<ffffffff81075499>] sys_init_module+0xd0/0x22b
 [<ffffffff81002d1b>] system_call_fastpath+0x16/0x1b
---[ end trace a1dd0e4aae618e33 ]---

I noticed the above in the dmesg of 
dell-pem610-01.rhts.eng.bos.redhat.com

Note the ibm_rtl(+) in the modules list, where the '+' comes from
		/* Show a + for module-is-being-loaded */
		if (mod->state == MODULE_STATE_COMING)

The warning itself is produced in __ioremap_caller here:
WARN_ON_ONCE(is_ram);

Comment 1 IBM Bug Proxy 2010-07-15 16:50:57 UTC
------- Comment From vernux.com 2010-07-15 11:32 EDT-------
The folks at redhat opened bug RH 612275 and would like us to comment on it.  Is it possible to reverse mirror the bug into the LTC bugzilla?  It should be listed under rtlinux MRG 1.2 drivers.

Comment 2 IBM Bug Proxy 2010-07-21 23:21:13 UTC
Created attachment 433539 [details]
Use dmi info to whitelist machines


------- Comment on attachment From vernux.com 2010-07-21 19:11 EDT-------


After fumbling around with a couple of possible fixes for this, I came up with this solution.  Using dmi_check_system with a table of possible OK system identifiers to determine whether or not we are running on a supported IBM machine.  My original thought was to just check if we are on an IBM machine, but I decided to check machine type too because it was not difficult and I think we already have a pretty comprehensive list of the machines that it will support.

Signed-off-by: Vernon Mauery <vernux.com>

Comment 3 IBM Bug Proxy 2010-07-26 18:52:43 UTC
Created attachment 434497 [details]
Use DMI to only load on a select few IBM servers (whitespace fixes)


------- Comment (attachment only) From vernux.com 2010-07-26 14:48 EDT-------

Comment 4 John Kacur 2010-07-29 18:41:49 UTC
I fixed up a minor white space conflict and included this with mrg1.2 now.

Comment 6 David Sommerseth 2010-10-05 17:51:18 UTC
Verified by code review.  Found bz612275-ibm_rtl-check_DMI_information_in_module_probe.patch applied to kernel-rt-2.6.33.7-rt29.43.src.rpm.

Verified by booting kernel-rt-2.6.33.7-rt29.43 on dell-pem610-01.rhts.eng.bos.redhat.com.  No ibm_rtl module was loaded.  Tried to load the driver manually:

[root@dell-pem610-01 ~]# modprobe ibm_rtl
FATAL: Error inserting ibm_rtl (/lib/modules/2.6.33.7-rt29.43.el5rt/kernel/drivers/misc/ibmrtl/ibm_rtl.ko): No such device
[root@dell-pem610-01 ~]#

No other errors found anywhere, including dmesg.  Tried to force the driver to load:

[root@dell-pem610-01 ~]# modprobe ibm_rtl force=1
FATAL: Error inserting ibm_rtl (/lib/modules/2.6.33.7-rt29.43.el5rt/kernel/drivers/misc/ibmrtl/ibm_rtl.ko): No such device
[root@dell-pem610-01 ~]#

Forcing a module load also caused a little backtrace to be dumped to dmesg:
-------------------------------------------------------------------------------
WARNING: at arch/x86/mm/ioremap.c:148 __ioremap_caller+0x160/0x30e()
Hardware name: PowerEdge M610
Modules linked in: ibm_rtl(+) autofs4 hidp rfcomm l2cap crc16 bluetooth rfkill lockd sunrpc ipv6 loop dm_multipath scsi_dh video output sbs sbshc battery ac parport_pc lp parport joydev sg bnx2 dcdbas snd_seq_dummy tpm_tis tpm button tpm_bios snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd i7core_edac edac_core soundcore snd_page_alloc iTCO_wdt iTCO_vendor_support pcspkr dm_snapshot dm_zero dm_mirror dm_region_hash dm_log dm_mod lpfc scsi_transport_fc scsi_tgt shpchp mptsas mptscsih mptbase scsi_transport_sas sd_mod scsi_mod crc_t10dif ext3 jbd mbcache uhci_hcd ohci_hcd ehci_hcd [last unloaded: microcode]
Pid: 16584, comm: modprobe Not tainted 2.6.33.7-rt29.43.el5rt #1
Call Trace:
 [<ffffffff8102626e>] ? __ioremap_caller+0x160/0x30e
 [<ffffffff810422d3>] warn_slowpath_common+0x7c/0x94
 [<ffffffff810422ff>] warn_slowpath_null+0x14/0x16
 [<ffffffff8102626e>] __ioremap_caller+0x160/0x30e
 [<ffffffffa019306b>] ? ioremap+0xe/0x10 [ibm_rtl]
 [<ffffffff810264b9>] ioremap_nocache+0x17/0x19
 [<ffffffffa019306b>] ioremap+0xe/0x10 [ibm_rtl]
 [<ffffffffa019312d>] init_module+0x59/0xd1 [ibm_rtl]
 [<ffffffffa01930d4>] ? init_module+0x0/0xd1 [ibm_rtl]
 [<ffffffff810001fa>] do_one_initcall+0x5f/0x14f
 [<ffffffff81075539>] sys_init_module+0xd0/0x22b
 [<ffffffff81002d1b>] system_call_fastpath+0x16/0x1b
---[ end trace dd5f703afb94d1bb ]---
-------------------------------------------------------------------------------

This is the expected behaviour, based on the implemented code:
-------------------------------------------------------------------------------
int init_module(void) {
        unsigned long ebda_addr,ebda_size;
        void __iomem *data, *d;
        int ret,i;
        
        /* first ensure that we are running on IBM HW */
        if (!force && !dmi_check_system(ibm_rtl_dmi_table))
                return -ENODEV;
-------------------------------------------------------------------------------

This if() statement is added in the the patch fixing this issue.  And it allows to override the dmi_check_system() call by using 'force=1' when loading the module.  Which makes it behave like the old version, causing a kernel backtrace.

Comment 7 errata-xmlrpc 2010-10-14 15:31: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-2010-0771.html