From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] hv/netvsc: Fix NULL dereference at single queue mode fallback Date: Tue, 14 Aug 2018 10:29:32 -0700 (PDT) Message-ID: <20180814.102932.1425242139845133705.davem@davemloft.net> References: <20180814171050.26356-1-tiwai@suse.de> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: sthemmin@microsoft.com, kys@microsoft.com, haiyangz@microsoft.com, devel@linuxdriverproject.org, netdev@vger.kernel.org To: tiwai@suse.de Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:53174 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388369AbeHNURk (ORCPT ); Tue, 14 Aug 2018 16:17:40 -0400 In-Reply-To: <20180814171050.26356-1-tiwai@suse.de> Sender: netdev-owner@vger.kernel.org List-ID: From: Takashi Iwai Date: Tue, 14 Aug 2018 19:10:50 +0200 > The recent commit 916c5e1413be ("hv/netvsc: fix handling of fallback > to single queue mode") tried to fix the fallback behavior to a single > queue mode, but it changed the function to return zero incorrectly, > while the function should return an object pointer. Eventually this > leads to a NULL dereference at the callers that expect non-NULL > value. > > Fix it by returning the proper net_device object. > > Fixes: 916c5e1413be ("hv/netvsc: fix handling of fallback to single queue mode") > Signed-off-by: Takashi Iwai Applied and queued up for -stable. Please do not put explicit "CC: stable" notations in networking patches, I queue up and submit networking patches to -stable explicitly. Thank you.