From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] hv/netvsc: Fix NULL dereference at single queue mode fallback Date: Tue, 14 Aug 2018 10:18:03 -0700 Message-ID: <20180814101803.43e8e17e@xeon-e3> References: <20180814171050.26356-1-tiwai@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Stephen Hemminger , "K . Y . Srinivasan" , Haiyang Zhang , "David S . Miller" , devel@linuxdriverproject.org, netdev@vger.kernel.org To: Takashi Iwai Return-path: Received: from mail-pf1-f195.google.com ([209.85.210.195]:42811 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387660AbeHNUGJ (ORCPT ); Tue, 14 Aug 2018 16:06:09 -0400 Received: by mail-pf1-f195.google.com with SMTP id l9-v6so9527678pff.9 for ; Tue, 14 Aug 2018 10:18:06 -0700 (PDT) In-Reply-To: <20180814171050.26356-1-tiwai@suse.de> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 14 Aug 2018 19:10:50 +0200 Takashi Iwai wrote: > 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") > Cc: > Signed-off-by: Takashi Iwai Reviewed-by: Stephen Hemminger