mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: chenxin <chenxinxin@xiaomi.com>
To: sashal@kernel.org
Cc: akpm@linux-foundation.org, baohua@kernel.org,
	cgroups@vger.kernel.org, chenxinxin@xiaomi.com, david@kernel.org,
	david@redhat.com, gregkh@linuxfoundation.org, hannes@cmpxchg.org,
	hughd@google.com, jose.fernandez@linux.dev,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	mambaxin@163.com, mhocko@kernel.org, muchun.song@linux.dev,
	roman.gushchin@linux.dev, ryncsn@gmail.com,
	shakeel.butt@linux.dev, shakeelb@google.com,
	stable@vger.kernel.org,
	syzbot+e12bd9ca48157add237a@syzkaller.appspotmail.com,
	v-songbaohua@oppo.com
Subject: Re: [PATCH] mm: swap_cgroup: fix NULL deref in lookup_swap_cgroup_id on swapless host
Date: Tue, 18 Aug 2026 09:40:34 +0800	[thread overview]
Message-ID: <20260818014034.2632872-1-chenxinxin@xiaomi.com> (raw)
In-Reply-To: <20260817150000.4@kernel.org>

> > Yes, we would like to backport this patch to the 6.6.y stable tree.
> > We have encountered the same issue on a product running the Android GKI 6.6 kernel.
>
> This is not a 6.6.y fix. The NULL deref is only reachable through the
> batching added by bea67dcc5eea ("mm: attempt to batch free swap entries
> for zap_pte_range()"), which is v6.12 and newer. 6.6.y has no
> swap_pte_batch() at all, so the exit_mmap -> zap_pte_range ->
> lookup_swap_cgroup_id path you are hitting does not exist there and the
> guard would be dead code.
> 
> Your oops is on Android GKI 6.6, which carries the batching backport
> downstream - that is the tree that should carry this fix, alongside the
> commit that makes it reachable.
> 
> -- 
> Thanks,
> Sasha

Thanks a lot for clarifying, as you noted, this commit was backported
to GKI 6.6 by Google, which is what makes the NULL deref reachable there.
I'll follow up with Google to get the fix backported onto the GKI kernel.

Thanks again for your help.

--
Thanks,
Chenxin


  reply	other threads:[~2026-08-18  1:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14  7:47 mambaxin
2026-08-14 11:23 ` Barry Song
2026-08-15  0:36   ` Shakeel Butt
2026-08-17  3:26     ` mambaxin
2026-08-17 15:24       ` Sasha Levin
2026-08-18  1:40         ` chenxin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-05-04 12:55 Jose Fernandez (Anthropic)

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=20260818014034.2632872-1-chenxinxin@xiaomi.com \
    --to=chenxinxin@xiaomi.com \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=david@kernel.org \
    --cc=david@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=jose.fernandez@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mambaxin@163.com \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=ryncsn@gmail.com \
    --cc=sashal@kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=shakeelb@google.com \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+e12bd9ca48157add237a@syzkaller.appspotmail.com \
    --cc=v-songbaohua@oppo.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

all inboxes | Powered by JetHome®