Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4118850pxb; Mon, 27 Sep 2021 09:45:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFNRJ/QjfjVRWJW9KXmahQahk7/vnF/iLdyXOdrMp+9P19PE8RoFzEmhWQHNLrqfxE0CJC X-Received: by 2002:aa7:c305:: with SMTP id l5mr1057523edq.205.1632761153111; Mon, 27 Sep 2021 09:45:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632761153; cv=none; d=google.com; s=arc-20160816; b=X2J3ESK5SKtDBS23/Lcg7/dYtNm4UdTCZ2xYVAA1zH13Ui3ar098hGael86P55aIX2 Yc65/31pKCCWddqkuPG4gRjd5szaRhhyux2hyaenoCP9ZQM7Qtq+tADaQKGkgWIsjLtj 2+Qt6kn1ySe1G7zrfv1S9bgFbTSRkc2ZKrqtuSZs+wDFZkKzLUgwp362+h8L/WE7q2e0 gRPwW6ukQDIPWhcxjWK6ebo5/ZzwptTOvOlAomt9PnOl5yFoTAP6sPH6lHs7G9pCUFU1 gMKvzcIQwdXdko7IeVknT0Pch1xAGumdikG5FwkkUXadH2sQ5cFiS0YtGa70LosZo/+u qRwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=Mpp3yt5UlhJzcT0WXNiNQ5zDVt3UnhzU5xESPpUlLrY=; b=zSOjST0L7WA7icoHwRD8fS1t5N2+T53FMbskYjklm/6XljC8Da4j66aqZgpSEkhxhV f/YrmUolhgm3zN/uHkKaaczfKXD5NrDJqstv2w+xSZ9qubtUkWFEXN6W+7OPA2z8IbGq QtVbyVHcjRahoYaylI8kiuvqlRZhN71ymqchW0qyWWp3NgCD+S/sV+5FJwNzyp8qW8tg 7it9vtdhUA7pQDaygoVrBWO536bhnLbmQIlko0LyayBNqZQQJ+g7Hv2oGPqg7b3ul8VR X/OBv6fiORosYUQZE6OkHS9DhJnH2pDkcii65x6yBgkdK4+pNE3j5fu8+0bYZ/reZOAm 0fbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=N6U4tHO7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk9si17961044edb.143.2021.09.27.09.45.28; Mon, 27 Sep 2021 09:45:53 -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=@gmail.com header.s=20210112 header.b=N6U4tHO7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235562AbhI0QpR (ORCPT + 99 others); Mon, 27 Sep 2021 12:45:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235481AbhI0QpR (ORCPT ); Mon, 27 Sep 2021 12:45:17 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A2DBC061575; Mon, 27 Sep 2021 09:43:39 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id 145so16367562pfz.11; Mon, 27 Sep 2021 09:43:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Mpp3yt5UlhJzcT0WXNiNQ5zDVt3UnhzU5xESPpUlLrY=; b=N6U4tHO7NsJPCAI0pl2qLjHILOWVWb0tMyq2HluBHcliYns5+8xvPinnRPTqZLH0Vp mjDwUGERqM+OLJEABbwAol4NPWVJezO6I0MZVTKNORmd/B+h34NEDOcb68rAv0YmupuZ 8bkK3aG6reOpZDr0tyJ84dzBfEbp0AIADBf+YFz/B8Xh37dd+8jayjQ++afsnikievA0 hyvk7st00zP25LRpCvBlwq0w0Of4Sop9JeO9VLHlA21sz70pV4PKeb1VbDW6QVCFsBW/ aU+qGeKRdcYyDOavIovSgSbh4pdi9nQFhqQMkv5AQdDHphByKFQ2pvBbQxKAG4mdMzWO aPpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=Mpp3yt5UlhJzcT0WXNiNQ5zDVt3UnhzU5xESPpUlLrY=; b=UUbcANZf7DBFeJhnD9u1A4GaBTOFLeXsTZMxzq6RGSWQKWN+k2IFQQkQL/9WqmO4/K WcUtYFXYS0oXArPU5EQPZIqsq7Sxm1HNAnp64Ku4SgS7Lm0dkne9vVUl0C7NPU7B1Y0h ecXmkOxXlmzx3LVxq2T6lGlrTSvbTFzrgD0ARw6YO6XGAivo6EMQ/daGFuCm2qQAXC1x qDgKvgOwIhIqx+egcLN3N7IRezhE0ZVjKWuRpY1DbHMVSpEnvJWxex/4zT+ETzHAah2n M7onxWwGuTCI1qIle7k8I355h+vPFhCBs8by96hDZRuGau/1o0aTguo+WiO5xbSgSh6/ T5bQ== X-Gm-Message-State: AOAM53113vx5DhiJduI5lhtq1zF/O7LTAvGNALxbxyj49/pFRzmYSmhs gJaQxLmNAeHwwEkvkUlXnYnV24+P2A0= X-Received: by 2002:a63:334c:: with SMTP id z73mr570514pgz.160.1632761018498; Mon, 27 Sep 2021 09:43:38 -0700 (PDT) Received: from localhost (2603-800c-1a02-1bae-e24f-43ff-fee6-449f.res6.spectrum.com. [2603:800c:1a02:1bae:e24f:43ff:fee6:449f]) by smtp.gmail.com with ESMTPSA id b3sm17339636pfo.23.2021.09.27.09.43.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 09:43:38 -0700 (PDT) Sender: Tejun Heo Date: Mon, 27 Sep 2021 06:43:36 -1000 From: Tejun Heo To: Waiman Long Cc: Zefan Li , Johannes Weiner , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cgroup/debug: Fix lockdep splat with "%pK" format specifier Message-ID: References: <20210927025807.26918-1-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210927025807.26918-1-longman@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Sun, Sep 26, 2021 at 10:58:07PM -0400, Waiman Long wrote: > The lockdep splat is caused by the fact that the debug controller use the > "%pK" format specifier to print out address of cset's with css_set_lock > held. Under some circumstances, the use of "%pK" format specifier may > acquire the selinux_ss.policy_rwlock. > > To avoid this possible deadlock scenario, we have to abandon the use of > the "%pK" format specifier and just use "%p" to always hash the cset > addresses. The actual cset addresses aren't that important as long as > they are unique for matching purpose. Isn't the right thing to do here making the selinux rwlock an irqsafe one? It's a bit crazy to have printf specifier to have restrictive locking requirements. Thanks. -- tejun