Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp543517lqb; Fri, 24 May 2024 06:26:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUw5NrGnEeS2hhHvhcgIJVLBzlaSRdGr4d+4sl8PT1t4QiXW1TxX2oW8glASQU8gNZDbr0bfQC8rKYeCcW0kgaYWMeTjLCitM6Ks4GRLg== X-Google-Smtp-Source: AGHT+IEN+E72C2esn9ypWp2EQvCBK3HdNVvue2LTJ/5z4hxBsOLML/FWT9uiZ5qzb05VrT9U137R X-Received: by 2002:a17:906:b257:b0:a59:9eab:162b with SMTP id a640c23a62f3a-a62646d57c8mr149177766b.35.1716557197142; Fri, 24 May 2024 06:26:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716557197; cv=pass; d=google.com; s=arc-20160816; b=EcaGrSONlygj94RV5TTiStZGw+omHrelfeiaVknfCpKg/cMaOmpr8tPewst3iICHGZ hZIVek7yqoj+R5rsN6I7ZC9Pxwz0y6q5J3GhUmTmRAK1FdCznoazs0fEdMg6tzljJZOH KfQfTtkdjPg3X3qo8CEMlVj9mEDlylBhKhnkhNmhBflAvDEXm6KRu1TUwXW0VGf/sxTf CB09IphNq4DftS/D6IHY2iKDvrwC0VGGKz5WBtKLrzlXgviZwAcDv2dHjn2FKfjE429W H9FHBVJMaJ8g4YraqU478tJUig6lpU7tR1M+mV1VRYj6/0Y0ZVbRqjs1IwXxJ5wCRExi sF6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=ztNZjVrOnuWUNrK2fiBYv2nIYmINlw9gIlj+emOP/C8=; fh=xUOF3wR3RlisskPAxFD54s1BqCn+NDkOLFXFVZZgxyE=; b=ZOCQOo+hdUiJfFx5crwIG+FB/eN1YiDOZvsSTh90B37r7jaV7dj/oMI265YlErrJZF rZVDrMKDGRrEShVPCc2UId89Y3BAnERAQjXok5w9E2d+Du6KuBFmHeh9mbJgrZpSu7Ac zwj9sYbXLUyTk8xfUmaUU6lJNCYS51D1q411WqYRYSakUffff/ZAJcjnK8mVNAyxPuMS 8wp3Ex8rM1n0w2Y0E9JCGug3sXnHXmNXyTok20RaMSg1e8KuEIvQqx0wjlEm3bqY8iVD MtxRrrgxsTG9DmbMPI2FD8o1wPpfB8In0yJFjzPXQFJ5vPmi9cZaPJzUSImDMYQwPj7i g7OA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=i-love.sakura.ne.jp); spf=pass (google.com: domain of linux-kernel+bounces-188739-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188739-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a626c80106esi81529066b.40.2024.05.24.06.26.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 06:26:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-188739-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=i-love.sakura.ne.jp); spf=pass (google.com: domain of linux-kernel+bounces-188739-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188739-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id DB89B1F218E7 for ; Fri, 24 May 2024 13:26:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7EC0012BF2E; Fri, 24 May 2024 13:26:31 +0000 (UTC) Received: from www262.sakura.ne.jp (www262.sakura.ne.jp [202.181.97.72]) (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 6C92912BF23 for ; Fri, 24 May 2024 13:26:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.181.97.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716557191; cv=none; b=afOH2OK391E2pnYjlHcIQ2SsYyLmhFHITtAC5MgbscMr5gIC3LdoyQwNREtNkY+/LbPbieV4+OFUAVtH1PdhOjUmTDtn/Sf/H8uwhlac46dTe8ykfnOmnh66d7df9zbnh6S6at1L9PhVmrmmateBV9IBfl7FPjeWwRfpG3RUsHg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716557191; c=relaxed/simple; bh=H5tHz0jKPpcZpnZvnj7YDbFMUGOnlmjXfNjc3sqhg0U=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=N+W31k4mb4uzejFB/BWXJISOBR7/NBGTc0718+NV5a0N+kMd+CSMoPJKFsTtAkGVTHNfQHEetoxjGghaGZ590apReLK78X2xY/cwPVX7g7DZnYYQpucVpd5vsl8HkfzOkWZeR6JbzzFmQzX8pC6ISJOEbyIuxPBpnNhjo/bx+pg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=I-love.SAKURA.ne.jp; spf=pass smtp.mailfrom=I-love.SAKURA.ne.jp; arc=none smtp.client-ip=202.181.97.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=I-love.SAKURA.ne.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=I-love.SAKURA.ne.jp Received: from fsav313.sakura.ne.jp (fsav313.sakura.ne.jp [153.120.85.144]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 44ODQKlS037943; Fri, 24 May 2024 22:26:20 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav313.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav313.sakura.ne.jp); Fri, 24 May 2024 22:26:20 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav313.sakura.ne.jp) Received: from [192.168.1.6] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 44ODQJtV037935 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Fri, 24 May 2024 22:26:19 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Message-ID: <0204a827-ca88-4cb6-839b-f4a637bcbf71@I-love.SAKURA.ne.jp> Date: Fri, 24 May 2024 22:26:20 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Linaro-mm-sig] [PATCH] dma-buf/sw-sync: don't enable IRQ from sync_print_obj() To: =?UTF-8?Q?Christian_K=C3=B6nig?= , syzbot , syzkaller-bugs@googlegroups.com, Sumit Semwal , Gustavo Padovan , Christian Konig , Sean Paul , Chris Wilson Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org References: <0000000000000946190610bf7bd5@google.com> <8980975d-87db-4d57-9e23-4fb7fbb62e7d@gmail.com> Content-Language: en-US From: Tetsuo Handa In-Reply-To: <8980975d-87db-4d57-9e23-4fb7fbb62e7d@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 2024/05/07 22:09, Christian König wrote: > Am 05.05.24 um 16:08 schrieb Tetsuo Handa: >> Since commit a6aa8fca4d79 ("dma-buf/sw-sync: Reduce irqsave/irqrestore from >> known context") by error replaced spin_unlock_irqrestore() with >> spin_unlock_irq() for both sync_debugfs_show() and sync_print_obj() despite >> sync_print_obj() is called from sync_debugfs_show(), lockdep complains >> inconsistent lock state warning. >> >> Use plain spin_{lock,unlock}() for sync_print_obj(), for >> sync_debugfs_show() is already using spin_{lock,unlock}_irq(). >> >> Reported-by: syzbot >> Closes: https://syzkaller.appspot.com/bug?extid=a225ee3df7e7f9372dbe >> Fixes: a6aa8fca4d79 ("dma-buf/sw-sync: Reduce irqsave/irqrestore from known context") >> Signed-off-by: Tetsuo Handa > > Reviewed-by: Christian König Thank you. Who can take this patch? > >> --- >>   drivers/dma-buf/sync_debug.c | 4 ++-- >>   1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/dma-buf/sync_debug.c b/drivers/dma-buf/sync_debug.c >> index 101394f16930..237bce21d1e7 100644 >> --- a/drivers/dma-buf/sync_debug.c >> +++ b/drivers/dma-buf/sync_debug.c >> @@ -110,12 +110,12 @@ static void sync_print_obj(struct seq_file *s, struct sync_timeline *obj) >>         seq_printf(s, "%s: %d\n", obj->name, obj->value); >>   -    spin_lock_irq(&obj->lock); >> +    spin_lock(&obj->lock); /* Caller already disabled IRQ. */ >>       list_for_each(pos, &obj->pt_list) { >>           struct sync_pt *pt = container_of(pos, struct sync_pt, link); >>           sync_print_fence(s, &pt->base, false); >>       } >> -    spin_unlock_irq(&obj->lock); >> +    spin_unlock(&obj->lock); >>   } >>     static void sync_print_sync_file(struct seq_file *s, >