Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1174184AbdDXUL1 (ORCPT ); Mon, 24 Apr 2017 16:11:27 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:57174 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1174089AbdDXULS (ORCPT ); Mon, 24 Apr 2017 16:11:18 -0400 Date: Mon, 24 Apr 2017 16:11:16 -0400 (EDT) Message-Id: <20170424.161116.271050954695792950.davem@davemloft.net> To: bianpan201602@163.com Cc: harish.patil@cavium.com, manish.chopra@cavium.com, Dept-GELinuxNICDev@cavium.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bianpan2016@163.com Subject: Re: [PATCH 1/1] qlcnic: fix unchecked return value From: David Miller In-Reply-To: <1492949044-23580-1-git-send-email-bianpan201602@163.com> References: <1492949044-23580-1-git-send-email-bianpan201602@163.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) 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]); Mon, 24 Apr 2017 12:29:54 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 424 Lines: 13 aFrom: Pan Bian Date: Sun, 23 Apr 2017 20:04:04 +0800 > From: Pan Bian > > Function pci_find_ext_capability() may return 0, which is an invalid > address. In function qlcnic_sriov_virtid_fn(), its return value is used > without validation. This may result in invalid memory access bugs. This > patch fixes the bug. > > Signed-off-by: Pan Bian Applied.