Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1397242lqt; Wed, 20 Mar 2024 02:43:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWmDY+2qIC9HJEKHj2iaC4N6597oZJN/o5SZz/O0sSBMGvPqVe8USy8GjUpFQul8HFJ0jUaRV8exAZQlCRG/ac8oob3bJyt91xijSrvbw== X-Google-Smtp-Source: AGHT+IGiVvx4ZfCeWJ+vRmIMZqc2HZU1vnjG2b4GCpBPhWHo8voqfnUGknDCs347ykPDf62SchUh X-Received: by 2002:a05:6214:952:b0:691:2153:55ba with SMTP id dn18-20020a056214095200b00691215355bamr4242904qvb.45.1710927786159; Wed, 20 Mar 2024 02:43:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710927786; cv=pass; d=google.com; s=arc-20160816; b=maHHiPsNsyn6bxI81iFEXfpA2E7XZiLyhq4TXnWUo19fPYOdNFqkcRhhsixCtD19Mj EzCgtXq9V5hZYJVqbz/+ZdyVsYeb689hxCq6SA6TMVCgiOVbOFkpmx2DrXpUGCnsVbGd AykhQN6XR4dXBnhsyYCEHrewFSgsG1W4k2XUfxqrlRJzkmTaToZYclP6/l6KoQpfwp4z 0amocUV49DWPqt13vn4XCTCWJsc7dgFj0d/mTU93i6EO2knDp7XxvjHuWVJTvR6osJdW Qnrh9rIustX/RlMjcoZ3eN3jU2EnnfAHo/MTMQtA2XCiQkBqvL9UU17s5nnfPz2Q0I1I +p7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=6n4lM0EoyDq67k/k+7sTSjJjRhOgrSRgGESnhSl2ZzE=; fh=x3W8Y8d3iovesFhbE3e5aUd8oYcP82XzgOEj9w/C0PE=; b=Lejut0F2gj1d3bIRejSqvN6flvdTDI4vgfXyvtzipTGByV3SevgNxyNcckpxzlbLfK JH33tkIh5DQ4FDw9VcwM2w6o1jzNB5MaNXpVKTxdS6e2ftXzHHBbSpj9NU36a/i2+PbU 5ztqwoQQ3cbaJuFhcQDiqZWrVr1Sz+3zzc16O0xY+0hAgRmVWsh3cjd8/DjIxzOKMeZS hcFSLF2JRsu9aK/sgqW1tyw0i3dV2oKA9msC/FOnkVZ0xKtAWZsLVhvDkh04Y81f9p1d uTkpDJIQmB18/kymHbtPaMY2CX5iq43QSECxo79i6wZe0yITW/KTOuFMYrEN5I62Yf5r QExw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=i-love.sakura.ne.jp); spf=pass (google.com: domain of linux-kernel+bounces-108703-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108703-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id gy7-20020a056214242700b00690dc9dcc3esi12394799qvb.353.2024.03.20.02.43.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 02:43:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-108703-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=i-love.sakura.ne.jp); spf=pass (google.com: domain of linux-kernel+bounces-108703-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108703-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DD3EC1C2197B for ; Wed, 20 Mar 2024 09:43:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 371983B7A8; Wed, 20 Mar 2024 09:43:00 +0000 (UTC) Received: from www262.sakura.ne.jp (www262.sakura.ne.jp [202.181.97.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 852FF381AC for ; Wed, 20 Mar 2024 09:42:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.181.97.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710927779; cv=none; b=jyeEdNj+aVlpesTcBTk+3b2sLJvmXbdqd6soeOgqRhbHFw9qvRBknZon85HR/53sSWgcpgDOe1mx9sIrOtuabMiPtEkKjtdCDceMBf9OtyB0ZzaVJ0426pz9OUY5gOtr3oXc/hTZ2flCSepYMtm+2l6e8vT8gbflXY+Ei3aseTs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710927779; c=relaxed/simple; bh=DNJw44BGlAXSM17lOwQozV3G2sE2GRZ3K3k74HcLxoc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Jt0k+4yAlf1wYV5tnRMlmgRuoFTP37dxV7hfwFPtwIMFGUJLAtphbr5V5kkNFY7eScD2wt+cGwg8xBUHIaUihvvpj609h2mshl1bWrOTvm49ZdrvjM+RyyBfxqnEZKBOmERlZbznIz53NkiOdeMzy8fnLTfKI8J6rXzyyqDaQkk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=I-love.SAKURA.ne.jp; spf=pass smtp.mailfrom=I-love.SAKURA.ne.jp; arc=none smtp.client-ip=202.181.97.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=I-love.SAKURA.ne.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=I-love.SAKURA.ne.jp Received: from fsav315.sakura.ne.jp (fsav315.sakura.ne.jp [153.120.85.146]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 42K9grZU037117; Wed, 20 Mar 2024 18:42:53 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav315.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav315.sakura.ne.jp); Wed, 20 Mar 2024 18:42:53 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav315.sakura.ne.jp) Received: from [192.168.1.6] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 42K9grgL037114 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Wed, 20 Mar 2024 18:42:53 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Message-ID: <2b75a26f-6c8b-40b3-8ea7-d2cf275b58fe@I-love.SAKURA.ne.jp> Date: Wed, 20 Mar 2024 18:42:52 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] mm,page_owner: Fix refcount imbalance Content-Language: en-US To: Oscar Salvador Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Michal Hocko , Vlastimil Babka , Marco Elver , Andrey Konovalov , Alexander Potapenko , syzbot+41bbfdb8d41003d12c0f@syzkaller.appspotmail.com References: <20240319183212.17156-1-osalvador@suse.de> <20240319183212.17156-2-osalvador@suse.de> <20240319162430.3e76504d06f12edc107029a4@linux-foundation.org> From: Tetsuo Handa In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2024/03/20 14:49, Oscar Salvador wrote: > This should have the follwing on top: > > diff --git a/mm/page_owner.c b/mm/page_owner.c > index 2613805cb665..e477a71d6adc 100644 > --- a/mm/page_owner.c > +++ b/mm/page_owner.c > @@ -222,8 +222,11 @@ static void dec_stack_record_count(depot_stack_handle_t handle, > { > struct stack_record *stack_record = __stack_depot_get_stack_record(handle); > > - if (stack_record) > - refcount_sub_and_test(nr_base_pages, &stack_record->count); > + if (!stack_record) > + return; > + > + if (refcount_sub_and_test(nr_base_pages, &stack_record->count)) > + WARN(1, "%s refcount went to 0 for %u handle\n", __func__, handle); > } > > That fixed this problem. Thank you. -------- Forwarded Message -------- Date: Wed, 20 Mar 2024 01:31:03 -0700 In-Reply-To: <4362246e-d804-43de-800b-a7840b70919a@I-love.SAKURA.ne.jp> Message-ID: <000000000000410e3b061413692b@google.com> Subject: Re: [syzbot] [mm?] WARNING: refcount bug in __reset_page_owner From: syzbot To: linux-kernel@vger.kernel.org, penguin-kernel@i-love.sakura.ne.jp, syzkaller-bugs@googlegroups.com Hello, syzbot has tested the proposed patch and the reproducer did not trigger any issue: Reported-and-tested-by: syzbot+98c1a1753a0731df2dd4@syzkaller.appspotmail.com Tested on: commit: a4145ce1 Merge tag 'bcachefs-2024-03-19' of https://ev.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=131b1d66180000 kernel config: https://syzkaller.appspot.com/x/.config?x=9f47e8dfa53b0b11 dashboard link: https://syzkaller.appspot.com/bug?extid=98c1a1753a0731df2dd4 compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 patch: https://syzkaller.appspot.com/x/patch.diff?x=13972985180000 Note: testing is done by a robot and is best-effort only.