From nobody Sat Jul 4 20:00:21 2026 Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (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 F1D9C218592 for ; Sat, 4 Jul 2026 17:48:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783187315; cv=none; b=V3+zSvwXkcbTiyjdJejhSXt6E87FXKqq8prGoda3j1fItZN7V0IY7RiRS8O4kmCKQ4YcNMtyfAJ4juhUAdtkV8e3/qYIO663mslUezmxl/wQolZ9L0GdVbtbGfszI06vqrAbNeAjqslVq1gsDaJ8Vi6pPAnf6RKe7YXACtKy5mQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783187315; c=relaxed/simple; bh=UtUu5BioZuJKfFmTZv0SLYsE6ePCGt9kpNlHvIfI8tg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TOrxhN8HrbocD4a9ZRKooSNxN2cYzNWQQcNR46n8uLiXJQshyVHvpAVPAEET8fSJkY8V/ePCS3RbLJbR0T4+ORRoHXMm3Z0IAnEfUCTw7DbZgWUKa7nAP8sPGBnPdjMXQM31lIhIcnma3razDtZta0555fkANCJRgsBvfkVucw0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=EwNsYfS2; arc=none smtp.client-ip=209.85.210.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EwNsYfS2" Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-847d1e9db22so1834551b3a.2 for ; Sat, 04 Jul 2026 10:48:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783187313; x=1783792113; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=sn9RvgI/yVMwEfWJXk2ielNPfuat7hoo2D7L75ktDis=; b=EwNsYfS27efKosx997XVsKwnYDa8kFfgk9ia0aMpj7+A99uGa+RVC2OcwRxKbh3MdF GlwkIBS2eTup5ZrGgOMqHuE64Ceyw7bkU8kZ0mRV+28Im1IieUUQkuL9hZqM8XOzdmZl 1wEmhRkpj1KfTDnWqiV9pEcSo7cgcb43qQTLvqeArqAaSsGLaJqDuH8nXnEp9w3cNvIK UfAxhHZj3LJS9034rNjmrzTRJ5KcN2JvwbUjrQW/Oo2S+9Hh8cpS4oahSQQbxa6iZ/Cm Nt97Xd3sKErHu2G+P0JOCyhrZnXmsIEeoPVneJN7gI2vqEIek2IPtd3x+rzhGR8rhYeB 8tDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783187313; x=1783792113; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sn9RvgI/yVMwEfWJXk2ielNPfuat7hoo2D7L75ktDis=; b=aWRBe6hpsc0Bvr9Siy6dqWm4aOFd97XQL6P8Y7tEYBA4ErOkVgfM+56XgdCxW9WJ5c WnLumVYc94wnbNDryTAogckiWiGtoSkEACe4iCOBCvDfUffrTdlMs2KZLS+A1pHR5KI0 k3hXjqsp3/oufXPMQRK5gNXAI4oL0ODoyEbdjlp4CL0MNIpRSTrEu054xD+nv99ayU4V +9iWOZy/ceJirP6WWqaGGUJNB1QtSuIS6tGAEV/YeW3S8PbRqqEVj+J6zTXS5ZXCpBZX euuu3iVLUHVrjrJM9w92DOpj79LRYbm5B+ySSTKckLePKMfNRP7fSpCkz0L801M8vGWw YvLg== X-Forwarded-Encrypted: i=1; AFNElJ/EPa4+SzAeBWrCZUU+t+jGn4Ubo57YTRUI8H9lxe8Ul/XLcEKE2Ouhn7nQxS2lQAZcUybsMxoH0uOnnWE=@vger.kernel.org X-Gm-Message-State: AOJu0YwejJj9EYvc6frgfoEQutgnQBR39GvvlmeWcHim9b/gbyier+lb G9j9af3xpXU40t9fDfRVAliayqhlSpO9eOZccR9u4kZNnAJ4agghQFbV X-Gm-Gg: AfdE7cnShSr4fTpzmCcFhkE9GOTnL5vPhQ8THAI6vrx65d9ikgtqFigUJzL7nycdUCn 9gewET2f6+kUD34aNTMe5SMeYEYP0C79kU0Tf5ueQIocrCbPvs82vZj8IhBv0HhPaNt8O1MWwUg Ro6ceQ/UCTexPtvb+dp5wIC6z7XhbDDMNEl/qxDgCd+jnngKTriXYyWJXdnLeUPEuHZYgxmBdY+ Nz2sht0tJ0OK3FWXRD6Qc1Tl2uY4A7bAwAY2U14oHlMZfrHvEkDOPvIG6RmX3i0XLl9i19/ZRCe mLj9NTb/Fp7f7i5QUSLNgP3LmBe+V184DiutjzSgnpMHq6Iy5VON8wXyL1dS/RgYbpqpGppJsJm DLFHkmAKDAXnMIc8Wp4B0LJZ0F6zUJsj5ANFlwZ30jmG1J8EQNndRvp69T9dPvVmJVWOFHTM= X-Received: by 2002:a05:6a20:c79b:b0:3b2:a809:1000 with SMTP id adf61e73a8af0-3c03e1a28b6mr4198185637.3.1783187313259; Sat, 04 Jul 2026 10:48:33 -0700 (PDT) Received: from lgs.. ([2001:250:5800:1000::f280]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c9e91b07639sm3857271a12.21.2026.07.04.10.48.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2026 10:48:32 -0700 (PDT) From: Guangshuo Li To: Nilesh Javali , GR-QLogic-Storage-Upstream@marvell.com, "James E.J. Bottomley" , "Martin K. Petersen" , Anil Gurumurthy , Himanshu Madhani , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Guangshuo Li Subject: [PATCH] scsi: qla2xxx: Fix BSG request hang on flash image validation failure Date: Sun, 5 Jul 2026 01:46:03 +0800 Message-ID: <20260704174603.255881-1-lgs201920130244@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" qla28xx_validate_flash_image() validates a flash image and reports the result through the BSG reply. It only calls bsg_job_done() when the validation succeeds. However, the function always returns QLA_SUCCESS. If validation fails, bsg_job_done() is skipped but the zero return value tells the BSG core that the request was accepted and will be completed asynchronously. No one completes the request afterwards, so the BSG request remains in-flight until it times out. Return the validation error when bsg_job_done() is not called. This lets the BSG core complete the request with an error instead of waiting for a completion that will never happen. Fixes: c2c68225b145 ("scsi: qla2xxx: Fix bsg_done() causing double free") Signed-off-by: Guangshuo Li --- drivers/scsi/qla2xxx/qla_bsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index 5e910b5ca670..5b2201859f73 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xxx/qla_bsg.c @@ -3369,5 +3369,5 @@ static int qla28xx_validate_flash_image(struct bsg_jo= b *bsg_job) bsg_job_done(bsg_job, bsg_reply->result, bsg_reply->reply_payload_rcv_len); =20 - return QLA_SUCCESS; + return rval; } --=20 2.43.0