From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.5]) (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 54F0A2673AA; Sat, 9 May 2026 02:17:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=117.135.210.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778293056; cv=none; b=CnKFhEDf/zfDCA78cwqckGIHW+2Kr0w7N4eOigPuu1TPeU+lEAtiPuuH/xJelYB/ucgUAw+YryL5yEk7XvzaMH6gSqH1PCIBXiR03t+kyCBglLzTBBrZl/odngW/x0HUL/fGl5vgq4R467fbOPmQm3CENBW1glom2bzSCTK3+UY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778293056; c=relaxed/simple; bh=HRmuLMDGFYWhflCqKnfSkmScy+y46tyDgDM3eZms4hs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=R61WVzVWUBXB9MWaf2rr4X8LDi++iYXocS12OFvNQphQQPZQeDFYsLhQzDOPhA6B79AnUNare+I5gtxO2zDIpqHJIhGwvNN/R2LdHvC8qD80SQigluURVBrP0+3MXfg6u4XzeA2kzd8/amlsVBMeOSNTfagFeFtGsYHgDDujmL8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=TGQZxyM5; arc=none smtp.client-ip=117.135.210.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="TGQZxyM5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Message-ID:Date:MIME-Version:Subject:To:From: Content-Type; bh=UKqqnZOvff6wGycc934hoYnnxSVsfu+OX89TZPksU5Q=; b=TGQZxyM5AiArmiorag8L41jzjr70HJE4x8IiDf4dm6mq6dXDzlVeaP2EH82eMK ZT4Rl6wDUEsf3FICOmnCfNIlY+i80v9uDHWRxldyY6hCQQlFh9e7KdTQLXPaeQbT HDn2XgjrVk3k9ShrFfIXybR5lU+tcPOO96U/p6AiJECew= Received: from [192.168.1.40] (unknown []) by gzsmtp3 (Coremail) with SMTP id PigvCgBXUA0Ymf5pGXcQCw--.145S2; Sat, 09 May 2026 10:17:00 +0800 (CST) Message-ID: <00716c13-bec3-49f2-ab23-161b6e48c2c4@163.com> Date: Sat, 9 May 2026 10:16:56 +0800 Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 6.6.y] dmaengine: idxd: Fix leaking event log memory To: Sasha Levin , gregkh@linuxfoundation.org, stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Vinicius Costa Gomes , Dave Jiang , Vinod Koul References: <20260507040415.565-1-jetlan9@163.com> <20260509015927.agent5-0003@kernel.org> From: Wenshan Lan Content-Language: en-US In-Reply-To: <20260509015927.agent5-0003@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID:PigvCgBXUA0Ymf5pGXcQCw--.145S2 X-Coremail-Antispam: 1Uf129KBjvJXoWrZF4kuryxGw18XFWkJFWUurg_yoW8JF17pF W3K34Yyr9rtFyUG390ga10y34Yyrsak3yrGw18KF9FkF4fGFyftFyfAF4jgr1rCw4fCFy5 ta90q3ykCrs0yr7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UTHqxUUUUU= X-CM-SenderInfo: xmhwztjqz6il2tof0z/xtbC6x2HUGn+mR08BwAA3J On 5/9/2026 10:08 AM, Sasha Levin wrote: > On Thu, May 07, 2026 at 12:04:15PM +0800, Wenshan Lan wrote: >> From: Vinicius Costa Gomes >> >> [ Upstream commit ee66bc29578391c9b48523dc9119af67bd5c7c0f ] >> >> - gencfg.bits = ioread32(idxd->reg_base + IDXD_GENCFG_OFFSET); >> - if (!gencfg.evl_en) >> - return; >> - >> mutex_lock(&evl->lock); > This drops the only thing that protects no-evl-capable hardware > (idxd->evl == NULL) from dereferencing evl in idxd_device_evl_free(). > On 6.6, idxd_init_evl() returns 0 without allocating evl when > hw.gen_cap.evl_support == 0, and idxd_device_evl_free() is still > reachable in that path, so taking ee66bc29 alone will introduce a > NULL deref on hardware without event-log support. > > The required prerequisite is upstream commit 52d2edea0d63c > ("dmaengine: idxd: Fix crash when the event log is disabled"), which > adds the "if (!evl) return;" guard at the top of idxd_device_evl_free(). > It landed as patch 2 of the same v3 series and is missing from 6.6.y. > > Could you resend as a 2-patch series with 52d2edea0d63c as the > prerequisite? Then I'm happy to queue both for 6.6.y. Thank you for your review. I will resend v2. Wenshan Lan > > -- > Thanks, > Sasha