Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp791436pxt; Thu, 5 Aug 2021 11:46:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBApQdyz1WuH65VPzSMhnExMd+M/WsWix+ePGvSFfqpx3C8PtYC+Jl0LSdBP4xzRoCfZPf X-Received: by 2002:a05:6402:299:: with SMTP id l25mr8451757edv.283.1628189165612; Thu, 05 Aug 2021 11:46:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628189165; cv=none; d=google.com; s=arc-20160816; b=ejjBVfJQIk6zO3EInuBwnmUti68/LAE614u3gT1pZI74rtNJ58DRdc6oJINIg4q3/0 nIE/nucaFi4ThVLlbPsVW8zAO6P9DNqeTfsoMSZEi6aDqQCLAVcXWvTcrYWlnyBNGaOU g4mzdhAek2f8EIMk3ldpnP3BZjgr0jKv7SHFPIM4v/YHAwxF5p2i1GUBh6q4mTpVbDEh zoEu9OZX3oa5Kpb2CQ6z8R6HWNHrYklhMdKvVka0yB9NrfuyT7023ACyxnJ6vrEJAe5f McCO0jUrxcs7AjzWoQZL/fpqonbo92G4yKsy12bBsUx6nXowaiUsBuZ0e5jMknlVmB5d EUJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=lTsDSIorHtI/bRezBrdulDQrR5vC48QgDFFiQA8tLvI=; b=pnhiY0y6UYIoNeWPt6HLTHAMxhM6Gt/yZZ7LgRKAvZFtLyZrx7sWItXXsleZMhqh/L Dnp8ufvZ/T+tVIrpksMgD1wtTrbtja63kcthLij2OLqJdN6BgdJL0yeTiT7fRBeH50+2 I8HyBaYsRXh5UWPaLxpuT2W/7D6rgfkJ6hQ0au0w3Pb9jnX3QzP8fhCVrysmOWOm77qq 9Udlrppscb4hhQUHx32zS6ty+yseS4vAIAr57REKHZrucgOAAOKoCRQKB2l7ejoZNDZ9 hjXQBtMogCJEjWj4EMfOHl04DLabfh15JPv7zui7tD5o4jnFZYzsepGK9rozvh7vXKR8 r7pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=3JaHwK4h; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o11si6444898edq.70.2021.08.05.11.45.42; Thu, 05 Aug 2021 11:46:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=3JaHwK4h; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241967AbhHEPVh (ORCPT + 99 others); Thu, 5 Aug 2021 11:21:37 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:59128 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241648AbhHEPUT (ORCPT ); Thu, 5 Aug 2021 11:20:19 -0400 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-out2.suse.de (Postfix) with ESMTPS id D3BD11FE6B; Thu, 5 Aug 2021 15:20:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1628176804; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lTsDSIorHtI/bRezBrdulDQrR5vC48QgDFFiQA8tLvI=; b=3JaHwK4hvn8kZijvccNuzHpUhUr6A8OrzNP/9YhEhV2mePIOzf2BGS1VNDb4MTDEu9hjLt LgonWKEWRfaGH06p3iwj9ujITvyu1YM2DZCcY4JMrA/SGnmHCEwbVUYgdT0Hm7G/6ROOiN 20szfMxMdgUzSBfwK+z5k/4w6/7ymYY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1628176804; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lTsDSIorHtI/bRezBrdulDQrR5vC48QgDFFiQA8tLvI=; b=1OgaD/IaAqPOkdKXCXYFXhYYnwlN9B9rn7CkGZHZ9TciG2VICAIOpXZ10R6iKWw1OX+Xse k9OVrpNB2xmmPlBQ== 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 A661C13DA8; Thu, 5 Aug 2021 15:20:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gBX8J6QBDGFDdQAAMHmgww (envelope-from ); Thu, 05 Aug 2021 15:20:04 +0000 From: Vlastimil Babka To: Andrew Morton , Christoph Lameter , David Rientjes , Pekka Enberg , Joonsoo Kim Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Galbraith , Sebastian Andrzej Siewior , Thomas Gleixner , Mel Gorman , Jesper Dangaard Brouer , Jann Horn , Vlastimil Babka Subject: [PATCH v4 04/35] mm, slub: don't disable irq for debug_check_no_locks_freed() Date: Thu, 5 Aug 2021 17:19:29 +0200 Message-Id: <20210805152000.12817-5-vbabka@suse.cz> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210805152000.12817-1-vbabka@suse.cz> References: <20210805152000.12817-1-vbabka@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In slab_free_hook() we disable irqs around the debug_check_no_locks_freed() call, which is unnecessary, as irqs are already being disabled inside the call. This seems to be leftover from the past where there were more calls inside the irq disabled sections. Remove the irq disable/enable operations. Mel noted: > Looks like it was needed for kmemcheck which went away back in 4.15 Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman --- mm/slub.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index e1889b26a889..4ac4ad021fca 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1588,20 +1588,8 @@ static __always_inline bool slab_free_hook(struct kmem_cache *s, { kmemleak_free_recursive(x, s->flags); - /* - * Trouble is that we may no longer disable interrupts in the fast path - * So in order to make the debug calls that expect irqs to be - * disabled we need to disable interrupts temporarily. - */ -#ifdef CONFIG_LOCKDEP - { - unsigned long flags; + debug_check_no_locks_freed(x, s->object_size); - local_irq_save(flags); - debug_check_no_locks_freed(x, s->object_size); - local_irq_restore(flags); - } -#endif if (!(s->flags & SLAB_DEBUG_OBJECTS)) debug_check_no_obj_freed(x, s->object_size); -- 2.32.0