Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp81145pxb; Mon, 13 Sep 2021 13:30:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBFF0TuarMOaxajpJ9B5hMCfXjyvbpp/QnkrjKEvpaxKRwy15o0pn5oaTbwYHk1jjAXvwz X-Received: by 2002:a05:6e02:eb2:: with SMTP id u18mr9687615ilj.138.1631565040608; Mon, 13 Sep 2021 13:30:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631565040; cv=none; d=google.com; s=arc-20160816; b=ckpsxhQAWV8gCCXo5IxdCF+OjnfXbMpHUUVdDXGhn5Eu5obxG+Y9iZNm9990cylExL F0ouRrO5lRRXOUD+/oyAYidgaDeDQdFYh1wHi5AzRlH1fWd/K5EibgOhGPe9JT03za0p C1jd/sHkqOkC/KcCRnhl/sE6ZVqBCUuucal6TLDvV6podnmkvbDtd/HcqbZgi5e180J4 rEJhn8eVD8O1XS0VRO5FQjfAHweh3Wq+1dl1Iw6VqW+p7ikZbuoq1ijHUgY25yLbBs+b 8DeXTPNBQokGEHap39xDQ1jNsJkC8U2+FHj/hx+ayYfCg6g3Ltne2a+KjKcU1ezIZyPL qVPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JKx2STGbZIr0i7fFZq2IiKxoXa28GSO1M+VsyllagSc=; b=e3jkzbZKsJ87HFJtoblI6V0Nje2hQ0KE1p5RNKE9sT2jpR90NQbvQMu5ncnlEyYbi4 2SxSXBjfDNijla6MJ4VmhGeTnR2D0eS2YUmQiZ34qq6O7hc5EpcfH6i5+Owty7WR6dk3 /Cfr4W2E5SiCmPhuplc/bR/fB7sZKFAoc1LGLx2akOcjDmu3F7I6OFYNhaPGRs9R3l32 wVsDOqNxPnGFIFtsvjfH+qZSOV/p1FbJOeqx9RRamS4toXFxYMYNc7cqRZxv3FnHYsB2 sLn25kCBi0hmmj08+PjqagUwcLZr5CaNY4IPzlbE216ID3+8m5CvacAFLOWfnWnmAZmf w2hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bq2FOwqk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f18si7041429iox.32.2021.09.13.13.30.23; Mon, 13 Sep 2021 13:30:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bq2FOwqk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243335AbhIMNfd (ORCPT + 99 others); Mon, 13 Sep 2021 09:35:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:58418 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241170AbhIMNa5 (ORCPT ); Mon, 13 Sep 2021 09:30:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6B4936121D; Mon, 13 Sep 2021 13:25:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539507; bh=Powk3zdHPssuy5WoTf+6drC8w4XJWsM0Ck6Exx6sqd8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bq2FOwqk7cKSUBQCtFZi/WYzuTqBdmEjlDvp0Fgx8I/XVDpgqPEqs7Rubmso7Re74 dK6ar3HkUnhwbfboQsRXiVSI2/hZUPKKhr6S17LMlMQTy+XikkICr6FVEociF1eVDj oH/ka405v7uuHc3cSue6U+rxTD+/rL/24hEmbC68= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhen Lei , Thomas Gleixner , Sasha Levin Subject: [PATCH 5.10 051/236] genirq/timings: Fix error return code in irq_timings_test_irqs() Date: Mon, 13 Sep 2021 15:12:36 +0200 Message-Id: <20210913131102.093342118@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhen Lei [ Upstream commit 290fdc4b7ef14e33d0e30058042b0e9bfd02b89b ] Return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: f52da98d900e ("genirq/timings: Add selftest for irqs circular buffer") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210811093333.2376-1-thunder.leizhen@huawei.com Signed-off-by: Sasha Levin --- kernel/irq/timings.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/irq/timings.c b/kernel/irq/timings.c index 6990490fa67b..1f981162648a 100644 --- a/kernel/irq/timings.c +++ b/kernel/irq/timings.c @@ -799,12 +799,14 @@ static int __init irq_timings_test_irqs(struct timings_intervals *ti) __irq_timings_store(irq, irqs, ti->intervals[i]); if (irqs->circ_timings[i & IRQ_TIMINGS_MASK] != index) { + ret = -EBADSLT; pr_err("Failed to store in the circular buffer\n"); goto out; } } if (irqs->count != ti->count) { + ret = -ERANGE; pr_err("Count differs\n"); goto out; } -- 2.30.2