Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp81209lqj; Wed, 10 Apr 2024 04:54:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXpPDDO7ncHAdyks1F/G04LIC+vpHeO5m4hBPpxPFDpzHMS+9mN7WdD5UFB875dyhSE+zgTIXN2BQZFmcXRocqm/67Hk+LnHS/BvWr4Hg== X-Google-Smtp-Source: AGHT+IFcR3lTheefPEOYZRFpFoFiN3cUYmLpb7ybBULPQcg+oeoRLkbTJ09WPLc/oGqIQu5xDQuS X-Received: by 2002:ac2:4da5:0:b0:516:9f03:6a92 with SMTP id h5-20020ac24da5000000b005169f036a92mr1752646lfe.43.1712750069462; Wed, 10 Apr 2024 04:54:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712750069; cv=pass; d=google.com; s=arc-20160816; b=RHFuaN6NtDkgtWBANskvWo/t1dkil+lkpXhuU8GnypM62YtHI7/x4xK0HLgF5/mLmW TwR6qDG/EV/IfTXDCMIbKb9ZuEct2XOsGkCrU9eC758hqFqprqRjR5hTS18lphEWg5Bg irINpsJCcU6uwmwW9dS33c8sPlOwSmySf2QX+w+NYAOiQJ2qMUmiIL8jIqRW2KosMCYC xULwdZHyXVAvQQ0nVZ7Amyy7TGbnROXxXY8mP0ji5Oa3dw38z4ueTgo+fbF1nxX/MP41 r82O6UR6L35I64bUVMQbotecooCxMnjektaMyPEpvxp7A/iPktUtnsaIcl9UBYkuGPRu YD0g== 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:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=WJUH5RzBi6ThGn7KLoC7JkfiYKeYqyZ7xZhKdtRWAfI=; fh=+S7Z5Rj5dBCkcDJY57qh8shXS7tSoRdIO+1FA8dXYrg=; b=r48EYwuv1xH2zBl/sD3g1kt4IXszA7iKuTtadRZaxJZGcJMDR/11G12yl9tzYSY8I9 j8nVjd96/cGubVuBqP002uNofrwaZ+vNYIrZk88yT3bk+BEXyYi91h3ef7ihC6hQo2OH 0dx8WYof1QVcO9g0KeHDVm2bpzFonm1/GzWzLp68qcNWUEaw80ZRkqdG42AVIx8U4ysF xbROgKAadFgBdujiy+lUuOUYrHn14lW/Z0ep7OsPrJtWyp3WiupfOuTBh2BwNIZmbCZH loPVlwoJXRIFhTlTANcE1Omzee7yiSUnMo/Rvm7boiti4+WXLk4Xskly9oFlUOMOqxK3 Xlhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@t-argos.ru header.s=mail header.b=RQliOMsu; arc=pass (i=1 spf=pass spfdomain=t-argos.ru dkim=pass dkdomain=t-argos.ru dmarc=pass fromdomain=t-argos.ru); spf=pass (google.com: domain of linux-kernel+bounces-138452-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138452-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=t-argos.ru Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z22-20020a170906715600b00a51ace5e988si5433826ejj.875.2024.04.10.04.54.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 04:54:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138452-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@t-argos.ru header.s=mail header.b=RQliOMsu; arc=pass (i=1 spf=pass spfdomain=t-argos.ru dkim=pass dkdomain=t-argos.ru dmarc=pass fromdomain=t-argos.ru); spf=pass (google.com: domain of linux-kernel+bounces-138452-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138452-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=t-argos.ru 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 218B31F21B17 for ; Wed, 10 Apr 2024 11:54:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3936015B563; Wed, 10 Apr 2024 11:53:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=t-argos.ru header.i=@t-argos.ru header.b="RQliOMsu" Received: from mx1.t-argos.ru (mx1.t-argos.ru [109.73.34.58]) (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 8790C159909; Wed, 10 Apr 2024 11:53:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=109.73.34.58 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712749989; cv=none; b=tMxe1UZtoRCPsvm8lJX8aO/E7IGBxOOa0LVeWHQtUlRrkhJvNk8PcS/6GrGFITaNRcwZTwMCSbH1/nUEVNotxExYDsqVOZbmmNoI+5EI+IF+wWhmbndderTmnj4V1x8qMqnSb7c3udeKUUWA4IjwZNKAEsPLaRz85cwDbFwSN8I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712749989; c=relaxed/simple; bh=N84XgSg1KHPNSkXpmcgoVPYP9AWL9ZJCU/gwTzWn3Bo=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=lOB6iQQdicq6FnHF8kRyH4tVrIp/aUpV7VJoXc3hlFHBEzZDBj5XvEtq3XSbVxgc1NnJGwzXpOHz7gktqYMJnvimkt3oghoudJXE84U+dvsA4QO2klH1x0AxIQ/wvb9ggRj4i0F7qpelBWAFYiginfxEuf9m8vYCxciHWxUTjYk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=t-argos.ru; spf=pass smtp.mailfrom=t-argos.ru; dkim=pass (2048-bit key) header.d=t-argos.ru header.i=@t-argos.ru header.b=RQliOMsu; arc=none smtp.client-ip=109.73.34.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=t-argos.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=t-argos.ru Received: from mx1.t-argos.ru (localhost [127.0.0.1]) by mx1.t-argos.ru (Postfix) with ESMTP id EE41D100002; Wed, 10 Apr 2024 14:52:47 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=t-argos.ru; s=mail; t=1712749968; bh=WJUH5RzBi6ThGn7KLoC7JkfiYKeYqyZ7xZhKdtRWAfI=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; b=RQliOMsu1CsL31rk+zQjPobaWvn+7OwssPGXLDAJ+1nrXH73GfJMiDa40pyBFnRgX VxOKnIToEshOUVnEKsNPRAp0Mn3NshZS8btJeySsDzHwq/aB/9qbr7GnBmnxg0BE8x kFiKKS5PAoSbjPpqGWmO0wU1NPII/F6aIJK1glUeZXWXb/9OeBjYjD8RgcjUlk5bJA poHWEuPxI90WUuhK1z7Sk987Qw5HhcY84iVNmX1gpBQimVp6jV+OUlAB34cQ8mNCyV 1KFcLby75BVoh6OUZQjHDgTMwrkLcMW+xdSf3dOTjKLpuaX5tw3C9VCtZVRUixszSN yjJxeVhcGyngQ== Received: from mx1.t-argos.ru.ru (mail.t-argos.ru [172.17.13.212]) by mx1.t-argos.ru (Postfix) with ESMTP; Wed, 10 Apr 2024 14:51:29 +0300 (MSK) Received: from [172.17.214.6] (172.17.214.6) by ta-mail-02 (172.17.13.212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 10 Apr 2024 14:51:09 +0300 Message-ID: <2b06e6b2-6fa0-48fa-800b-7aad6735daa6@t-argos.ru> Date: Wed, 10 Apr 2024 14:48:41 +0300 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: [PATCH] drm/msm/dpu: Add callback function pointer check before its call Content-Language: ru To: Dmitry Baryshkov CC: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter , Neil Armstrong , Stephen Boyd , , , , , References: <20240408085523.12231-1-amishin@t-argos.ru> From: Aleksandr Mishin In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: ta-mail-02.ta.t-argos.ru (172.17.13.212) To ta-mail-02 (172.17.13.212) X-KSMG-Rule-ID: 1 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 184651 [Apr 10 2024] X-KSMG-AntiSpam-Version: 6.1.0.4 X-KSMG-AntiSpam-Envelope-From: amishin@t-argos.ru X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 16 0.3.16 6e64c33514fcbd07e515710c86ba61de7f56194e, {Tracking_uf_ne_domains}, {Tracking_from_domain_doesnt_match_to}, t-argos.ru:7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2;mx1.t-argos.ru.ru:7.1.1;git.kernel.org:7.1.1, FromAlignment: s X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean, bases: 2024/04/10 07:25:00 X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2024/04/10 08:25:00 #24735279 X-KSMG-AntiVirus-Status: Clean, skipped On 08.04.2024 12:03, Dmitry Baryshkov wrote: > On Mon, 8 Apr 2024 at 11:57, Aleksandr Mishin wrote: >> >> In dpu_core_irq_callback_handler() callback function pointer is compared to NULL, >> but then callback function is unconditionally called by this pointer. >> Fix this bug by adding conditional return. >> >> Found by Linux Verification Center (linuxtesting.org) with SVACE. > > This should be converted to a proper Reported-by: trailer. > It is an established practice for our project, you can find 700+ applied patches with similar line: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?qt=grep&q=linuxtesting.org >> >> Fixes: c929ac60b3ed ("drm/msm/dpu: allow just single IRQ callback") >> Signed-off-by: Aleksandr Mishin >> --- >> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c >> index 946dd0135dff..03a16fbd4c99 100644 >> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c >> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c >> @@ -223,9 +223,11 @@ static void dpu_core_irq_callback_handler(struct dpu_kms *dpu_kms, unsigned int >> >> VERB("IRQ=[%d, %d]\n", DPU_IRQ_REG(irq_idx), DPU_IRQ_BIT(irq_idx)); >> >> - if (!irq_entry->cb) >> + if (!irq_entry->cb) { >> DRM_ERROR("no registered cb, IRQ=[%d, %d]\n", >> DPU_IRQ_REG(irq_idx), DPU_IRQ_BIT(irq_idx)); >> + return; >> + } >> >> atomic_inc(&irq_entry->count); >> >> -- >> 2.30.2 >> >> > > -- Kind regards Aleksandr