From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] bridge: add missing bridge port check for offloads Date: Sat, 07 Feb 2015 22:50:12 -0800 (PST) Message-ID: <20150207.225012.779384501646874610.davem@davemloft.net> References: <1423203885-45657-1-git-send-email-roopa@cumulusnetworks.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, bridge@lists.linux-foundation.org, dan.carpenter@oracle.com To: roopa@cumulusnetworks.com Return-path: In-Reply-To: <1423203885-45657-1-git-send-email-roopa@cumulusnetworks.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: bridge-bounces@lists.linux-foundation.org Errors-To: bridge-bounces@lists.linux-foundation.org List-Id: netdev.vger.kernel.org From: roopa@cumulusnetworks.com Date: Thu, 5 Feb 2015 22:24:45 -0800 > From: Roopa Prabhu > > This patch fixes a missing bridge port check caught by smatch. > > setlink/dellink of attributes like vlans can come for a bridge device > and there is no need to offload those today. So, this patch adds a bridge > port check. (In these cases however, the BRIDGE_SELF flags will always be set > and we may not hit a problem with the current code). > > smatch complaint: > > The patch 68e331c785b8: "bridge: offload bridge port attributes to > switch asic if feature flag set" from Jan 29, 2015, leads to the > following Smatch complaint: > > net/bridge/br_netlink.c:552 br_setlink() > error: we previously assumed 'p' could be null (see line 518) > > net/bridge/br_netlink.c > 517 > 518 if (p && protinfo) { > ^ > Check for NULL. > > Reported-By: Dan Carpenter > Signed-off-by: Roopa Prabhu Applied, thanks.