From patchwork Thu Oct 26 22:33:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrey.konovalov@linux.dev X-Patchwork-Id: 13437983 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 3A788C25B6B for ; Thu, 26 Oct 2023 22:33:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6EA836B0391; Thu, 26 Oct 2023 18:33:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 69A286B0392; Thu, 26 Oct 2023 18:33:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 562086B0393; Thu, 26 Oct 2023 18:33:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 46AF06B0391 for ; Thu, 26 Oct 2023 18:33:49 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 1308EB6139 for ; Thu, 26 Oct 2023 22:33:49 +0000 (UTC) X-FDA: 81389066178.16.C1B2E1E Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) by imf04.hostedemail.com (Postfix) with ESMTP id 592E64000D for ; Thu, 26 Oct 2023 22:33:47 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=DockHeTS; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf04.hostedemail.com: domain of andrey.konovalov@linux.dev designates 95.215.58.189 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698359627; a=rsa-sha256; cv=none; b=Hek1wRPP6sp12mvHV9vwUatQTyPDsPDbrCsxIv2C9QiJ2KzRgcM6T9EhTXRyDjDxIzYsHX NEaxkSJEJEvW7Nl5AIqseOylM/N1dlEZMNKaGZUusZceg5k9q43lUA7QumcSpKRoZ+3PZv iJB+7JCE7YNCEwMQZZJpefvvm1Ybv70= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=DockHeTS; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf04.hostedemail.com: domain of andrey.konovalov@linux.dev designates 95.215.58.189 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1698359627; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=7wiIXHVKZViLnzrPPkXa8K3V9xAsF9dc3+hDNlwl8Us=; b=jVfIVz0efiXboLkg+SpT9znevo9h5/qvTztNGvnmRaKzxaIzhNjBztVFzb86O6MGLw+2bM Kg24O9vwGdZ6kA7HKWlxvp/Z8TE++X9ZRyh6C+kr2ael5qNoS4Psq6Vz+mnhZ9sGpSpuTx bge6iESPVXVtU81Ho7Ody5yWFkDugWE= 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=1698359625; 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=7wiIXHVKZViLnzrPPkXa8K3V9xAsF9dc3+hDNlwl8Us=; b=DockHeTSLWJS3ERDQQ+vQdQYjzFI2cE8pqfjeWbPs+7eooLKzDkjxQGpB3HmA5VqHJGkSp W6Ygtk0ICvM35OJJe8Yeyf4vzFXFxOh1hmy3yWs8cwlUkj25F2MZo/ficlYUspPUSNbCTG ypIvUVDuxmxvQYyAUsT6qT6DD9WW/sc= From: andrey.konovalov@linux.dev To: Andrew Morton Cc: Andrey Konovalov , Marco Elver , Alexander Potapenko , Dmitry Vyukov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Oscar Salvador , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH] fix for "lib/stackdepot: allow users to evict stack traces" Date: Fri, 27 Oct 2023 00:33:40 +0200 Message-Id: <20231026223340.333159-1-andrey.konovalov@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 592E64000D X-Stat-Signature: i5wkjqfgpwff8bbx9ewfqsdr9bym5abd X-HE-Tag: 1698359627-853293 X-HE-Meta: U2FsdGVkX19Qwf+ZOXXaAmcuonUNGtCO1a7vQzb6zCxUtIMDlLiLfsiqipL9Rt/4cErUEqmDfGxI7inyUWknZB3bioNqA0VcLIEQY5rYhTiG6eCSvGXpqNUosh5ZSeiYdCVSFs0WJkqMBvSzqX5Vk+RKXLObuyG2l6/kT4jaJCmOpF1sJIytKjkWBGvIAbj5o0ZCQBux8e5onhKD5BEfutMwdFwDbKK9nHD3UWIk/APbsokKo0FageS5FD25ojsvSNUtYcxvrYCcQJ3HTaD8NOgIVwCeBxGa8qBl2qCcmahjglkYH1RpIHKpHj8Tb/vCSZR8voGpN1XwQ/6N2xm0NR/BckbzcW4SXE7Zjp/H5jBb84/70wd8sW6b5gZNqwGGXKkL4HFps/s5otVWhUfyVWF/SJ8XT0zw0nVqQwd+FKzxaaJA7QKQcNe7lFvV8WXFdqtpM7PK6LSzywOMpx23hbzJsq38AE44aCRkIt5gx/j+tCVjYcxDLdAEG6jueRHPTBI/40RSOAcSuqcqxOIkTEqQZsgI24qscfCUgO3xTwW8Ud4g0BYq8jLWoioQMUbYhhfj9mYpWwyPaDfZk4iJxS+rN0DDOjAK9GsXtPpZnQtJdVH+Xf3T6u10NtZi7YE7exSvG3C82wuoZWmwJa1RF7V7x92UoQG6MENrcM614rhlAjjGOiUqayvHQ0QL354rGzcjCfBHer8SJqZBcuy6pVGTciq/M6nUVY0Mt37G8kp0PmQ5SXzOyjgOU+QCuxZ6RpLgnsvQzViRXaTcqxvAQUM29nMtWRjXLcMemFT8qyek6OeeaO3/bDzt1coZb/0+0eCF26990HjSkrR/BbliYCyifYkXxffqyl04+BS/zID9gV1o3HIaEjlYtbCaJDpSMSJwpG2uDgmF6GbbCVdQXOMeMImLDYu5+JEYTj10p9qssCWfyDgFSbvL3D1NapaCFmLobeTWsd3rHJdtAtc pQcGapKc TPM+RKiFeKA7T/mj+VdhFRm8x65jSXPoWEo4iJ9rS98itpDz/6ZgWijp8xtHBN2kTNcmC3VUvyxxY/BFQuegiyIV03A== 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: List-Subscribe: List-Unsubscribe: From: Andrey Konovalov Commit "lib/stackdepot: allow users to evict stack traces" adds another user for depot_fetch_stack, which holds a write lock. Thus, we need to update the lockdep annotation. Signed-off-by: Andrey Konovalov --- lib/stackdepot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stackdepot.c b/lib/stackdepot.c index 3a8f045696fd..cf707ff32d7d 100644 --- a/lib/stackdepot.c +++ b/lib/stackdepot.c @@ -388,7 +388,7 @@ static struct stack_record *depot_fetch_stack(depot_stack_handle_t handle) size_t offset = parts.offset << DEPOT_STACK_ALIGN; struct stack_record *stack; - lockdep_assert_held_read(&pool_rwlock); + lockdep_assert_held(&pool_rwlock); if (parts.pool_index > pools_num) { WARN(1, "pool index %d out of bounds (%d) for stack id %08x\n",