From patchwork Fri Jul 8 07:27:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 103774 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id A69ADB6F00 for ; Fri, 8 Jul 2011 17:28:57 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753022Ab1GHH2m (ORCPT ); Fri, 8 Jul 2011 03:28:42 -0400 Received: from mail-pw0-f46.google.com ([209.85.160.46]:64561 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751089Ab1GHH2k (ORCPT ); Fri, 8 Jul 2011 03:28:40 -0400 Received: by pwj7 with SMTP id 7so965761pwj.19 for ; Fri, 08 Jul 2011 00:28:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=7G+C6pY3QWpxQGeCVFcye4pVW2w+LIfkSQEyv08lzfs=; b=koQWYQ0pgFVL/2iVqbgddbBZI3xW02O8KVtARmQvVhqq3NdKb3/lQZh49cVWTTAI+8 P8BHd+0voL28kjbT0uj/PhOZNEtNl/1igiynrFZtUXfQ46UV3ujzSoMUVjBFl6Tmfl5t WOM/QFh9D2b6+eN1l6a1Sg4Oj7iOmXVv+5je0= Received: by 10.68.15.68 with SMTP id v4mr2473036pbc.221.1310110119901; Fri, 08 Jul 2011 00:28:39 -0700 (PDT) Received: from shale.localdomain ([41.139.221.94]) by mx.google.com with ESMTPS id e6sm6109020pbm.71.2011.07.08.00.28.33 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Jul 2011 00:28:39 -0700 (PDT) Date: Fri, 8 Jul 2011 10:27:24 +0300 From: Dan Carpenter To: Shmulik Ravid Cc: "David S. Miller" , John Fastabend , Shmulik Ravid , "open list:NETWORKING [GENERAL]" , kernel-janitors@vger.kernel.org Subject: [patch] dcbnl: unlock on an error path in dcbnl_cee_fill() Message-ID: <20110708072724.GW18655@shale.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org We need to release "dcb_lock" which we took on the previous line. Signed-off-by: Dan Carpenter --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c index 6a015f2..3cb56af 100644 --- a/net/dcb/dcbnl.c +++ b/net/dcb/dcbnl.c @@ -1409,7 +1409,7 @@ static int dcbnl_cee_fill(struct sk_buff *skb, struct net_device *netdev) spin_lock(&dcb_lock); app = nla_nest_start(skb, DCB_ATTR_CEE_APP_TABLE); if (!app) - goto nla_put_failure; + goto dcb_unlock; list_for_each_entry(itr, &dcb_app_list, list) { if (strncmp(itr->name, netdev->name, IFNAMSIZ) == 0) {