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 A98FDC32771 for ; Mon, 26 Sep 2022 14:32:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2BFC38E005F; Mon, 26 Sep 2022 10:32:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2484B8E0047; Mon, 26 Sep 2022 10:32:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0C3868E005F; Mon, 26 Sep 2022 10:32:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id ECFD78E0047 for ; Mon, 26 Sep 2022 10:32:29 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id B65B21609CF for ; Mon, 26 Sep 2022 14:32:29 +0000 (UTC) X-FDA: 79954477218.19.25671E3 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf06.hostedemail.com (Postfix) with ESMTP id 36CEC18000B for ; Mon, 26 Sep 2022 14:32: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 1E05B21B79; Mon, 26 Sep 2022 14:32:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1664202747; 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=7tqk1/BNUZ/BZYPgkGc3UWgIJGHk0bekQA/PLeqWyLo=; b=uAlO4EpqeS/6KqE8Y0DzGycnNBn2BYDfe2ZRaBGp1cNR4Yw2AeZcZAHr5RN7ohULLbwnst jV8WnUMpSoL5x3BtLvOPmsHcFrWDXD7VMZr0b/Yjb+9uf250h6ze6taDsb1MkQHshRSHO1 u52CZftmxzcuCuEB8EUuZB4bd/Z+jeM= 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 008A913486; Mon, 26 Sep 2022 14:32:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 5uXKOPq3MWOZDAAAMHmgww (envelope-from ); Mon, 26 Sep 2022 14:32:26 +0000 Date: Mon, 26 Sep 2022 16:32: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: <20220923133512.GE22541@breakpoint.cc> <20220926075639.GA908@breakpoint.cc> <20220926100800.GB12777@breakpoint.cc> <20220926130808.GD12777@breakpoint.cc> <20220926142013.GF12777@breakpoint.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220926142013.GF12777@breakpoint.cc> ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=uAlO4Epq; spf=pass (imf06.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664202748; a=rsa-sha256; cv=none; b=VmyqFKNTvwpyEYLo4d64sE95yjxHVnWeg4QuYBaEr96G9CFhHlVlWpqH8H3Gsk64rMYyZY S1ZVDlTdyT5sK1XXPUdzkQWzCD6umAmOTLN48IoSfFH39o/Xtws2sH4Ka0Wo1Lfk37LmS0 nz2YjlndkMwUIQO8dHpPZAs1ztTl7DE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664202748; 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=7tqk1/BNUZ/BZYPgkGc3UWgIJGHk0bekQA/PLeqWyLo=; b=sD6jBuUnziexC3EgBK2XS0MP8ikow70cJsMqq5Pmkf8gymqoCDqclrjjEZsr4Ea4RUXhkc wwKDZ78/vmak73mnL76KdS+SR0APaHXLpai6lXEeNgsxH0aZg55vpq0X9e1iw4DbzOJX8y VA2HZmGG/2J9mj8jjcMFgWxIlAFNd80= Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=uAlO4Epq; spf=pass (imf06.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-Stat-Signature: b19zmiwhyjfnsriua4abybkf496ujd4i X-Rspamd-Queue-Id: 36CEC18000B X-Rspamd-Server: rspam12 X-Rspam-User: X-HE-Tag: 1664202748-22527 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 Mon 26-09-22 16:20:13, Florian Westphal wrote: > Michal Hocko wrote: > > On Mon 26-09-22 15:08:08, Florian Westphal wrote: > > [...] > > > To the best of my knowledge there are users of this interface that > > > invoke it with rcu read lock held, and since those always nest, the > > > rcu_read_unlock() won't move us to GFP_KERNEL territory. > > > > Fiar point. I can see a comment above rhashtable_insert_fast which is > > supposed to be used by drivers and explicitly documented to be > > compatible with an atomic context. So the above is clearly a no-go > > > > In that case I would propose to go with the patch going > > http://lkml.kernel.org/r/YzFplwSxwwsLpzzX@dhcp22.suse.cz direction. > > FWIW that patch works for me. Will you do a formal patch submission? Feel free to use it and glue it to the actual bug report. Thanks! -- Michal Hocko SUSE Labs