Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4424689imu; Fri, 30 Nov 2018 17:22:09 -0800 (PST) X-Google-Smtp-Source: AFSGD/WMYSoW2CI8iuFfUaBs+sSHmw+mklhn9jDYFtek9R6rF7Yd3eGlOtBysAp3mZpzp4q7r3wY X-Received: by 2002:a63:ff62:: with SMTP id s34mr6662793pgk.325.1543627329051; Fri, 30 Nov 2018 17:22:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543627329; cv=none; d=google.com; s=arc-20160816; b=bk3fFJVLqJoH9Xemr7639RMNqVzzCj5C1IqxlLwbAaZlFj6v8I4nfiW5gWumRUaDTf M7SM3wzz/njiWuOeuCzWNOCfsQZM/sAj/pIkh2ADiPvlTiko9kZ1ng4eh/fFUTJQ3iB1 tSDGjfJeEC4G9hohlUap0otI00VTHmjv5df3YZbsVg2nkZqeeACWft4ft1b6rVNCvQVW wGiyBekqmkI89AHPlDTYjTFjC+kP9TeDpDv24iRM9EGHUN4YFW7S7ZkTuMGhuDNT+TV2 E+IQpFoIFdVXBUJmya6G6atC+7dzg1nVEoi8lYHHdQ0kch95ZOv4/QLYtwVJ6yXGE/q3 xSnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=fyBbAOlpMmQrNM2tlCrMhZw92ZjTdokfZiTBmfJrHg8=; b=Rfx+4TdXLR60gcuQq027zk3S8LZL2FE/SnFbX4ZkP3k+8rl/Evx5RmqxsrbdZ0/1RJ qU3K2NasDs3e5QMX1y0Dy9qh12h+nD+ioo5uKEHzAls3/G0bQU59vHiR5oG6Ymxx3oka lIf4d8zuWOMJce5Yy42mg3x27Tefc/H2TpnSDRGLGEM9unVGwmfvwbARVmVTuiBFeYBH 5QPUVDUekYOem/6OPJIbtu3JcFyJsOSbGT/qAmcDG4d7d2uuArnfCii9lsyQ3VWtTDZJ ZmI/+y1hge+YOoxedrbKeQ/HOQcCNs4iTG7K5tQPjnxop4Nhr34ZsGSuBx3F9Ps3lP9D dB4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k142si7800612pfd.174.2018.11.30.17.21.54; Fri, 30 Nov 2018 17:22:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726800AbeLAMcO (ORCPT + 99 others); Sat, 1 Dec 2018 07:32:14 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:36906 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726651AbeLAMcO (ORCPT ); Sat, 1 Dec 2018 07:32:14 -0500 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::bf5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 2DCA014F24069; Fri, 30 Nov 2018 17:20:59 -0800 (PST) Date: Fri, 30 Nov 2018 17:20:58 -0800 (PST) Message-Id: <20181130.172058.1554521447549715801.davem@davemloft.net> To: bianpan2016@163.com Cc: derek.chickles@caviumnetworks.com, satananda.burla@caviumnetworks.com, felix.manlunas@caviumnetworks.com, raghu.vatsavayi@caviumnetworks.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] liquidio: read sc->iq_no before release sc From: David Miller In-Reply-To: <1543449262-70421-1-git-send-email-bianpan2016@163.com> References: <1543449262-70421-1-git-send-email-bianpan2016@163.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 30 Nov 2018 17:20:59 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pan Bian Date: Thu, 29 Nov 2018 07:54:22 +0800 > The function lio_vf_rep_packet_sent_callback releases the occupation of > sc via octeon_free_soft_command. sc should not be used after that. > Unfortunately, sc->iq_no is read. To fix this, the patch stores sc->iq_no > into a local variable before releasing sc and then uses the local variable > instead of sc->iq_no. > > Signed-off-by: Pan Bian Applied.