Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755744AbbDNPVd (ORCPT ); Tue, 14 Apr 2015 11:21:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40269 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753504AbbDNPVY (ORCPT ); Tue, 14 Apr 2015 11:21:24 -0400 From: Honggang Li To: roland@kernel.org, sean.hefty@intel.com, hal.rosenstock@gmail.com, kaber@trash.net, davem@davemloft.net, alex.estrin@intel.com, dledford@redhat.com, edumazet@google.com, erezsh@mellanox.com, nicolas.dichtel@6wind.com, maheshb@google.com, jbenc@redhat.com, ebiederm@xmission.com, elfring@users.sourceforge.net, f.fainelli@gmail.com, linux@roeck-us.net, andrew@lunn.ch, sfeldma@gmail.com, alexander.h.duyck@intel.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Honggang Li Subject: [PATCH linux-next 0/4] fix possile NULL pointer dereference in ndo_get_iflink callback functions Date: Tue, 14 Apr 2015 23:20:13 +0800 Message-Id: <1429024817-21561-1-git-send-email-honli@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1327 Lines: 32 The four callback functions deferference the pointers without test. As ipoib_get_iflink failed, it is a good reason to fix the other three functions. Those functions will return zero on error, as valid ifindex greater than zero. I understand that those simple patches should be emerged into a single patch. However, those files have be maintained by different maintainers. So, I split it for review. It also will be convenient to remove one or more patches with the rest not be affected. Honggang Li (4): infiniband/ipoib: fix possible NULL pointer dereference in ipoib_get_iflink ipvlan: fix possible NULL pointer dereference in ipvlan_get_iflink macvlan: fix possible NULL pointer dereference in macvlan_dev_get_iflink net/dsa: fix possible NULL pointer dereference in dsa_slave_get_iflink drivers/infiniband/ulp/ipoib/ipoib_main.c | 5 ++++- drivers/net/ipvlan/ipvlan_main.c | 5 ++++- drivers/net/macvlan.c | 4 +++- net/dsa/slave.c | 5 ++++- 4 files changed, 15 insertions(+), 4 deletions(-) -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/