hv/netvsc: Fix NULL dereference at single queue mode fallback
commit b19b4634 upstream. The recent commit 916c5e14 ("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: 916c5e14 ("hv/netvsc: fix handling of fallback to single queue mode") Signed-off-by:Takashi Iwai <tiwai@suse.de> Reviewed-by:
Stephen Hemminger <stephen@networkplumber.org> Signed-off-by:
David S. Miller <davem@davemloft.net> Cc: Alakesh Haloi <alakeshh@amazon.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment