public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: George Georgalis <george@galis.org>
To: Linux Kernel Mail List <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
	linux-ide@vger.kernel.org
Subject: Re: SATA_SIL works with 2.6.7-bk8 seagate drive, but oops
Date: Sun, 27 Jun 2004 22:12:53 -0400	[thread overview]
Message-ID: <20040628021253.GA30798@trot.local> (raw)
In-Reply-To: <Pine.LNX.4.58.0406251602140.1844@ppc970.osdl.org>

On Fri, Jun 25, 2004 at 04:16:03PM -0700, Linus Torvalds wrote:
>That's "p->pids[PIDTYPE_PID].pidptr", and it looks like "p" is NULL.
>
>That in turn _shouldn't_ happen, since that comes from 
>
>       struct task_struct *task = proc_task(inode);
>
>and proc_task() should always be non-NULL for any /proc file that has one 
>of the pid-based dentry ops. 

>On Fri, 25 Jun 2004, George Georgalis wrote:
>> ATM, ps also seg faults, here is a corresponding oops,
>
>Same problem. One of your existing /proc/<xxx>/ directories has a NULL 
>"task" pointer, and that really shouldn't happen.

The first thing I noticed when reading sata_sil.c was readl() and
writel() calls.  Thinking that meant "read/write line" I guessed it
could invoke a sectors = 15 hardware issue with some data, and went to
see exactly what it means.

I haven't determined which include/asm-*/io.h is used for
MCYRIXIII/MVIAC3, but my best guess is include/asm-i386/io.h

#define readl(addr) (*(volatile unsigned int *) (addr))
#define writel(b,addr) (*(volatile unsigned int *) (addr) = (b))

then I find volatile in a driver example from
http://publications.gbdirect.co.uk/c_book/chapter8/const_and_volatile.html
Which describes how volatile is used to peek hardware status.

but, in sata_sil.c, sil_scr_write does

                writel(val, mmio);

volatile is used for data, not status! I can't glean this construct
(when the data runs out it's null and the loop ends?). Was going to say
if hardware caused status to turn up null that could be checked and
assigned before being used...

 On Sun, Jun 27, 2004 at 10:39:08AM -0700, Linus Torvalds wrote:
 >So I stand by the rule: we should make _code_ have the access rules, and
 >the data itself should never be volatile. And yes, jiffies breaks that
 >rule, but hey, that's not something I'm proud of.

So sata_sil.c is using the wrong construct or am I not reading it right?

>Hmm. I do worry that maybe it's the SATA thing that has written NULL 
>somewhere, since the /proc code never clears that field once it is set 
>(and it would always be set by the code that creates the inode in the 
>first place). 

Might it come from reiserfs? I didn't mkfs again after the last sata 
device block(s). I'll be doing some more experimentation, how would I
'find' the null in proc? can I detect that in user space? 

// George


-- 
George Georgalis, Architect and administrator, Linux services. IXOYE
http://galis.org/george/  cell:646-331-2027  mailto:george@galis.org
Key fingerprint = 5415 2738 61CF 6AE1 E9A7  9EF0 0186 503B 9831 1631


  reply	other threads:[~2004-06-28  2:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-22 17:05 SIIMAGE sata fails with 2.6.7 George Georgalis
2004-06-22 20:25 ` Jeff Garzik
2004-06-23 14:16   ` George Georgalis
2004-06-23 15:32     ` Hugo Mills
2004-06-23 16:35       ` George Georgalis
2004-06-23 17:30         ` Ricky Beam
2004-06-23 20:25           ` George Georgalis
2004-06-23 21:23             ` Fabian Fenaut
2004-06-23 21:50               ` SIIMAGE and sata_sil with 2.6.7-bk George Georgalis
2004-06-24  0:59             ` SIIMAGE sata fails with 2.6.7 Ricky Beam
2004-06-24 15:59               ` SATA_SIL fails with 2.6.7-bk6 seagate drive George Georgalis
2004-06-24 18:46                 ` Ricky Beam
2004-06-25 21:34                   ` SATA_SIL works with 2.6.7-bk8 seagate drive, but oops George Georgalis
2004-06-25 23:16                     ` Linus Torvalds
2004-06-28  2:12                       ` George Georgalis [this message]
2004-06-29  8:28                         ` radix-tree.c or sata_sil.c 2.6.7-bk oops George Georgalis
2004-07-02 22:17                           ` George Georgalis
2004-06-29  8:46                     ` SATA_SIL works with 2.6.7-bk8 seagate drive, but oops Sebastian Slota
2004-06-30  4:43                       ` George Georgalis
2004-06-30  6:16                         ` Jeff Garzik
2004-07-02 23:01                           ` George Georgalis
  -- strict thread matches above, loose matches on Subject: below --
2004-06-26 12:37 Albert Cahalan
2004-06-26 15:12 ` Arjan van de Ven
2004-06-26 16:00   ` Linus Torvalds
2004-06-26 16:14     ` Arjan van de Ven
2004-06-26 17:17     ` Albert Cahalan
2004-06-26 17:13   ` Albert Cahalan
2004-06-26 15:54 ` Linus Torvalds

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=20040628021253.GA30798@trot.local \
    --to=george@galis.org \
    --cc=akpm@osdl.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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