public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Cc: syzbot+787bcbef9b5fec61944b@syzkaller.appspotmail.com,
	linux-fsdevel@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: exfat: convert WARN to a pr_info
Date: Wed, 13 Nov 2019 06:47:34 +0100	[thread overview]
Message-ID: <20191113054734.GA2058890@kroah.com> (raw)
In-Reply-To: <20191113025035.186051-1-valdis.kletnieks@vt.edu>

On Tue, Nov 12, 2019 at 09:50:34PM -0500, Valdis Kletnieks wrote:
> syzbot took a nosedive because it runs with panic_on_warn set. And
> it's quite correct, it shouldn't have been a WARN in the first place.
> Other locations just use a pr_info(), so do that here too.
> 
> Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
> Reported-by: syzbot+787bcbef9b5fec61944b@syzkaller.appspotmail.com
> Fixes: c48c9f7ff32b ("staging: exfat: add exfat filesystem code to staging")
> ---
>  drivers/staging/exfat/exfat_blkdev.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/exfat/exfat_blkdev.c b/drivers/staging/exfat/exfat_blkdev.c
> index 7bcd98b13109..8204720b2bf2 100644
> --- a/drivers/staging/exfat/exfat_blkdev.c
> +++ b/drivers/staging/exfat/exfat_blkdev.c
> @@ -59,8 +59,8 @@ int exfat_bdev_read(struct super_block *sb, sector_t secno, struct buffer_head *
>  	if (*bh)
>  		return 0;
>  
> -	WARN(!p_fs->dev_ejected,
> -	     "[EXFAT] No bh, device seems wrong or to be ejected.\n");
> +	if (p_fs->dev_ejected)
> +		pr_info("[EXFAT] No bh, device seems wrong or to be ejected.\n");
>  
>  	return -EIO;
>  }
> @@ -112,8 +112,8 @@ int exfat_bdev_write(struct super_block *sb, sector_t secno, struct buffer_head
>  	return 0;
>  
>  no_bh:
> -	WARN(!p_fs->dev_ejected,
> -	     "[EXFAT] No bh, device seems wrong or to be ejected.\n");
> +	if (p_fs->dev_ejected)
> +		pr_info("[EXFAT] No bh, device seems wrong or to be ejected.\n");

Shouldn't these all be pr_err() calls as something did go wrong.

thanks,

greg k-h

      reply	other threads:[~2019-11-13  5:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13  2:50 [PATCH] staging: exfat: convert WARN to a pr_info Valdis Kletnieks
2019-11-13  5:47 ` Greg Kroah-Hartman [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=20191113054734.GA2058890@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+787bcbef9b5fec61944b@syzkaller.appspotmail.com \
    --cc=valdis.kletnieks@vt.edu \
    /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