All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: syzbot <syzbot+a9d09761be47db706560@syzkaller.appspotmail.com>,
	axboe@kernel.dk, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: general protection fault in debugfs_create_files
Date: Thu, 31 Jan 2019 08:00:56 +0100	[thread overview]
Message-ID: <20190131070056.GA2158@kroah.com> (raw)
In-Reply-To: <1956aaad-701d-2c5f-180c-0eaeb01daf21@I-love.SAKURA.ne.jp>

On Thu, Jan 31, 2019 at 02:34:56PM +0900, Tetsuo Handa wrote:
> Hello, again.
> 
> syzbot is hitting a similar crash due to debugfs_create_dir() returning -EEXIST.
> Should debugfs_create_dir() return NULL as well? Or should the caller use IS_ERR_OR_NULL() ?
> 
> --- a/block/blk-mq-debugfs.c
> +++ b/block/blk-mq-debugfs.c
> @@ -861,6 +861,8 @@ int blk_mq_debugfs_register(struct request_queue *q)
>                                             blk_debugfs_root);
>         if (!q->debugfs_dir)
>                 return -ENOMEM;
> +       if (IS_ERR(q->debugfs_dir))
> +               printk("debugfs_create_dir=%ld\n", PTR_ERR(q->debugfs_dir));
> 
>         if (!debugfs_create_files(q->debugfs_dir, q,
>                                   blk_mq_debugfs_queue_attrs))
> 

I already posted this patch last Wednesday:
	https://lore.kernel.org/lkml/20190123134854.GA25906@kroah.com/
to solve this problem.

I guess I should queue it up in my tree as well, to handle this issue.
I'll go do that now.

thanks,

greg k-h

  reply	other threads:[~2019-01-31  7:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-30 18:53 general protection fault in debugfs_create_files syzbot
2019-01-31  5:34 ` Tetsuo Handa
2019-01-31  7:00   ` Greg Kroah-Hartman [this message]
2019-02-01  8:30 ` Kees Cook

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=20190131070056.GA2158@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=syzbot+a9d09761be47db706560@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /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.