Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3075387ybv; Sun, 9 Feb 2020 14:49:42 -0800 (PST) X-Google-Smtp-Source: APXvYqxPLp5gOKw7hg7wOcMLqZnSMg2DxEtwiJYDliOSm2SuyrPsRfRalbHKWBagU505c06nmb14 X-Received: by 2002:a9d:6446:: with SMTP id m6mr5304789otl.122.1581288582632; Sun, 09 Feb 2020 14:49:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581288582; cv=none; d=google.com; s=arc-20160816; b=uEhw0pfZz9/lVDVX/avI7x2tSzbXBohmV2xtRKZsgbkDX4CHFDEBqtKUF8yphVTeYM yZiT+1oPRmfRZAhDqt/XDL/08M/klw9jHMv54naptUKnEftkSG7yEGe6JFrE3JL5xKob 21LgjK9YtuSAMCBJQ0UFsppo2cAUKT3g3fC5UzYpB8ICwfSjxt04/03rvecOBaE2R84C 4kMNkFmhWY59+eQ7Fh6i4ncktgkzJJrk9V4uKMpGobNyIKlxgpqP6KVFlcqfj25aesg/ HYbtAV5gRAfpidD4NtzRm5y4LMRRNwbmyVKe4y3o5b/7ev4WCeL/P8eezdpSu1HyjQb1 Qhzg== 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=H5h8f3WgoxP68Q6jLjqnQAtMRjQkjB73Uemeu2QcLQ8=; b=DpCps16Ee4/p1Ys4ZxMHDOGY2mTdq3of+6aISJpDWPPWyXAFOGGfBFtNAYQ2JtSXZX R3aA9wgMCbuubAijEtu7CH8gvks4CvtbbwQYtayJkVocha+6rB0qEpT8mRAqqt5LNNMd AmdwP8Tro+ZQ80ZE0UPXLWxo0jDjSiJh9J6uDfUPFqKAT6WZJJoz5CVC6xWc2OzzuoCM /MCEH4c3vUux1SLG9M0ojB820eiXW6Sgn7NZByDZm12a5Sr6RDXqJIhSIEA7cRZDlXSM BKhShG7e1M64gBvHPJOJ+KZSomyRhzirew1e4BxIThfwenU75NFEGm+2gy5xw45YcWps N8mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EkGmaN7H; 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 a64si7623255oif.256.2020.02.09.14.49.30; Sun, 09 Feb 2020 14:49:42 -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=EkGmaN7H; 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 S1727143AbgBIWsT (ORCPT + 99 others); Sun, 9 Feb 2020 17:48:19 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37227 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726798AbgBIWsS (ORCPT ); Sun, 9 Feb 2020 17:48:18 -0500 Received: by mail-wr1-f68.google.com with SMTP id w15so5261160wru.4 for ; Sun, 09 Feb 2020 14:48:18 -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=H5h8f3WgoxP68Q6jLjqnQAtMRjQkjB73Uemeu2QcLQ8=; b=EkGmaN7Hdx2AlLEaPXhlhQGpfOEm+tHRBC/MIcGo5vf6FsWUktGo0FD0AviDcjdToY MbxjHvGKJSALR8264JXx5D9gmG8VvRL5LvPbc1wQKxK4TUE+lKnqXgaMCC1CoE0DF9v9 +guEHtFifFdPN9cRUFrwzo1IyNhnejLmnBCD5yDEKWcnhPOwjtgdbl9h/h+KIzDwXtwV Q3DSNJCoblTbQA4WGLzSthx6bhNzdpYNVCenOwUTwGOuX8t3wcLEsDKp26RzjZlcJmLH iVIePJDgrWXk3IeRfB0ZvskyL3Pmfcli/ZUAGXBRvkmhrkG/q7EOO4VE8YSkTrTQ6aku t+Ig== 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=H5h8f3WgoxP68Q6jLjqnQAtMRjQkjB73Uemeu2QcLQ8=; b=R9mp9V9czmT0pYE8oAT3FOkqEWSegFXY+Aq3nIFngYGGSlX77D7vHKaJrQ4oYd5Vu4 mUAUImkeuPM2665buajUZXAOruuVYyr2ibMqCdlxDBTWbvuAq6v1TKmhIBWxxF6/9Sfu JdI7WzRkgOrRoAr4lx2Fz3l3hOJxiTvSl2UqqK0KzEwBqN4iR3l18LcfvFN245EGmPqY ti8GaQ4hI7ltyFFj6RsE28JJFrcKgA78Y+fCf71wElTneWFg8onmgA1WQb5UNl38XtZi 9DGJ1sItwd99W+WocA5ss1ATyi6IGChIFF45tv60bMHfs/4v7oyAcn2XbFpd24jlgvW4 vCrg== X-Gm-Message-State: APjAAAWl418ue0gPwXfT7ImdSU+0VCj9q8BgbrTV97fzwqgxdb/+NcZe E88qWZ4PtcNMe6AmtU8lNg== X-Received: by 2002:a5d:494f:: with SMTP id r15mr13257456wrs.143.1581288497124; Sun, 09 Feb 2020 14:48:17 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id p15sm12708938wma.40.2020.02.09.14.48.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Feb 2020 14:48:16 -0800 (PST) From: Jules Irenge To: boqun.feng@gmail.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com, akpm@linux-foundation.org, dvyukov@google.com, glider@google.com, aryabinin@virtuozzo.com, Jules Irenge Subject: [PATCH 09/11] kasan: add missing annotation for start_report() Date: Sun, 9 Feb 2020 22:48:07 +0000 Message-Id: <1eca01a2537e0500f4f31c335edfecf0a10bd294.1581282103.git.jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: References: <0/11> 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 a warning at start_report() warning: context imbalance in start_report() - wrong count at exit The root cause is a missing annotation at start_report() Add the missing annotation __acquires(&report_lock) Signed-off-by: Jules Irenge --- mm/kasan/report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/kasan/report.c b/mm/kasan/report.c index 5ef9f24f566b..5451624c4e09 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -77,7 +77,7 @@ static void print_error_description(struct kasan_access_info *info) static DEFINE_SPINLOCK(report_lock); -static void start_report(unsigned long *flags) +static void start_report(unsigned long *flags) __acquires(&report_lock) { /* * Make sure we don't end up in loop. -- 2.24.1