All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: dsterba@suse.cz, kernel test robot <oliver.sang@intel.com>,
	0day robot <lkp@intel.com>, LKML <linux-kernel@vger.kernel.org>,
	lkp@lists.01.org, linux-btrfs@vger.kernel.org, dsterba@suse.com
Subject: Re: [btrfs] 0f80799866: WARNING:at_fs/sysfs/file.c:#sysfs_emit
Date: Fri, 22 Oct 2021 00:18:37 +0800	[thread overview]
Message-ID: <d436f663-2b9b-1625-3de6-1b29130de8bd@oracle.com> (raw)
In-Reply-To: <20211021160648.GD20319@twin.jikos.cz>



On 22/10/2021 00:06, David Sterba wrote:
> On Thu, Oct 21, 2021 at 09:35:38PM +0800, kernel test robot wrote:
>>
>>
>> Greeting,
>>
>> FYI, we noticed the following commit (built with gcc-9):
>>
>> commit: 0f807998661ecadb74638c18cbaff8785bb46f8d ("[PATCH 1/2] btrfs: sysfs convert scnprintf and snprintf to use sysfs_emit")
>> url: https://github.com/0day-ci/linux/commits/Anand-Jain/provide-fsid-in-sysfs-devinfo/20211019-082356
>> base: https://git.kernel.org/cgit/linux/kernel/git/kdave/linux.git for-next
>>
>> in testcase: boot
>>
>> on test machine: qemu-system-i386 -enable-kvm -cpu SandyBridge -smp 2 -m 4G
> 
> I wonder if it's related to the 32bit host, I don't see any crash.
> 


We are hitting this warning:

int sysfs_emit(char *buf, const char *fmt, ...)
{
         va_list args;
         int len;

         if (WARN(!buf || offset_in_page(buf),   <====
                  "invalid sysfs_emit: buf:%p\n", buf))
                 return 0;
<snip>


The input buf wasn't page-aligned because it wasn't part of the show().

WARNING: multiple messages have this Message-ID (diff)
From: Anand Jain <anand.jain@oracle.com>
To: lkp@lists.01.org
Subject: Re: [btrfs] 0f80799866: WARNING:at_fs/sysfs/file.c:#sysfs_emit
Date: Fri, 22 Oct 2021 00:18:37 +0800	[thread overview]
Message-ID: <d436f663-2b9b-1625-3de6-1b29130de8bd@oracle.com> (raw)
In-Reply-To: <20211021160648.GD20319@twin.jikos.cz>

[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]



On 22/10/2021 00:06, David Sterba wrote:
> On Thu, Oct 21, 2021 at 09:35:38PM +0800, kernel test robot wrote:
>>
>>
>> Greeting,
>>
>> FYI, we noticed the following commit (built with gcc-9):
>>
>> commit: 0f807998661ecadb74638c18cbaff8785bb46f8d ("[PATCH 1/2] btrfs: sysfs convert scnprintf and snprintf to use sysfs_emit")
>> url: https://github.com/0day-ci/linux/commits/Anand-Jain/provide-fsid-in-sysfs-devinfo/20211019-082356
>> base: https://git.kernel.org/cgit/linux/kernel/git/kdave/linux.git for-next
>>
>> in testcase: boot
>>
>> on test machine: qemu-system-i386 -enable-kvm -cpu SandyBridge -smp 2 -m 4G
> 
> I wonder if it's related to the 32bit host, I don't see any crash.
> 


We are hitting this warning:

int sysfs_emit(char *buf, const char *fmt, ...)
{
         va_list args;
         int len;

         if (WARN(!buf || offset_in_page(buf),   <====
                  "invalid sysfs_emit: buf:%p\n", buf))
                 return 0;
<snip>


The input buf wasn't page-aligned because it wasn't part of the show().

  reply	other threads:[~2021-10-21 16:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19  0:22 [PATCH 0/2] provide fsid in sysfs devinfo Anand Jain
2021-10-19  0:22 ` [PATCH 1/2] btrfs: sysfs convert scnprintf and snprintf to use sysfs_emit Anand Jain
2021-10-21 13:35   ` [btrfs] 0f80799866: WARNING:at_fs/sysfs/file.c:#sysfs_emit kernel test robot
2021-10-21 13:35     ` kernel test robot
2021-10-21 15:30     ` Anand Jain
2021-10-21 15:30       ` Anand Jain
2021-10-21 16:06     ` David Sterba
2021-10-21 16:06       ` David Sterba
2021-10-21 16:18       ` Anand Jain [this message]
2021-10-21 16:18         ` Anand Jain
2021-10-21 16:00   ` [PATCH 1/2] btrfs: sysfs convert scnprintf and snprintf to use sysfs_emit David Sterba
2021-10-21 16:15     ` Anand Jain
2021-10-19  0:22 ` [PATCH 2/2] btrfs: sysfs add devinfo/fsid to retrieve fsid from the device Anand Jain
2021-10-20 18:59   ` David Sterba
2021-10-21  4:03     ` Anand Jain
2021-10-21  8:55       ` Anand Jain
2021-10-19 13:57 ` [PATCH 0/2] provide fsid in sysfs devinfo Josef Bacik
2021-10-20  2:26   ` Anand Jain

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=d436f663-2b9b-1625-3de6-1b29130de8bd@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=oliver.sang@intel.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.