Received: by 2002:a05:622a:251a:b0:39a:b4a2:e86 with SMTP id cm26csp329700qtb; Wed, 19 Oct 2022 03:08:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7zmAP8Vpe002IU07354Aq6PF0v1Rtwaars6eiQJJf0dZTFscBpOi09fwKuQ2oqGZWobU1B X-Received: by 2002:aa7:ca45:0:b0:458:d9a2:6164 with SMTP id j5-20020aa7ca45000000b00458d9a26164mr6774089edt.340.1666174093183; Wed, 19 Oct 2022 03:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666174093; cv=none; d=google.com; s=arc-20160816; b=Fg6Wl5rF5pE7iB5WBwnjpFzrWAlDtL1ng+8Yd46EArNFyiZHCDCD+3TKL/Od4mdC6A pig/qOZT5pRgX90CQ43wy+DrTunkdrVMwvOr2zWyYdxB98HsRBf6rUXfW1YuRzFcbrTL bKPgOKGHKJyv64MLvFhIT32InfevbUiXcmepdQCaJ6x1/+CC793yO5N96gWC0xm1ODpM wSmzchNGgoNfxD3/08DEFCCZy56/H5TzvMFvZTsG2dj8yRlH5lOfU3HJOZxW5DC9qMIK 2gGbKW+3fYkG8TV6KUvC65ep+eh46NG3u1hUdBRZilqWMTgUjD/nDM3xh87VjNdOw9Eh b98A== 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=fwrpnl/cufWskTVYzy32pMvoOxItOA/ZmRCJYMefCXU=; b=fIpefYTh2I82q/BIyaqIhwzQ1tbW0BZhh0yS6tTJZEOCOzhiOsjI2YRQRKyma95Uvm zrPEj/H97qqDhOt8so5PZDxhEGSX7/zR1IMbSvVlo6ymdvtqVSvAvSAQLQ+8JOXZ5VX1 1X/6FNbkx2gLqmEf3dLIlzCZV19slZtytCKvCcKzSbQWK1vJqkm7TPP3Ejq8agKXqXgy zXVZQKSI9Z5xvrXmLHw0U2Pn8p69tCx5kqrBN03Bj0DgSGv5TEaOAfRwRuetR2iklxZ3 n5p8A13GP0ZykJdYtG9jNT0y2vCjrqATEyMv/RwkiwWBMBLKrWvEGQHxXF66XZoOflj7 Kzaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LUwY8y1r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g13-20020a056402090d00b00458b71488bdsi16217766edz.388.2022.10.19.03.07.45; Wed, 19 Oct 2022 03:08:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LUwY8y1r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233033AbiJSJN2 (ORCPT + 99 others); Wed, 19 Oct 2022 05:13:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232620AbiJSJK4 (ORCPT ); Wed, 19 Oct 2022 05:10:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 081B9C3564; Wed, 19 Oct 2022 02:02:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2C85C61830; Wed, 19 Oct 2022 09:02:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3744CC433C1; Wed, 19 Oct 2022 09:02:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170122; bh=Ggo1VEe0EXDgrsvE/t2ids5mCaXNBVenLwbwOjRvDNc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LUwY8y1rvtyLxQJ+Rzxyv0vLBVPcJPkX2oYoNzFb5qAiS0Kjm/fr8H4h4nT9EQld4 ZoB/K/dXUY6voucGo0U5Nn7++b0tzaIjLFAKOyOXXY5EpzFEYMm1pojRBDvhCCkSt8 ocm9cBfcMpd0tTevU2fTeUYNKClPBbSLFH2Ud0K8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xiao Yang , Bart Van Assche , Leon Romanovsky , Sasha Levin Subject: [PATCH 6.0 536/862] RDMA/srp: Fix srp_abort() Date: Wed, 19 Oct 2022 10:30:23 +0200 Message-Id: <20221019083313.638697595@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bart Van Assche [ Upstream commit 6dbe4a8dead84de474483910b02ec9e6a10fc1a9 ] Fix the code for converting a SCSI command pointer into an SRP request pointer. Cc: Xiao Yang Fixes: ad215aaea4f9 ("RDMA/srp: Make struct scsi_cmnd and struct srp_request adjacent") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220908233139.3042628-1-bvanassche@acm.org Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin --- drivers/infiniband/ulp/srp/ib_srp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index d7f69e593a63..9c9872868aee 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -2789,7 +2789,7 @@ static int srp_send_tsk_mgmt(struct srp_rdma_ch *ch, u64 req_tag, u64 lun, static int srp_abort(struct scsi_cmnd *scmnd) { struct srp_target_port *target = host_to_target(scmnd->device->host); - struct srp_request *req = (struct srp_request *) scmnd->host_scribble; + struct srp_request *req = scsi_cmd_priv(scmnd); u32 tag; u16 ch_idx; struct srp_rdma_ch *ch; @@ -2797,8 +2797,6 @@ static int srp_abort(struct scsi_cmnd *scmnd) shost_printk(KERN_ERR, target->scsi_host, "SRP abort called\n"); - if (!req) - return SUCCESS; tag = blk_mq_unique_tag(scsi_cmd_to_rq(scmnd)); ch_idx = blk_mq_unique_tag_to_hwq(tag); if (WARN_ON_ONCE(ch_idx >= target->ch_count)) -- 2.35.1