linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: syzbot <syzbot+bc9e2d2dbcb347dd215a@syzkaller.appspotmail.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	syzkaller-bugs@googlegroups.com, mptcp@lists.linux.dev,
	netdev@vger.kernel.org
Subject: Re: [syzbot] WARNING in page_counter_cancel (3)
Date: Wed, 29 Dec 2021 10:23:07 +0100	[thread overview]
Message-ID: <Ycwo+++dToWQ1RMR@dhcp22.suse.cz> (raw)
In-Reply-To: <20211221155736.90bbc5928bcd779e76ca8f95@linux-foundation.org>

On Tue 21-12-21 15:57:36, Andrew Morton wrote:
> On Sat, 18 Dec 2021 06:04:22 -0800 syzbot <syzbot+bc9e2d2dbcb347dd215a@syzkaller.appspotmail.com> wrote:
> 
> > syzbot has found a reproducer for the following issue on:
> > 
> > HEAD commit:    fbf252e09678 Add linux-next specific files for 20211216
> > git tree:       linux-next
> > console output: https://syzkaller.appspot.com/x/log.txt?x=1797de99b00000
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=7fcbb9aa19a433c8
> > dashboard link: https://syzkaller.appspot.com/bug?extid=bc9e2d2dbcb347dd215a
> > compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=135d179db00000
> > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=113edb6db00000
> 
> Useful to have that, thanks.
> 
> I'm suspecting that mptcp is doing something strange.

Yes.

> Could I as the
> developers to please take a look?
> 
> 
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+bc9e2d2dbcb347dd215a@syzkaller.appspotmail.com
> > 
> > R13: 00007ffdeb858640 R14: 00007ffdeb858680 R15: 0000000000000004
> >  </TASK>
> > ------------[ cut here ]------------
> > page_counter underflow: -4294966651 nr_pages=4294967295

__mptcp_mem_reclaim_partial is trying to uncharge (via
__sk_mem_reduce_allocated) negative amount. nr_pages has overflown when
converted from int to unsigned int (-1). I would say that
__mptcp_mem_reclaim_partial has evaluated
	reclaimable = mptcp_sk(sk)->rmem_fwd_alloc - sk_unused_reserved_mem(sk)
to 0 and __mptcp_rmem_reclaim(sk, reclaimable - 1) made it -1.
-- 
Michal Hocko
SUSE Labs


  reply	other threads:[~2021-12-29  9:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-21 12:49 syzbot
2021-12-18 14:04 ` syzbot
2021-12-21 23:57   ` Andrew Morton
2021-12-29  9:23     ` Michal Hocko [this message]
2022-01-05  0:08       ` Mat Martineau
2021-12-18 19:59 ` syzbot

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=Ycwo+++dToWQ1RMR@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+bc9e2d2dbcb347dd215a@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox