From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sg-1-101.ptr.blmpb.com (sg-1-101.ptr.blmpb.com [118.26.132.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2A0F2FF165 for ; Fri, 5 Dec 2025 08:01:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=118.26.132.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764921701; cv=none; b=de8We9S3vYt+3QntcTBruF0z3TVCO/hMJZmUyxSLJAGOEZegzpXs4H2dLFCyeGiH+LmL/bgB1nn3Wi27ZlVJQA+rqZ3uIVE4ZlUzD0oddhgiHA0I7EV/bJnVx56vIHCtpoYR0Xz7AQethu5UaojR7O8XeA/h2ipVHFyNsVn8u8k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764921701; c=relaxed/simple; bh=Z5oM9THsmr5BZDKMMJuyuSz2lOGM5m2C7o0DzKxbom4=; h=Date:Mime-Version:References:Content-Type:In-Reply-To:To:From: Subject:Cc:Message-Id; b=bYU5Yl1MAcZqUR+XU+Ah6R+FWYG0iwhHkUE9C+li6Jm97LYHdvZLBvzBwGqOT+CTm/JseFoZ4ZLqrfeERP8DGC5Ks6m7Q6leTea3s5y5IrTUx9P/jnc1L/PxmcAXT/CbPM4R0AsLqWN/r4T157eI6Fs3K9jb47YxESP4eRf6FgE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=RnVXKwAI; arc=none smtp.client-ip=118.26.132.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="RnVXKwAI" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1764921674; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=Cn8Adhn8cguQubUpTmAvmczsPfC3Ffk2GV6iZZrLE1U=; b=RnVXKwAI6dHAn3JDO2b23H6wF22Ly9Ys/M3DUyNIRHhAKJBifOl3MUGSx2C4alVMi7W1/h 78TpbCFurCATgFxdsFUqjDjkfm0NF1Xaanl10wcgR4B6Azy7TRo6ONpcdNDH3WpsW1TRij lbUrmIrq+RJSmfGAla1peJ9jgkNcuG8kGgXKxQzIE3FsG8v4jOepcgtywEQtYzIvABZ+F+ Gw67NQ7Md1yRMXU/USiUDYhZBsU0tgHSFTQMZg95ZX3NVFz5uix/lyoi+YcNT1a+Lxvrsd u4nFKg21Wo577yIATu9iK9qimRjioBKriR89zYrKdt/7DqTrYRvxvZnIBsNn8A== Date: Fri, 5 Dec 2025 16:01:02 +0800 X-Lms-Return-Path: Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: Content-Type: text/plain; charset=UTF-8 In-Reply-To: To: From: "Jinhui Guo" Subject: Re: [PATCH v2 0/3] ipmi: Close the race between __scan_channels() and deliver_response() X-Mailer: git-send-email 2.17.1 Cc: , , Message-Id: <20251205080102.1039-1-guojinhui.liam@bytedance.com> X-Original-From: Jinhui Guo On Fri, Oct 3, 2025 at 10:43:16AM -0500, Corey Minyard wrote: > On Tue, Sep 30, 2025 at 03:42:36PM +0800, Jinhui Guo wrote: > > The command "ipmi -b -t" would occasionally fail: > > #ipmitool -b 6 -t 0x2c raw 0x6 0x01 > > Unable to send command: Invalid argument > > Unable to send RAW command (channel=3D0x6 netfn=3D0x6 lun=3D0x0 cmd= =3D0x1) > >=20 > > The race window between __scan_channels() and deliver_response() causes > > the parameters of some channels to be set to 0. > >=20 > > Fix the race between __scan_channels() and deliver_response() with the > > following changes. > >=20 > > 1. Only assign intf->channel_list =3D intf->wchannels and set > > intf->channels_ready =3D true in channel_handler() after all channel= s_ready > > have been successfully scanned or after failing to send the IPMI > > request. > > 2. channel_handler() sets intf->channels_ready to true but no one clear= s > > it, preventing __scan_channels() from rescanning channels. When the = BMC > > firmware changes a rescan is required. Allow it by clearing the flag > > before starting a new scan. > > 3. Channels remain static unless the BMC firmware changes. Skip channel > > rescan when no BMC firmware update has occurred. > >=20 > >=20 > > v1: https://lore.kernel.org/all/20250929081602.1901-1-guojinhui.liam@by= tedance.com/ > >=20 > > Changelog in v1 -> v2 (suggested by corey): > > - Split the fix into three independent patches, each addressing a > > separate issue. > > - Clear intf->channels_ready only when the BMC firmware changes. > >=20 > > Jinhui Guo (3): > > ipmi: Fix the race between __scan_channels() and deliver_response() > > ipmi: Fix __scan_channels() failing to rescan channels > > ipmi: Skip channel scan if channels are already marked ready > I have these queued for 6.18. I need to re-review them; that will > probably happen later in the cycle; I can't put them in until 6.17-rc1 > releases. > Thanks, > -corey Hi, corey Friendly ping =E2=80=94 please let me know if you need anything else (rebas= e, more review, test results) and I=E2=80=99ll be happy to take care of it. Thanks for your time, and sorry for the noise. Best regards, Jinhui > >=20 > > drivers/char/ipmi/ipmi_msghandler.c | 24 +++++++++++++++++------- > > 1 file changed, 17 insertions(+), 7 deletions(-) > >=20 > > --=20 > > 2.20.1 > >