From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8609FC6FA86 for ; Thu, 22 Sep 2022 12:13:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EDEEF940008; Thu, 22 Sep 2022 08:13:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E8E04940007; Thu, 22 Sep 2022 08:13:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D7CEB940008; Thu, 22 Sep 2022 08:13:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id C9087940007 for ; Thu, 22 Sep 2022 08:13:01 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 891AF1C6D04 for ; Thu, 22 Sep 2022 12:13:01 +0000 (UTC) X-FDA: 79939610562.15.B90A641 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [193.142.43.52]) by imf28.hostedemail.com (Postfix) with ESMTP id E2548C0021 for ; Thu, 22 Sep 2022 12:13:00 +0000 (UTC) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1obL4Y-0005jv-3m; Thu, 22 Sep 2022 14:12:54 +0200 Date: Thu, 22 Sep 2022 14:12:54 +0200 From: Florian Westphal To: Martin Zaharinov Cc: Florian Westphal , Eric Dumazet , pablo@netfilter.org, Paolo Abeni , netdev , netfilter-devel@vger.kernel.org, linux-mm@kvack.org, mhocko@suse.com Subject: Re: Bug Report Flowtable NFT with kernel 5.19.9 Message-ID: <20220922121254.GA19803@breakpoint.cc> References: <09BE0B8A-3ADF-458E-B75E-931B74996355@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <09BE0B8A-3ADF-458E-B75E-931B74996355@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663848781; a=rsa-sha256; cv=none; b=2g0xZ6mYvnJC0fq9qDQBCAqQml5LWOkT/77jziAVmBWszBtpKNx29fU3a7XUJd8hpwigpV 4SOrDM6hWSsC8WKch06iahoQW38tHL0OVDY0co+SsqCeihzs4mjW3fxYgOwhPcxoBO7tCL UHxHuSHfMhuN41cb5y9pHZ30elIRQJo= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf28.hostedemail.com: domain of fw@strlen.de designates 193.142.43.52 as permitted sender) smtp.mailfrom=fw@strlen.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663848781; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=snHwPJS7osYZqVzLy8AJwKP8gAaWEFWxwelQ/mUtKcA=; b=XG60fSAXjMC/51DaLltIm1vgJcSWruVxzs+1FXtYvQ3C+xTHCuJo9va6IPjdrD1p45sI4G qRJlbj4AtTxpKcZS9G97PnSFer+BvA7Jcd5W+0vJe/QHenOLQ9jD8y+dSXZcUMRZdIxPea oKqZS39YgBTjB/ZS+6E49K3C9uV/nhk= X-Stat-Signature: 5pppn7w8785ck7yj1qfotebbhqwcy585 X-Rspamd-Queue-Id: E2548C0021 Authentication-Results: imf28.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf28.hostedemail.com: domain of fw@strlen.de designates 193.142.43.52 as permitted sender) smtp.mailfrom=fw@strlen.de X-Rspamd-Server: rspam02 X-Rspam-User: X-HE-Tag: 1663848780-788374 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Martin Zaharinov wrote: > This is bug report for flowtable and kernel 5.19.9 > > simple config nat + flowtable CC mm experts. I'm not sure that this is a bug in netfilter/rhashtable, looks like mm problem perhaps? I am a bit confused wrt. kvzalloc+GFP_ATOMIC. This looks like following is happening: 5.19.9 kernel BUGs with: > Sep 22 07:43:49 [460691.305266][ C28] kernel BUG at mm/vmalloc.c:2437! [ BUG_ON(in_interrupt ] > Sep 22 07:43:50 [460692.031617][ C28] Call Trace: > Sep 22 07:43:50 [460692.064498][ C28] > Sep 22 07:43:50 [460692.096177][ C28] __vmalloc_node_range+0x96/0x1e0 > Sep 22 07:43:50 [460692.128014][ C28] ? bucket_table_alloc.isra.0+0x47/0x140 > Sep 22 07:43:50 [460692.160134][ C28] kvmalloc_node+0x92/0xb0 > Sep 22 07:43:50 [460692.191885][ C28] ? bucket_table_alloc.isra.0+0x47/0x140 > Sep 22 07:43:50 [460692.224234][ C28] bucket_table_alloc.isra.0+0x47/0x140 > Sep 22 07:43:50 [460692.256840][ C28] rhashtable_try_insert+0x3a4/0x440 [ rest irrelevant ] AFAICS this is caused by kvzalloc(GFP_ATOMIC) which somehow ends up in GFP_KERNEL-only territory? Looking at recent history I see commit a421ef303008b0ceee2cfc625c3246fa7654b0ca Author: Michal Hocko Date: Fri Jan 14 14:07:07 2022 -0800 mm: allow !GFP_KERNEL allocations for kvmalloc before this, GFP_ATOMIC made sure we stay with plain kmalloc, but now it appears that we can end up in places where GFP_ATOMIC isn't allowed? Original bug report is here: https://lore.kernel.org/netdev/09BE0B8A-3ADF-458E-B75E-931B74996355@gmail.com/T/#u