Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1327134pxb; Fri, 10 Sep 2021 03:29:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCOiiCQs9a20wK4SPBtxYNo5qw1xLxWsfBbnrDNtIGtmfBtdipbX+fv1WiFwHbKJIwv4sJ X-Received: by 2002:a02:708f:: with SMTP id f137mr3906265jac.68.1631269750491; Fri, 10 Sep 2021 03:29:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631269750; cv=none; d=google.com; s=arc-20160816; b=gILE0XTT6iOofSkztKbAFsnqFCXEVys+bo6jWxMu8mfMSVELl7cpOcBPLD92li7EcB NfIQhrBR5wkN9MYm7aYED3kHbTDSu3kXjBqgX4d8v86/6rS8ruh3EWBWiIkJPQXZc8lP qNuZwUv2D7X2nm90dAk1LKQcm+tgFFBOvHqsRBM40OLHol9y7lwLmUWrxMzInou86tTI QrOs7/cD3/1OsHrdrpv/d56QTW3kGwjDUSX6E1mXrjTnArvHAclJysgH+vNGMIduZOAd Ik3Gn0eXSVnjnah0Qg1xwE2uvAQF3DNxLcWw2F6/bGWuSPKVZ5NdtwN27sv41Oj53ofc eqAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=VR6zh69FzEs75hbhDL45DDq7fQKJVjKaaM1XnceJubI=; b=a+Jl/LUQK08bzvJq3RoeAUt365k3z0ZP5Pbd9z3toggLLArNVsVeCtfg35ic6+vmVV o+nyDgUeDORbzpLVUg5NySIn0HKjIQsDxdenQpLTNUz4HFP0bwVczKp5wruW3Cakn9Rl YbyMsNsRnwxYH5qsM0XCif/mT5BVJaeykKsGLgZa34/HXkNz5gIcLHwiOmqGO1RaXnit M3Sv9B4SGVnXgQGqoP/1yH8VUlWnBDMssMnUlDUly+kkdNoiIq4Hp2bsxlHH4tCtDPNL JIevD05eCQZwSUHNXuDK8v5SrK6erykL6oxvOGk8zwK6x6JgcJFOTAKzsOIHoYBaB3Vt wIcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vDDd2TVh; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=GO6bVNBW; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j14si4309148iok.53.2021.09.10.03.28.58; Fri, 10 Sep 2021 03:29:10 -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=@linutronix.de header.s=2020 header.b=vDDd2TVh; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=GO6bVNBW; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232236AbhIJK3a (ORCPT + 99 others); Fri, 10 Sep 2021 06:29:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232157AbhIJK33 (ORCPT ); Fri, 10 Sep 2021 06:29:29 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FA5EC061574 for ; Fri, 10 Sep 2021 03:28:18 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1631269697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VR6zh69FzEs75hbhDL45DDq7fQKJVjKaaM1XnceJubI=; b=vDDd2TVhCE/KEOplPzNZXjPgvqO7GyemDGQrztsNDCwrt7dlUPUrrDpuQpB+Ae2WB/Hz1H y6+x2WFX0tbsatTqAv9wjP5V9j36l6lf9FhwlaISfgtkyIOl8jyouU7oJJoK58wGh96koW x4szNN7Rt2Ym6HXciOBnqOtuAXIkY+CnocLHvx4N2jeEs09QTSrM0nFsO+SF8ILsBBgYjj 9TtIE8MvPq/R+8DI1TUh9iSbzEfZ4W4YjTaPGl05GfWFxf5guTuivYtgaSInp6fX4l1Ynl rw4t1WmCkDaedgUKcobWgwhbY54PcqUZWkb14oAxWUVkUhIrGnx5g/1MTP21bw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1631269697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VR6zh69FzEs75hbhDL45DDq7fQKJVjKaaM1XnceJubI=; b=GO6bVNBWTA1IbOWx9QazCQUKN1TO0GwPc4ZkDoJRyy98tB8nQGTYiMVLA8Pm3aQ18PTFVX p3nSfL+PS8JnXYAg== To: Jiang Jiasheng Cc: linux-kernel@vger.kernel.org, Jiang Jiasheng Subject: Re: [PATCH 6/6] irq: Potentially 'offset out of size' bug In-Reply-To: <1631244372-1817960-1-git-send-email-jiasheng@iscas.ac.cn> References: <1631244372-1817960-1-git-send-email-jiasheng@iscas.ac.cn> Date: Fri, 10 Sep 2021 12:28:16 +0200 Message-ID: <87tuisd8sf.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 10 2021 at 03:26, Jiang Jiasheng wrote: > The find_next_bit() use nr_irqs as size, and using it without > any check might cause its returned value out of the size Why exactly is this a problem? The return value has to be checked at the call site anyway. Thanks, tglx