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 8462BECAAD8 for ; Fri, 23 Sep 2022 13:29:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D44A480008; Fri, 23 Sep 2022 09:29:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CF42880007; Fri, 23 Sep 2022 09:29:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C09AF80008; Fri, 23 Sep 2022 09:29:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id B4A9080007 for ; Fri, 23 Sep 2022 09:29:29 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 867EC120C2D for ; Fri, 23 Sep 2022 13:29:29 +0000 (UTC) X-FDA: 79943432058.14.DEEB021 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf30.hostedemail.com (Postfix) with ESMTP id 1223480009 for ; Fri, 23 Sep 2022 13:29:28 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A7AB7219E6; Fri, 23 Sep 2022 13:29:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1663939767; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KqOhL/1z0xmD9tmZdAbP8D5T9tbMxBqnVFjN6bOd52Y=; b=t1wXI75qPHFYyyrgOy5ZtEpsPNBiaYev8rXnj8rKmvvaEowfT3MXeP/3yiFsINP9FFvWez ARDju94gr8OvkDFRDqJbJipNYF4ATFKW1b6S42k2DY/Dedi2Rr2WfsaW1D4DJKvIPiJPB6 w7l/0M/k990+KWal4v93jTr+0c/xdhs= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8D5C213AA5; Fri, 23 Sep 2022 13:29:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id kyeBH7e0LWPHDgAAMHmgww (envelope-from ); Fri, 23 Sep 2022 13:29:27 +0000 Date: Fri, 23 Sep 2022 15:29:26 +0200 From: Michal Hocko To: Florian Westphal Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, vbabka@suse.cz, akpm@linux-foundation.org, urezki@gmail.com, netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, Martin Zaharinov Subject: Re: [PATCH mm] mm: fix BUG with kvzalloc+GFP_ATOMIC Message-ID: References: <20220923103858.26729-1-fw@strlen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220923103858.26729-1-fw@strlen.de> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663939769; a=rsa-sha256; cv=none; b=jFn4sIkm6ghSGkV8TF4coWeLUzCIENDUe6GYLJOeCl/j+Zt/BpzL1rMyN870EJ7kIAJu8k Nt965JV1GLUT5lwew0OKRVK2KFQ5pDkrVzbSqlA3RnXmQnXOG+RWXZ0l4UuTUchGZL60L2 MjmnlaVYrQTw4AKk2jEz1GRTKxln00g= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=t1wXI75q; spf=pass (imf30.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663939769; 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:dkim-signature; bh=KqOhL/1z0xmD9tmZdAbP8D5T9tbMxBqnVFjN6bOd52Y=; b=2sM7oIWcXZ5cGtk83uXS6nHE2NFuqKL3uepIY9EfEFpj7yp3qjAWv4X1QdK2TDZp5bfUlR 1G0WO8sMdE4JuZHz3EwJY7A3XTwCYBuUpUg+AlIZ/5zqBFML1hmQ3Nr5oXnyx+Iu8bIy4D GwYDznAoTjas0lp7TVxqgdces6irTYk= X-Stat-Signature: w7e9hjattw3zqpc6y4bptj81quqhr5g4 X-Rspamd-Queue-Id: 1223480009 X-Rspam-User: X-Rspamd-Server: rspam11 Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=t1wXI75q; spf=pass (imf30.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-HE-Tag: 1663939768-493888 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: On Fri 23-09-22 12:38:58, Florian Westphal wrote: > Martin Zaharinov reports BUG() in mm land for 5.19.10 kernel: > kernel BUG at mm/vmalloc.c:2437! > invalid opcode: 0000 [#1] SMP > CPU: 28 PID: 0 Comm: swapper/28 Tainted: G W O 5.19.9 #1 > [..] > RIP: 0010:__get_vm_area_node+0x120/0x130 > __vmalloc_node_range+0x96/0x1e0 > kvmalloc_node+0x92/0xb0 > bucket_table_alloc.isra.0+0x47/0x140 > rhashtable_try_insert+0x3a4/0x440 > rhashtable_insert_slow+0x1b/0x30 > [..] > > bucket_table_alloc uses kvzallocGPF_ATOMIC). If kmalloc fails, this now > falls through to vmalloc and hits code paths that assume GFP_KERNEL. > > Revert the problematic change and stay with slab allocator. Why don't you simply fix the caller? -- Michal Hocko SUSE Labs