From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Grahame Jordan <gbj@theforce.com.au>
Cc: linux-ide@vger.kernel.org
Subject: Re: ide-tape oops
Date: Wed, 09 Mar 2005 21:23:33 -0800 [thread overview]
Message-ID: <422FD9D5.5010509@osdl.org> (raw)
In-Reply-To: <7619.202.12.233.21.1110421544.squirrel@webmail.theforce.com.au>
[-- Attachment #1: Type: text/plain, Size: 2616 bytes --]
Grahame Jordan wrote:
> Hi,
>
> I have a machine on which when I run something like mt -f /dev/ht0 status
> it seg faults. However I have another machine same spec that works OK?
>
> Any help would be appreciated
>
<drive> is null in idetape_chrdev_open.
Please apply and test with the attached patch, just to try to
find out what is going one.
>
> Debian testing
> Linux hanlay 2.6.8-2-686-smp #1 SMP Mon Jan 24 02:32:52 EST 2005 i686
> GNU/Linux
> P4 3.2GHz
> 1GB RAM
>
> <6>i2c /dev entries driver
> Unable to handle kernel NULL pointer dereference at virtual address 00000020
> printing eip:
> f891744e
> *pde = 00000000
> Oops: 0000 [#3]
> PREEMPT SMP
> Modules linked in: i2c_dev i2c_i801 i2c_core tsdev mousedev psmouse ipv6
> snd_intel8x0 snd_ac97_codec snd_pcm snd_timer snd_page_alloc gameport
> snd_mpu401_uart snd_rawmidi snd_seq_device snd hw_random shpchp pciehp
> pci_hotplug intel_agp intel_mch_agp agpgart evdev ehci_hcd eth1394
> uhci_hcd usbcore i810_audio ac97_codec soundcore piix sk98lin ohci1394
> capability commoncap ide_tape sbp2 ieee1394 ide_cd ide_core genrtc ext2
> ext3 jbd mbcache sr_mod cdrom sd_mod sata_promise ata_piix libata scsi_mod
> unix font vesafb cfbcopyarea cfbimgblt cfbfillrect
> CPU: 0
> EIP: 0060:[<f891744e>] Not tainted
> EFLAGS: 00010297 (2.6.8-2-686-smp)
> EIP is at idetape_chrdev_open+0x3e/0x190 [ide_tape]
> eax: 00000000 ebx: 00000000 ecx: f738d440 edx: fffffffa
> esi: 00000000 edi: cb534000 ebp: f7642380 esp: cb535dac
> ds: 007b es: 007b ss: 0068
> Process mt (pid: 7038, threadinfo=cb534000 task=f7005210)
> Stack: f738b51c f7642380 0000000f 00000001 00000286 00000000 00000132
> f7b2ac00
> f756cd9c 422faee6 24eb6ec0 f756cdd8 cb457400 cb457404 40165000
> c1000000
> c014de6b c1169f40 422faee6 24eb6ec0 00000000 c02de380 00000282
> 00000246
> Call Trace:
> [<c014de6b>] zap_pte_range+0x3b/0x2d0
> [<c0142a56>] buffered_rmqueue+0x116/0x230
> [<c0142e80>] __alloc_pages+0x310/0x370
> [<c013e2bb>] find_get_page+0x3b/0x70
> [<c013f5b9>] filemap_nopage+0x229/0x3c0
> [<c0179cf1>] dput+0x31/0x270
> [<c016fe4e>] link_path_walk+0xc2e/0x1020
> [<c014d9ee>] pte_alloc_map+0xae/0x100
> [<c016ebf7>] permission+0x67/0x80
> [<c016a453>] cdev_get+0x53/0xb0
> [<c016a0a5>] chrdev_open+0x125/0x290
> [<c0160931>] get_empty_filp+0x71/0x110
> [<c015ec2a>] dentry_open+0x16a/0x260
> [<c015eab8>] filp_open+0x68/0x70
> [<c015ed69>] get_unused_fd+0x49/0x100
> [<c015ef9b>] sys_open+0x5b/0x90
> [<c01061fb>] syscall_call+0x7/0xb
> Code: 8b 5e 20 89 b5 80 00 00 00 f0 0f ba ab fc 18 00 00 02 19 c0
--
~Randy
[-- Attachment #2: ide_tape_test.patch --]
[-- Type: text/x-patch, Size: 1344 bytes --]
idetape_chrdev_open() is finding drive == NULL; test why?
Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
diffstat:=
drivers/ide/ide-tape.c | 5 +++++
1 files changed, 5 insertions(+)
diff -Naurp ./drivers/ide/ide-tape.c~ide_tape_test ./drivers/ide/ide-tape.c
--- ./drivers/ide/ide-tape.c~ide_tape_test 2005-03-01 23:37:54.000000000 -0800
+++ ./drivers/ide/ide-tape.c 2005-03-09 21:16:57.000000000 -0800
@@ -4108,6 +4108,8 @@ static int idetape_chrdev_open (struct i
if (i >= MAX_HWIFS * MAX_DRIVES)
return -ENXIO;
drive = idetape_chrdevs[i].drive;
+ printk("ide-tape-open-test: using minor = %d, i = %d, drive = 0x%p\n",
+ minor, i, drive);
tape = drive->driver_data;
filp->private_data = drive;
@@ -4640,6 +4642,7 @@ static int idetape_cleanup (ide_drive_t
return 1;
}
idetape_chrdevs[minor].drive = NULL;
+ printk("ide-tape-cleanup-test: clearing drive for minor = %d\n", minor);
spin_unlock_irqrestore(&ide_lock, flags);
DRIVER(drive)->busy = 0;
(void) ide_unregister_subdriver(drive);
@@ -4779,6 +4782,8 @@ static int idetape_attach (ide_drive_t *
;
idetape_setup(drive, tape, minor);
idetape_chrdevs[minor].drive = drive;
+ printk("ide-tape-attach-test: using minor = %d for drive = 0x%p\n",
+ minor, drive);
devfs_mk_cdev(MKDEV(HWIF(drive)->major, minor),
S_IFCHR | S_IRUGO | S_IWUGO,
next prev parent reply other threads:[~2005-03-10 5:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-10 2:25 ide-tape oops Grahame Jordan
2005-03-10 3:13 ` Randy.Dunlap
2005-03-10 5:23 ` Randy.Dunlap [this message]
2005-03-11 10:22 ` Grahame Jordan
2005-03-12 23:54 ` Randy.Dunlap
2005-05-13 13:04 ` Grahame Jordan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=422FD9D5.5010509@osdl.org \
--to=rddunlap@osdl.org \
--cc=gbj@theforce.com.au \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).