Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp41695rdb; Fri, 26 Jan 2024 18:01:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IEla6Wi8xkhKMmkBJs9qXk2XjAm3Wy/2fsW3xK6h7TapTMVnZP2/4X6z7OQGQ/iGODT5sqw X-Received: by 2002:a05:6358:33a1:b0:175:4d29:ac23 with SMTP id i33-20020a05635833a100b001754d29ac23mr1115791rwd.26.1706320895453; Fri, 26 Jan 2024 18:01:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706320895; cv=pass; d=google.com; s=arc-20160816; b=m+nGzvr2k4C8IZozwSky+HTzABdV1Msp0CwBM3eQuioVd0zQSOk6BsHH4aDb2ppKzh 4iBUNFK77zpIAYwiykmnxB9y78CGtgtq6q+26kuacGcb9wPU1T970BG0uCMbPE8sWQwZ VhqPxfbcYBOFq3Xkls69gK3jYQPe+wU6UQ2QNGQHEqM04sc7eYp0uz2yufMsCbFvBJqS MSfeeX41dlPVtCxiEDVYQx/TK2lzaXmn0jLd2u2v+4UDwMkzpo7pPcDWrVHO6GNTAc1v wz4OgrmMjb0/Zz2oirEsRXTqknqWf9TnrfDhgaullg2Wo2PZ+bq8bCOwje3ey3G46hab nrlw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=3mxHfQelYlqL6oP1Hnoe6QZezCLAhWkLAbAnrEYZUDY=; fh=0UIAGl0E4wRbBfdUoF7pqM3CUJarYucrbeDSpW3ZHvo=; b=AYcsSxxkYqely/QxEl0e1XvooeJyFLHHosqkt+Mf3FppbSC7HZOUNfVms3TN8p4X1z cA3lUjgkMbBpALsbJOsA7DJx9yR8EM+ArVWGfGKdgIw+rzktl9ttpRX9dO5TzSt9e6op rbnDf/IMgdwg5dRIpE2QSD+iVKOIHgxvfpURQgyi1KPIrL4PpJSwrQ8eXbN8BnXuInj2 aG8tDqW9w//wN+4je/r4lGnO5tj8LALNsk2kEKXGJDjmQRD1VtDsrZRt2U3s85qZEgDN iJpFPvvfv7HD2uzbKiD9gApTPCnxNkg2Siutt1CZ2YyqctbrejUjBf8kcvqfbK/RAQR7 uuhg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=jTFswpDR; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-40975-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40975-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g10-20020a170902c98a00b001d72fbbf760si1941476plc.545.2024.01.26.18.01.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 18:01:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40975-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=jTFswpDR; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-40975-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40975-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0F45028C71D for ; Sat, 27 Jan 2024 02:01:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2016CBA30; Sat, 27 Jan 2024 02:01:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="jTFswpDR" Received: from out-172.mta1.migadu.com (out-172.mta1.migadu.com [95.215.58.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6378A2F3A; Sat, 27 Jan 2024 02:01:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706320884; cv=none; b=n18KofAukUBzVwqygr6f6XCcS++U6zx0IPnB3iECSMT4pEhSANqIHbszLt4X46hqI/wFh8gMbNssyz5tnlJ4I6X8NEvdSnTmuDUwCQ1bT3O75i/yzWKjc689vxz5+alp+1T/cW0/DCzezu4q7UwDc/ikqjep+2W1SmeexkVm+dg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706320884; c=relaxed/simple; bh=iy4bbPlcTHR5BujKxgwpeH6pLrpzI4Fhpz5iOUvrDBk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rsIJQuaAzXrT3+h4bE3ALKTMGPtoByr/13u5MzEAjs9c0TbEvuGRjDI3k3KGfH1OOiVSDPhv8mmW3QOW6EFDxCpWHZuWLK29XX9tsKhdy+ss095u9/gx2sL17urRNCXJstk9YUEbl9pWxYTHFJuO3bGJm8+ZOeU4W7hP+EK0zH0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=jTFswpDR; arc=none smtp.client-ip=95.215.58.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1706320879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=3mxHfQelYlqL6oP1Hnoe6QZezCLAhWkLAbAnrEYZUDY=; b=jTFswpDRYA+jkiETjI/gfWRf08taHsK/aVZvXqWCGXMdjSIgz69OD0xCLALCZwEQ28TjAA VNv4HhxX4J4c4A7y7jsuhMHrs+I/Pa4txUGFkqiFJ9ycOBUEKlhQVZaatFlM22qCKibxTg DM5z9B9BdJCqHFaWR/Aaj+g93ZO1hD4= From: Kent Overstreet To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-fsdevel@vgerkernel.org Cc: Kent Overstreet , peterz@infradead.org, boqun.feng@gmail.com Subject: [PATCH 0/4] lockdep cmp fn conversions Date: Fri, 26 Jan 2024 21:01:04 -0500 Message-ID: <20240127020111.487218-1-kent.overstreet@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT rationale: *_lock_nested() is fundamentally broken - in order for lockdep to work we need to be able to check that we're following some defined ordering, and it's not possible to define a total ordering of an arbitrary number of objects with only a small fixed size enum. so it needs to go. awhile back I added the ability to set a comparison function for a lock class, and this is the start of hopefully a slow steady trickle of patches as time allows to convert code to use it. Kent Overstreet (4): fs/pipe: Convert to lockdep_cmp_fn pktcdvd: kill mutex_lock_nested() usage net: Convert sk->sk_peer_lock to lock_set_cmp_fn_ptr_order() af_unix: convert to lock_cmp_fn drivers/block/pktcdvd.c | 8 ++--- fs/pipe.c | 77 ++++++++++++++++------------------------ include/linux/lockdep.h | 3 ++ include/net/af_unix.h | 3 -- kernel/locking/lockdep.c | 6 ++++ net/core/sock.c | 1 + net/unix/af_unix.c | 24 ++++++------- net/unix/diag.c | 2 +- 8 files changed, 55 insertions(+), 69 deletions(-) -- 2.43.0