Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3845512pxj; Mon, 24 May 2021 16:42:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrtk1tMvszw4rW90l6kkel6nQSVasUpG3/xKkZxVN9QAWltpNEUow6+fu3ZMnTJJWZz/dE X-Received: by 2002:a05:6402:cb8:: with SMTP id cn24mr28107542edb.325.1621899735509; Mon, 24 May 2021 16:42:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621899735; cv=none; d=google.com; s=arc-20160816; b=0ioKX0sxitipqEmVS4d88nJ+bell+8FNWXqZ0qMWnPatRqCGUVCLpbfxkNlipJF148 Gs+oc6GDsvlWnmFHIZDLzP2aq/sB31mjQxe8UFWgYOi1WVSYDRd9vGRIwFWrUNwX8qsp sIFStkEKMOHnzidgZsO3fIMyhOtA1WWLTupYXUPWItNkTG3r0iqLRiXzTehiuru0phZS uR9RPlftF0P8dRg1jZVMcvyR9AcJMY9jdw7GYeRRgx37baue+znYCS9GTuGYWMngZ79I 2bP8H8KZkmm8EBT80m7vWBPLxC6uFE8t23NZfFNYwIw/26/hOMv/nmKUqTiLppj+7zq7 uddQ== 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=aUIAKZ/cgxKh9v7kIUfaOO2xqJqOf21U7OJe0EAXOps=; b=fhVJAvVNzbJ85JUiIwHwtv5G2ekGLAEfZkxmInUegmR2l7Wq3AP/7T/tHx3iqwpydA XvIr09Bc1g++Bz6cqUhI6QzOnDZ5QfJpyOD1ND58/jry06Ks9lhOAf+jSwwr7qkjMniX /8s8iHEMQ15O3WRXkOizXxpbK2MtdLHeZJ+HSjikfraY+UYmV5zLR2Qzea1NOiucQo4v Q3rF2/cAkiHqTgv478HuyyY6V+61trXtr12RVEGpFQkkP3Gpm7UhQtxmy24N2yqSpXjW Z2XK5lqYDDnXmRiXFE/ZBRDYW8y0Jn9/336HZw+LhEnQxjzGHcT7VUc0ezI0nkjz+D3c 8Ddg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=ukhJrKsV; dkim=neutral (no key) header.i=@suse.cz; 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 k5si13012804edx.252.2021.05.24.16.41.53; Mon, 24 May 2021 16:42:15 -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=ukhJrKsV; dkim=neutral (no key) header.i=@suse.cz; 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 S229982AbhEXXmW (ORCPT + 99 others); Mon, 24 May 2021 19:42:22 -0400 Received: from mx2.suse.de ([195.135.220.15]:50460 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229600AbhEXXmS (ORCPT ); Mon, 24 May 2021 19:42:18 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1621899648; 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=aUIAKZ/cgxKh9v7kIUfaOO2xqJqOf21U7OJe0EAXOps=; b=ukhJrKsVX0lO5Maa0Rqq3jECdBPh1ANWgBYUtl754UpwHolr/99XQKGcvV/+k0TvTDqcHT NRd06AldbjTjnu5dG24ssKarK6bn2C+es0ur+SqZvIPvyvFjobLvLigoOUThOFerEHcc3C fuFeBMz4Own93tjZDk4oGbPtVgpFNDY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1621899648; 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=aUIAKZ/cgxKh9v7kIUfaOO2xqJqOf21U7OJe0EAXOps=; b=6G9HUTbdlnVPSZDUCYmbJ+K4kG02YmmJg4J/xBsUigTbR84OJVUsk5/TqUvUBDJkG7w17k XSGO59Wwo9+SKhAw== Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id DF4DCAF11; Mon, 24 May 2021 23:40:47 +0000 (UTC) From: Vlastimil Babka To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Lameter , David Rientjes , Pekka Enberg , Joonsoo Kim Cc: Sebastian Andrzej Siewior , Thomas Gleixner , Mel Gorman , Jesper Dangaard Brouer , Peter Zijlstra , Jann Horn , Vlastimil Babka Subject: [RFC 03/26] mm, slub: don't disable irq for debug_check_no_locks_freed() Date: Tue, 25 May 2021 01:39:23 +0200 Message-Id: <20210524233946.20352-4-vbabka@suse.cz> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524233946.20352-1-vbabka@suse.cz> References: <20210524233946.20352-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. Signed-off-by: Vlastimil Babka --- mm/slub.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index ed0f2620b19b..83ad64c1d9da 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1545,20 +1545,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.31.1