Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2167157ybv; Fri, 14 Feb 2020 12:50:39 -0800 (PST) X-Google-Smtp-Source: APXvYqxGJpFs2D3af6jWIGJaGrpE/84EGN6ECCXOcmEyNDWwNYXUKqyaVmOUGuKLCQjASUeTaraX X-Received: by 2002:a9d:116:: with SMTP id 22mr3522763otu.149.1581713439179; Fri, 14 Feb 2020 12:50:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581713439; cv=none; d=google.com; s=arc-20160816; b=0SD709BxhuqbH4oDI+zi9PaoougV6b42pP3koBkYTBWwEUUC8z3KDdBL1+LBaHxhZT M7fGCU8VJkc1KlvhMJbTLqPFu2MWnxwwCHccmQzrYw4oq/9XeHwH/3MA/eXb7i/1EApT g8fPwkenqkadIsOMpZXZoseCM9bod032DYcl5BtnPf6JnlJHYSWhwBBtUji/m7GVC+a7 YxY0CHQhOSAkFNABnGprDLHYJ2vbJhxwacicrXzF3sMm0EZKphX3s9X7o+RGbOjj9pWa rGjqoy24dNQ6EaDKWsOsGz7OVpteU/ZekUAGyLq3laPxDyuG9arLow0iwdg/aeG/cZSp q+Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zGVQl5tfhTgXtZcPGr0AgAgQcAWmtrINLrUVSPJZyMM=; b=Ub58XnNOkERmhRItq0n883cDPpNe5R6EytJCzIUQWuGRtT0kX6YoJ0Oi7fYTvMMtAU mwMSFM6DbwjY1LmRUtarCUBbyDcvgSe0tocml7B8abEP/iAQkqjdVNwGkh86AtVwcY5g V498HNoKmzPs8ipvuGxpl6M3aaFtXpJd4OwrMfbIfuAc8hQJ/NTy6WX1SB+Tf6IH8EkP LIurZe1Uo1SHeh7dXYxF5JUlkGy8OHH0KDTBMJfPCCLbMPkI+OYqfxekiZHTs3t/z1N6 MMOaErtPfJF0Ic0ZTnlgXPCDlH4HWyisK1suzevVsroKo1+vLHrZ3Qy9xL+1Ky3De2Ow tuHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XlgwllhO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3si3310261oih.186.2020.02.14.12.50.27; Fri, 14 Feb 2020 12:50:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XlgwllhO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388675AbgBNUs6 (ORCPT + 99 others); Fri, 14 Feb 2020 15:48:58 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34625 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388369AbgBNUsv (ORCPT ); Fri, 14 Feb 2020 15:48:51 -0500 Received: by mail-wr1-f68.google.com with SMTP id n10so10519986wrm.1 for ; Fri, 14 Feb 2020 12:48:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zGVQl5tfhTgXtZcPGr0AgAgQcAWmtrINLrUVSPJZyMM=; b=XlgwllhOKgfzsr9S3lg1Ff1Wd7uyV74DxaYnxsTNNvOrV5deKNYHp+Cvx6C7idGDmS DG6hQlVKZSy5QI6PWgaZuo/ptdri2lO7Fa2VmEh7Hkst04+zyjvdZaoq+MHy8Qy/eguM f238TfG4UVpMk397bZ3Mh4bY/6r6YCRFA4zDE7E5eT6PU5mUF5iNbKCUgT30MgJwbPFS D+wouZLWmm30eehaMnaPP54fPZCN7KHGbK1fxwlAEbp6p1rk0JAlCvuu4daMVmEhpver bBtZmb6tF+1OyAssHqL+foYdcJf3LcCbvMBTj+45YIX5hDWPoqD2ETjAGgUfxWrH4qcS eu7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zGVQl5tfhTgXtZcPGr0AgAgQcAWmtrINLrUVSPJZyMM=; b=eMekI8rv0nt2xArdNPw2TOmri/F1hSoZ7z/kCTOUmwxDUR12JmAzxnjAjoZSrc9qXj MTwk6P55uwmALRMdLe8mgzukVPbC5MUZ5OJwrU5QfYvqIAG02JI6saQCN/wFwScR47HU +xcXws1wlOYsRTMJ2IKlahScgEn+To64zNVJ0J73PwogEE9jfmDvrQ4GHhvljKhTsMoj G5P5nkKcyCs6SPotKtMQXdbh4b1+dLqUFEN/MXXzPwaP+Oevb+gx4IUUHVNkwn18HMya qs8j5qleBiV/1H01zDNRtwofza1IvVvc8yhMfxysQOUQDzl1BKBCFBiOVsJDJnPr0pu8 X11Q== X-Gm-Message-State: APjAAAXOICp+hZevKfJg/pRbWAy5dlskrpWG3tFPTepbeQPnyEf9HWAk eDmnVmG9Lq7Oe7g2QTEsJ/XYfspaYG0g X-Received: by 2002:adf:ed0c:: with SMTP id a12mr5804592wro.368.1581713329510; Fri, 14 Feb 2020 12:48:49 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id y12sm8660782wmj.6.2020.02.14.12.48.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2020 12:48:49 -0800 (PST) From: Jules Irenge To: linux-kernel@vger.kernel.org Cc: boqun.feng@gmail.com, Jules Irenge , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)), xen-devel@lists.xenproject.org (moderated list:XEN HYPERVISOR INTERFACE) Subject: [PATCH 14/30] x86/xen: Add missing annotation for xen_pte_lock() Date: Fri, 14 Feb 2020 20:47:25 +0000 Message-Id: <20200214204741.94112-15-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200214204741.94112-1-jbi.octave@gmail.com> References: <0/30> <20200214204741.94112-1-jbi.octave@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse reports warning at xen_pte_lock() warning: context imbalance in xen_pte_lock() - wrong count at exit The root cause is the missing annotation at xen_pte_lock() Add the missing __acquires(ptl) annotation Signed-off-by: Jules Irenge --- arch/x86/xen/mmu_pv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c index bbba8b17829a..352f0c80cfcf 100644 --- a/arch/x86/xen/mmu_pv.c +++ b/arch/x86/xen/mmu_pv.c @@ -695,6 +695,7 @@ static int xen_pgd_walk(struct mm_struct *mm, /* If we're using split pte locks, then take the page's lock and return a pointer to it. Otherwise return NULL. */ static spinlock_t *xen_pte_lock(struct page *page, struct mm_struct *mm) + __acquires(ptl) { spinlock_t *ptl = NULL; -- 2.24.1