Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3437702ybv; Sun, 9 Feb 2020 23:28:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyYIZfTbIl5WPO+X4d6KD7RvEwZ3L8exJjOET7d4CzGcAPNQoGrJkMLr9VG7UBacD0mcmkw X-Received: by 2002:a9d:6289:: with SMTP id x9mr128074otk.8.1581319703200; Sun, 09 Feb 2020 23:28:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581319703; cv=none; d=google.com; s=arc-20160816; b=obz1Ta1zBFI3WHLnu8nMbRW2cZIXkAUl3SDi0HnPhbMhrbOkruUkOEM+RM0z58H4up bF7TWws78MvL4YUZVAyIa6IGK67ypqJ4YArZJgY7I5rpuzILYXXH5Io4MtbylVZwW+aK ZPiEbCK8uZ/gxatYVNOGyLHvYB+iZiABUpoUlIF/cTeqagpcTqAUca38s3MsnZMT4TI4 zrNB0FLN3zxhTqToUfG4IUIpe/qop3+Ph0/syK1zvmxuDBeFt8M+BMq+KicFayLU5S5l 2aqfoIxdwBg7m6cOFVfxVW/pkwqetlGdpluWkMdvLDNbvdmy2rE5T0pNY6fbrHKhY/RX Bnsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=hzcZT/UWGik4t5gs1NKn0cClPiT0b3AGqVBvPjLWL6E=; b=bT7Z2zNRaWnFkNczZL3L62CDHvpACXtlYiRXxquenqslBs8IzwiAoCSzryRNzGjzMY qIhFlQUlDENquVB/Q5NS02ILDDnpTbj9BHkCjeHAcHWdNdtPLnfzCV20PILrUUa92+Jf NZx//xkIcihbOMdlrQANcHcke4lEZeyCrHv8+8ZC7HE6A6fScBkbI5VgQ3Eu8mGmuyAv fwBQ0yw5WyNhxbFlWLPzsqrG1eaTJFR9wSxetaeIMGiZIQ8/8bPDX/deLhlPMZlHEE2G rHvmrRW5BuCQfM6j0Gvx9axHIXkkotyYdqLF2dhpyLK7lAK47bLEFSHk0tG0uR/j6Q9W IdKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Qdfc8f2F; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3si4229778otc.272.2020.02.09.23.28.11; Sun, 09 Feb 2020 23:28:23 -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=@google.com header.s=20161025 header.b=Qdfc8f2F; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727437AbgBJH1f (ORCPT + 99 others); Mon, 10 Feb 2020 02:27:35 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:33536 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726061AbgBJH1f (ORCPT ); Mon, 10 Feb 2020 02:27:35 -0500 Received: by mail-qk1-f194.google.com with SMTP id h4so5615370qkm.0 for ; Sun, 09 Feb 2020 23:27:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hzcZT/UWGik4t5gs1NKn0cClPiT0b3AGqVBvPjLWL6E=; b=Qdfc8f2FzV1RpB9MRVV1aynBc0H4QOGQa7h+tsu2mHtMP2jgv8n9U3W99cY4YIRUY8 KMfy1kcCCz46qL9KpDceFaN7MqeY2EzD91XBoxUOUT3pn1mp6gyahfqiu9l/3N1occ10 8yZgNjwyWTfCHVpIHIKd/kS8xQmCPfdoz3SwIqhtQzwPiFu/4WJozEf8ZNEgdW+Ab7Ri 2+4ZeToxtMvOoguvLIkHGh67Cws1wsv+FDNKcfgAcRUuS7N4tilt+mSmlMs1vPkZkJ5m 87mUdeqCAI3/Ic0J8EfS7p1e6ddEwNW6tPiSNND0e28k96CxJto9l4vpW4kS2VYgLS2b ZWZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hzcZT/UWGik4t5gs1NKn0cClPiT0b3AGqVBvPjLWL6E=; b=HvrUkzqzVXDZlA7yuIPX1IfQXP5mD4nJ7BEN+cuc3o1lUdBKG6QdONDbv2/HLiRWrL 2JmGsiJbTPuX17WY1l7Mg16owjk+nbixxWAr2y7nURBTCX5wWUOgvV0SMTPgpz/8t6er SQYMFgWGDfix0yuSv1fVLBBOqcP77sE1233v9VU5n2QT+k8CfMiA2cFje7GJI0teRehj OHhlALB/PzOd0sHXbzq0XMhBpcBO9g/V9bpYZgBs7BeO7WhSSvG982zzAtUmPkEk+0AT fmOGzzMcFdwmw51vmJAEnJQHhFgaxbGZSIpbpOaDY4J7ameBxXtwvb6Ta7PEFWGF+83K vn1Q== X-Gm-Message-State: APjAAAXvApMyzQZZLjwPglw/A9xWSB9sJigBqRP3SgWEyWhfF/Etae/s mx2dvia3kLWuWkVz/uShZFNQOylUIaXxTv+LfvK8Pw== X-Received: by 2002:a37:e30f:: with SMTP id y15mr180681qki.8.1581319653847; Sun, 09 Feb 2020 23:27:33 -0800 (PST) MIME-Version: 1.0 References: <38efa7c3a66dd686be64d149e198f2fddc3e7383.1581282103.git.jbi.octave@gmail.com> In-Reply-To: <38efa7c3a66dd686be64d149e198f2fddc3e7383.1581282103.git.jbi.octave@gmail.com> From: Dmitry Vyukov Date: Mon, 10 Feb 2020 08:27:22 +0100 Message-ID: Subject: Re: [PATCH 10/11] kasan: add missing annotation for end_report() To: Jules Irenge Cc: Boqun Feng , LKML , Linux-MM , kasan-dev , Andrew Morton , Alexander Potapenko , Andrey Ryabinin Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 9, 2020 at 11:49 PM Jules Irenge wrote: > > Sparse reports a warning at end_report() > > warning: context imbalance in end_report() - unexpected lock > > The root cause is a missing annotation at end_report() > > Add the missing annotation __releases(&report_lock) > > Signed-off-by: Jules Irenge Acked-by: Dmitry Vyukov > --- > 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 5451624c4e09..8adaa4eaee31 100644 > --- a/mm/kasan/report.c > +++ b/mm/kasan/report.c > @@ -87,7 +87,7 @@ static void start_report(unsigned long *flags) __acquires(&report_lock) > pr_err("==================================================================\n"); > } > > -static void end_report(unsigned long *flags) > +static void end_report(unsigned long *flags) __releases(&report_lock) > { > pr_err("==================================================================\n"); > add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE); > -- > 2.24.1 >