Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755163AbcJOVsj (ORCPT ); Sat, 15 Oct 2016 17:48:39 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:36600 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753762AbcJOVsa (ORCPT ); Sat, 15 Oct 2016 17:48:30 -0400 Date: Sat, 15 Oct 2016 17:48:25 -0400 (EDT) Message-Id: <20161015.174825.2149332278069508221.davem@davemloft.net> To: khoroshilov@ispras.ru Cc: skhare@vmware.com, pv-drivers@vmware.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: Re: [PATCH v2] vmxnet3: avoid assumption about invalid dma_pa in vmxnet3_set_mc() From: David Miller In-Reply-To: <1476478880-22607-1-git-send-email-khoroshilov@ispras.ru> References: <20161013.094323.1769619439752576215.davem@davemloft.net> <1476478880-22607-1-git-send-email-khoroshilov@ispras.ru> 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]); Sat, 15 Oct 2016 14:48:26 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 578 Lines: 15 From: Alexey Khoroshilov Date: Sat, 15 Oct 2016 00:01:20 +0300 > vmxnet3_set_mc() checks new_table_pa returned by dma_map_single() > with dma_mapping_error(), but even there it assumes zero is invalid pa > (it assumes dma_mapping_error(...,0) returns true if new_table is NULL). > > The patch adds an explicit variable to track status of new_table_pa. > > Found by Linux Driver Verification project (linuxtesting.org). > > v2: use "bool" and "true"/"false" for boolean variables. > Signed-off-by: Alexey Khoroshilov Applied.