All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: kernel test robot <oliver.sang@intel.com>
Cc: Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	0day robot <lkp@intel.com>,
	lkp@lists.01.org, ltp@lists.linux.it
Subject: Re: [mm] b6efe2fcc4: BUG:kernel_NULL_pointer_dereference,address
Date: Fri, 13 Nov 2020 08:13:36 -0800	[thread overview]
Message-ID: <97b1b575659bc87a07a308765769451d9eee4aef.camel@perches.com> (raw)
In-Reply-To: <20201113121025.GA7578@xsang-OptiPlex-9020>

On Fri, 2020-11-13 at 20:10 +0800, kernel test robot wrote:
> Greeting,
> 
> FYI, we noticed the following commit (built with gcc-9):
> 
> commit: b6efe2fcc4e11010710ef5cd8e2bcbeb221a06c6 ("mm: slub: Convert sysfs sprintf family to sysfs_emit/sysfs_emit_at")
> url: https://github.com/0day-ci/linux/commits/Joe-Perches/mm-Convert-sysfs-sprintf-family-to-sysfs_emit/20201102-041456
[] 
> on test machine: 8 threads Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz with 32G memory
> 
> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
> 
> If you fix the issue, kindly add following tag
> Reported-by: kernel test robot <oliver.sang@intel.com>
> 
> [   41.689368] BUG: kernel NULL pointer dereference, address: 0000000000000010
> [   41.696354] #PF: supervisor read access in kernel mode
> [   41.701508] #PF: error_code(0x0000) - not-present page
> [   41.706661] PGD 0 P4D 0 
> [   41.709205] Oops: 0000 [#1] SMP PTI
> [   41.712702] CPU: 3 PID: 4619 Comm: read_all Tainted: G          I       5.10.0-rc1-00005-gb6efe2fcc4e1 #1
> [   41.722296] Hardware name: Dell Inc. OptiPlex 7050/062KRH, BIOS 1.2.0 12/22/2016
> [   41.729714] RIP: 0010:slabs_cpu_partial_show+0x95/0xe0

Right, thanks.

I mistakenly dropped a test for page below:

@@ -5156,44 +5156,45 @@ static ssize_t slabs_cpu_partial_show(struct kmem_cache *s, char *buf)
 
                page = slub_percpu_partial(per_cpu_ptr(s->cpu_slab, cpu));
 
-               if (page && len < PAGE_SIZE - 20)
-                       len += sprintf(buf + len, " C%d=%d(%d)", cpu,
-                               page->pobjects, page->pages);
+               len += sysfs_emit_at(buf, len, " C%d=%d(%d)",
+                                    cpu, page->pobjects, page->pages);
        }

I'll correct it and resubmit.



WARNING: multiple messages have this Message-ID (diff)
From: Joe Perches <joe@perches.com>
To: ltp@lists.linux.it
Subject: [LTP] [mm] b6efe2fcc4: BUG:kernel_NULL_pointer_dereference, address
Date: Fri, 13 Nov 2020 08:13:36 -0800	[thread overview]
Message-ID: <97b1b575659bc87a07a308765769451d9eee4aef.camel@perches.com> (raw)
In-Reply-To: <20201113121025.GA7578@xsang-OptiPlex-9020>

