Bug 10736 - ip2main has issues
Summary: ip2main has issues
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Serial (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Alan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-17 13:24 UTC by Roland Kletzing
Modified: 2008-05-30 17:46 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.26-rc2
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
mostly allmodconfig .config (89.83 KB, application/octet-stream)
2008-05-17 13:36 UTC, Roland Kletzing
Details

Description Roland Kletzing 2008-05-17 13:24:45 UTC
Latest working kernel version: n/a
Earliest failing kernel version: 2.6.25

Distribution: suse 10.1
Hardware Environment: vmware & system with p4 and gigabyte i915 based mainboard
Software Environment: 
Problem Description:
i get system crashes when loading/unloading ip2main module

Steps to reproduce:
build a mostly allmodconfig kernel
load modules like this:
while true;do cat modulelist |while read a;do echo $a;modprobe $a;modprobe -r
$a;done;done

exclude ip2main and other unstable modules from this list ;)

let this run for a while.
no crashes? good!

now do modprobe ip2main, modprobe -r ip2main and you may get:

[ 3184.393663] BUG: unable to handle kernel NULL pointer dereference at 00000094
[ 3184.393663] IP: [<c025641e>] tty_unregister_driver+0x7/0xf8
[ 3184.393663] *pde = 00000000
[ 3184.393663] Oops: 0000 [#1] SMP
[ 3184.393663] Modules linked in: ip2main(-) ar7part mtd eql sha1_generic arc4 ecb ide_generic siimage aec62xx trm290 alim15x3 hpt34x hpt366 cmd64x cmd640 piix rz1000 slc90e66 jmicron cs5535 cs5530 cs5520 sc1200 triflex ide_pci_generic atiixp pdc202xx_old pdc202xx_new tc86c001 opti621 ns87415 cy82c693 amd74xx sis5513 via82cxxx serverworks it821x it8213 ide_core eni suni zatm uPD98402 atm non_fatal p4_clockmod speedstep_lib freq_table decnet fcrypt pcbc crypto_blkcipher cryptomgr sctp libcrc32c ts_kmp ip_gre dccp_ipv6 dccp_ipv4 dccp sunrpc psmouse vboxdrv ipv6 loop mousedev evdev e100 mii 8250_pnp iTCO_wdt iTCO_vendor_support usbcore intel_agp agpgart parport_pc lp parport 8250 serial_core edd sg megaraid_mbox megaraid_mm sr_mod cdrom sd_mod scsi_mod [last unloaded: drm]
[ 3184.393772]
[ 3184.393772] Pid: 28941, comm: modprobe Not tainted (2.6.26-rc2-git5 #4)
[ 3184.393772] EIP: 0060:[<c025641e>] EFLAGS: 00010246 CPU: 1
[ 3184.393772] EIP is at tty_unregister_driver+0x7/0xf8
[ 3184.393772] EAX: 00000000 EBX: 00000000 ECX: 000002e5 EDX: 00000000
[ 3184.393772] ESI: 00000000 EDI: 00000010 EBP: f68ebf3c ESP: f68ebf34
[ 3184.393772]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[ 3184.393772] Process modprobe (pid: 28941, ti=f68eb000 task=f553f080 task.ti=f68eb000)
[ 3184.393772] Stack: 00000004 00000010 f68ebf50 f886afc6 f886d780 00000000 00000080 f68ebfb0
[ 3184.393772]        c0140899 6d327069 006e6961 f660b528 f68ebf74 c016813d f7b7cc00 f660b528
[ 3184.393772]        f68ebfa0 c0168aa7 ffffffff b7fe2000 f660b160 b7fe3000 f660b16c 0060b160
[ 3184.393772] Call Trace:
[ 3184.393772]  [<f886afc6>] ? ip2_cleanup_module+0xf2/0x1a0 [ip2main]
[ 3184.393772]  [<c0140899>] ? sys_delete_module+0x18e/0x1d9
[ 3184.393772]  [<c016813d>] ? remove_vma+0x41/0x47
[ 3184.393772]  [<c0168aa7>] ? do_munmap+0x17d/0x197
[ 3184.393772]  [<c0103811>] ? sysenter_past_esp+0x6a/0x91
[ 3184.393772]  [<c02f0000>] ? pcibios_setup+0xa8/0x2a0
[ 3184.393772]  =======================
[ 3184.393772] Code: 8d 65 f4 5b 5e 5f 5d c3 55 89 d1 8b 50 50 89 e5 c1 e2 14 0b 50 54 a1 9c 65 4b c0 01 ca e8 4d 11 01 00 5d c3 55 89 e5 57 56 89 c6 <83> be 94 00 00 00 00 b8 f0 ff ff ff 53 0f 85 d9 00 00 00 8b 46
[ 3184.393772] EIP: [<c025641e>] tty_unregister_driver+0x7/0xf8 SS:ESP 0068:f68ebf34
[ 3184.393772] ---[ end trace aa241cd23893ce1c ]---
Comment 1 Roland Kletzing 2008-05-17 13:36:00 UTC
Created attachment 16176 [details]
mostly allmodconfig .config
Comment 2 Andrew Morton 2008-05-17 14:05:37 UTC
Could be that Alan broke it, could be that it was always
broken.  But I'll semi-randomly reassign this one to Jiri
because he has a good eye for these things ;)
Comment 3 Jiri Slaby 2008-05-17 15:33:36 UTC
I suppose there is a "Still loaded" message, right? Please, when you report bugs, report ALL relevant information!
Comment 4 Jiri Slaby 2008-05-17 15:34:23 UTC
I mean, it is one line before the BUG or so.
Comment 5 Jiri Slaby 2008-05-17 15:41:07 UTC
Blah, the init is a mess and crap. It was bad presumption. I see it. There are 2 ip2 modules. Main and base. Main init is noop, deinit frees all the stuff including tty. Base has no deinit, while its init calls another init from main which allocates tty and other stuff.

So if someone includes only main, not the base and remove the main right after it, there is nobody who initialized that but main tries to deinit all the stuff, unsuccessfully.
Comment 6 Alan 2008-05-17 15:46:18 UTC
Looks like they want turning into one module to be honest.
Jiri - I'll pick this up as I'm already carrying a pile of other ip2 changes
Comment 7 Roland Kletzing 2008-05-17 15:53:13 UTC
>I suppose there is a "Still loaded" message, right? 

i double checked, but - no - i don´t see such message.
Comment 8 Alan 2008-05-19 06:42:24 UTC
Test fix posted to lkml
Comment 9 Roland Kletzing 2008-05-30 17:46:46 UTC
thanks!

i found that this had been merged.

additionally, i have just sent minor documentation fix to lkml. closing now.


Subject: [PATCH] fix Kconfig after ip2/ip2main merge
From: 	 devzero@web.de  	  
To: 	 linux-kernel@vger.kernel.org
Cc: 	 Alan Cox <alan@redhat.com>,Andrew Morton <akpm@linux-foundation.org>,Jiri Slaby <jirislaby@gmail.com>
Date: 	 31.05.08 02:43:09 Uhr  		 

as commit 6089093e588ee3f6aed99d08b1cf5ea37c52cf97 is fixing ip2 crashes on
load/unload and making ip2/ip2main one module (ip2), Kconfig shouldn`t mention
non existing module. I seldom posting patches and only have webmailer here, so
please indulge if there is something wrong with formatting or style.

Signed-off-by: Roland.Kletzing <devzero@web.de>
---
drivers/char/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

===================================================================
--- a/drivers/char/Kconfig.orig 2008-05-31 02:14:42.000000000 +0200
+++ b/drivers/char/Kconfig 2008-05-31 02:15:15.000000000 +0200
@@ -118,8 +118,8 @@
order to become a dial-in server. If you have a card like that, say
Y here and read <file:Documentation/computone.txt>.

- To compile this driver as modules, choose M here: the
- modules will be called ip2 and ip2main.
+ To compile this driver as module, choose M here: the
+ module will be called ip2.

config ROCKETPORT
tristate "Comtrol RocketPort support"

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