LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Kari Argillander <kari.argillander@gmail.com>
To: yangerkun <yangerkun@huawei.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	kernel test robot <oliver.sang@intel.com>,
	Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	lkp@lists.01.org, kernel test robot <lkp@intel.com>,
	ntfs3@lists.linux.dev, linux-fsdevel@vger.kernel.org
Subject: Re: [ramfs] 0858d7da8a: canonical_address#:#[##]
Date: Fri, 26 Nov 2021 13:36:15 +0200	[thread overview]
Message-ID: <20211126113615.nmegssvcrmjlodku@kari-VirtualBox> (raw)
In-Reply-To: <68587446-fb74-b411-ba19-dd52395567c9@huawei.com>

On Fri, Nov 26, 2021 at 09:54:56AM +0800, yangerkun wrote:
> Cc ntfs3:
> 
> Maybe it's a problem like this:
> 
> do_new_mount
>   fs_context_for_mount
>     alloc_fs_context
>       ntfs_init_fs_context
>         sbi = kzalloc(sizeof(struct ntfs_sb_info), GFP_NOFS);
>         fc->s_fs_info = sbi;
>   vfs_get_tree
>     ntfs_fs_get_tree
>       get_tree_bdev
>         blkdev_get_by_path  // return error and sbi->sb will be NULL
>   put_fs_context
>     ntfs_fs_free
>       put_ntfs
>         ntfs_update_mftmirr
>           struct super_block *sb = sbi->sb; // NULL
>           u32 blocksize = sb->s_blocksize; // BOOM
> 
> It's actually a ntfs3 bug which may be introduced by:
> 
> 610f8f5a7baf fs/ntfs3: Use new api for mounting

Yeap. Thank you very much. Will send patch for this in within 24h.

> On 2021/11/26 2:03, Linus Torvalds wrote:
> > On Thu, Nov 25, 2021 at 6:08 AM kernel test robot <oliver.sang@intel.com> wrote:
> > > FYI, we noticed the following commit (built with clang-14):
> > > 
> > > commit: 0858d7da8a09e440fb192a0239d20249a2d16af8 ("ramfs: fix mount source show for ramfs")
> > 
> > Funky. That commit seems to have nothing to do with the oops:
> > 
> > > [  806.257788][  T204] /dev/root: Can't open blockdev
> > > [  806.259101][  T204] general protection fault, probably for non-canonical address 0xdffffc0000000003: 0000 [#1] SMP KASAN
> > > [  806.263082][  T204] KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f]
> > 
> > Not a very helpful error message,a nd the KASAN comment makes little sense, but
> > 
> > > [ 806.267540][ T204] RIP: 0010:ntfs_update_mftmirr (kbuild/src/consumer/fs/ntfs3/fsntfs.c:834)
> > 
> > That's
> > 
> >          u32 blocksize = sb->s_blocksize;
> > 
> > and presumably with KASAN you end up getting hat odd 0xdffffc0000000003 thing.
> > 
> > Anyway, looks like sb is NULL, and the code is
> > 
> >    int ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait)
> >    {
> >          int err;
> >          struct super_block *sb = sbi->sb;
> >          u32 blocksize = sb->s_blocksize;
> >          sector_t block1, block2;
> > 
> > although I have no idea how sbi->sb could be NULL.
> > 
> > Konstantin? See
> > 
> >      https://lore.kernel.org/lkml/20211125140816.GC3109@xsang-OptiPlex-9020/
> > 
> > for the full thing.
> > 
> >               Linus
> > .
> > 

      reply	other threads:[~2021-11-26 12:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25 14:08 kernel test robot
2021-11-25 18:03 ` Linus Torvalds
2021-11-26  1:54   ` yangerkun
2021-11-26 11:36     ` Kari Argillander [this message]

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=20211126113615.nmegssvcrmjlodku@kari-VirtualBox \
    --to=kari.argillander@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=ntfs3@lists.linux.dev \
    --cc=oliver.sang@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yangerkun@huawei.com \
    --subject='Re: [ramfs] 0858d7da8a: canonical_address#:#[##]' \
    /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

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).