From patchwork Fri Aug 31 20:00:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongsu Park X-Patchwork-Id: 1394361 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id EE0B1DFFD0 for ; Fri, 31 Aug 2012 20:01:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754937Ab2HaUBp (ORCPT ); Fri, 31 Aug 2012 16:01:45 -0400 Received: from mail-bk0-f46.google.com ([209.85.214.46]:34737 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754936Ab2HaUBL (ORCPT ); Fri, 31 Aug 2012 16:01:11 -0400 Received: by mail-bk0-f46.google.com with SMTP id j10so1457193bkw.19 for ; Fri, 31 Aug 2012 13:01:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=ryzjqirBGRl9KimgJwEDRQGcBkRUnUkMM+uff2SiL5k=; b=ZsRMuGPMQgsX2RT83WmP8p1Ms98cyWRsOvQM8nsWbNC3+c6ppgBux99bXx450va33d oLfiozkfNrEUVW+4vUCaDDVPR9GmlPc/DjhaODcfVxm7uf9KPIKnkX4ZSujyBNCTfXEA pwWQ2OFljsIKhr0nsfnImiENscD2jCq8CVwzGSU0pMLHA5tr7KO6M+Uj3ECIsTUJ1QM3 TM+PYpJp03kvl3yYCyWLl054jm18TfNUBwrkNKt0AdJT0BTxQDmKKKUVXfCCIZtBwYU0 ex8n/mOJ5gyzPCGcMkDHABX3zg18dotLzsmRbtcIX0mAQNONrzHNJf3+ee8my+ChvmYV qXzA== Received: by 10.204.129.8 with SMTP id m8mr4625482bks.62.1346443270234; Fri, 31 Aug 2012 13:01:10 -0700 (PDT) Received: from dneo.profitbricks.localdomain (dslb-188-103-218-031.pools.arcor-ip.net. [188.103.218.31]) by mx.google.com with ESMTPS id 25sm4194314bkx.9.2012.08.31.13.01.08 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 31 Aug 2012 13:01:09 -0700 (PDT) From: dongsu.park@profitbricks.com To: bvanassche@acm.org Cc: dillowda@ornl.gov, roland@kernel.org, sean.hefty@intel.com, hal.rosenstock@gmail.com, JBottomley@parallels.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Dongsu Park Subject: [PATCH 5/5] ib_srp: fix an error accessing invalid memory in rport_dev_loss_timedout Date: Fri, 31 Aug 2012 22:00:41 +0200 Message-Id: <1346443241-24844-6-git-send-email-dongsu.park@profitbricks.com> X-Mailer: git-send-email 1.7.11.1 In-Reply-To: <1346443241-24844-1-git-send-email-dongsu.park@profitbricks.com> References: <1346443241-24844-1-git-send-email-dongsu.park@profitbricks.com> X-Gm-Message-State: ALoCoQkXj6vwFvgOmMlrmlxsv8HsYqpg8NzJqpQdwxmKF262nyCeAbkz6WviQ4L5GiEE63mEAPBK Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Bart Van Assche In rport_dev_loss_timedout(), rport must be obtained by accessing the member entry dev_loss_work, not fast_io_fail_work. Signed-off-By: Bart Van Assche --- drivers/scsi/scsi_transport_srp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_transport_srp.c b/drivers/scsi/scsi_transport_srp.c index 915b355..d796413 100644 --- a/drivers/scsi/scsi_transport_srp.c +++ b/drivers/scsi/scsi_transport_srp.c @@ -242,7 +242,7 @@ static void rport_fast_io_fail_timedout(struct work_struct *work) { struct srp_rport *rport = container_of(to_delayed_work(work), struct srp_rport, - fast_io_fail_work); + dev_loss_work); struct Scsi_Host *shost; struct srp_internal *i;