All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-fsdevel@vger.kernel.org, ext2-devel@lists.sourceforge.net
Subject: Re: ext3 -> crash -> fsck -> readlink -> oops
Date: Thu, 16 May 2002 19:37:36 -0700	[thread overview]
Message-ID: <3CE46CF0.E0C9BCC5@zip.com.au> (raw)
In-Reply-To: ac1k4v$ce0$1@cesium.transmeta.com

"H. Peter Anvin" wrote:
> 
> Hi there,
> 
> We just suffered some SCSI bus problems on kernel.org that resulted in
> significant data loss on our mirror volume, but not enough to ditch
> the whole filesystem and start over (rsync --checksum is a good
> thing.)  However, we keep getting oopses, ostensibly as the result of
> a garbaged symlink.  This filesystem has been run through fsck -y
> (e2fstools 1.26).
> 
> Oops details at:
> 
>     http://userweb.kernel.org/~hpa/oops-20020516/
> 
> The kernel running is 2.4.19-pre8.
> 

I assume that was `fsck -fy'?

You seem have a 4k symlink.   I'd have expected fsck to detect that.

It crashed because vfs_readlink ran off the end of the page.

--- linux-2.4.19-pre8/fs/namei.c	Thu May  2 17:44:56 2002
+++ linux-akpm/fs/namei.c	Thu May 16 19:34:57 2002
@@ -1947,7 +1947,7 @@ int vfs_readlink(struct dentry *dentry, 
 	if (IS_ERR(link))
 		goto out;
 
-	len = strlen(link);
+	len = strnlen(link, PAGE_CACHE_SIZE);
 	if (len > (unsigned) buflen)
 		len = buflen;
 	if (copy_to_user(buffer, link, len))


-

  reply	other threads:[~2002-05-17  2:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-17  0:50 ext3 -> crash -> fsck -> readlink -> oops H. Peter Anvin
2002-05-17  2:37 ` Andrew Morton [this message]
2002-05-17  2:48   ` H. Peter Anvin
2002-05-17  8:55   ` Andreas Dilger
2002-05-17  9:40   ` [Ext2-devel] " Stephen C. Tweedie
2002-05-17 10:01     ` Andreas Dilger
2002-05-18 20:38   ` Andreas Dilger

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=3CE46CF0.E0C9BCC5@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=ext2-devel@lists.sourceforge.net \
    --cc=hpa@zytor.com \
    --cc=linux-fsdevel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.