On Fri, 2020-11-13 at 20:10 +0800, kernel test robot wrote:
> Greeting,
> 
> FYI, we noticed the following commit (built with gcc-9):
> 
> commit: b6efe2fcc4e11010710ef5cd8e2bcbeb221a06c6 ("mm: slub: Convert sysfs sprintf family to sysfs_emit/sysfs_emit_at")
> url: https://github.com/0day-ci/linux/commits/Joe-Perches/mm-Convert-sysfs-sprintf-family-to-sysfs_emit/20201102-041456
[] 
> on test machine: 8 threads Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz with 32G memory
> 
> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
> 
> If you fix the issue, kindly add following tag
> Reported-by: kernel test robot <oliver.sang@intel.com>
> 
> [   41.689368] BUG: kernel NULL pointer dereference, address: 0000000000000010
> [   41.696354] #PF: supervisor read access in kernel mode
> [   41.701508] #PF: error_code(0x0000) - not-present page
> [   41.706661] PGD 0 P4D 0 
> [   41.709205] Oops: 0000 [#1] SMP PTI
> [   41.712702] CPU: 3 PID: 4619 Comm: read_all Tainted: G          I       5.10.0-rc1-00005-gb6efe2fcc4e1 #1
> [   41.722296] Hardware name: Dell Inc. OptiPlex 7050/062KRH, BIOS 1.2.0 12/22/2016
> [   41.729714] RIP: 0010:slabs_cpu_partial_show+0x95/0xe0

Right, thanks.

I mistakenly dropped a test for page below:

@@ -5156,44 +5156,45 @@ static ssize_t slabs_cpu_partial_show(struct kmem_cache *s, char *buf)
 
                page = slub_percpu_partial(per_cpu_ptr(s->cpu_slab, cpu));
 
-               if (page && len < PAGE_SIZE - 20)
-                       len += sprintf(buf + len, " C%d=%d(%d)", cpu,
-                               page->pobjects, page->pages);
+               len += sysfs_emit_at(buf, len, " C%d=%d(%d)",
+                                    cpu, page->pobjects, page->pages);
        }

I'll correct it and resubmit.



  reply	other threads:[~2020-11-13 16:13 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-01 20:12 [PATCH 0/5] mm: Convert sysfs sprintf family to sysfs_emit Joe Perches
2020-11-01 20:12 ` [PATCH 1/5] mm: Use sysfs_emit for struct kobject * uses Joe Perches
2020-11-01 20:12 ` [PATCH 2/5] mm: huge_memory: Convert remaining use of sprintf to sysfs_emit and neatening Joe Perches
2020-11-01 20:12 ` [PATCH 3/5] mm:backing-dev: Use sysfs_emit in macro defining functions Joe Perches
2020-11-01 20:12 ` [PATCH 4/5] mm: shmem: Convert shmem_enabled_show to use sysfs_emit_at Joe Perches
2020-11-01 20:48   ` Matthew Wilcox
2020-11-01 21:04     ` Joe Perches
2020-11-01 21:04       ` Joe Perches
2020-11-01 21:19       ` Matthew Wilcox
2020-11-01 21:43         ` Joe Perches
2020-11-01 21:43           ` Joe Perches
2020-11-01 22:06           ` Matthew Wilcox
2020-11-01 22:08             ` Joe Perches
2020-11-01 22:08               ` Joe Perches
2020-11-01 22:13             ` Joe Perches
2020-11-01 22:13               ` Joe Perches
2020-11-01 22:14             ` Joe Perches
2020-11-01 22:14               ` Joe Perches
2020-11-02 13:33             ` Greg Kroah-Hartman
2020-11-02 14:08               ` Matthew Wilcox
2020-11-02 14:32                 ` Greg Kroah-Hartman
2020-11-02 14:40                   ` Matthew Wilcox
2020-11-02 17:01                     ` Joe Perches
2020-11-02 17:01                       ` Joe Perches
2020-11-01 20:12 ` [PATCH 5/5] mm: slub: Convert sysfs sprintf family to sysfs_emit/sysfs_emit_at Joe Perches
2020-11-13 12:10   ` [mm] b6efe2fcc4: BUG:kernel_NULL_pointer_dereference,address kernel test robot
2020-11-13 12:10     ` [LTP] [mm] b6efe2fcc4: BUG:kernel_NULL_pointer_dereference, address kernel test robot
2020-11-13 16:13     ` Joe Perches [this message]
2020-11-13 16:13       ` Joe Perches
2020-11-13 16:13       ` [mm] b6efe2fcc4: BUG:kernel_NULL_pointer_dereference,address Joe Perches

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=97b1b575659bc87a07a308765769451d9eee4aef.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=ltp@lists.linux.it \
    --cc=oliver.sang@intel.com \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.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.