netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next-2.6 PATCH v2 4/4] dcbnl: cleanup
@ 2010-12-30 16:27 Shmulik Ravid
  2010-12-30 19:17 ` John Fastabend
  0 siblings, 1 reply; 2+ messages in thread
From: Shmulik Ravid @ 2010-12-30 16:27 UTC (permalink / raw)
  To: davem; +Cc: John Fastabend, Eilon Greenstein, lucy.liu, netdev

A couple of small cleanups for patches:
[net-next-2.6 PATCH 1/3] dcbnl: add support for ieee8021Qaz attributes
[net-next-2.6 PATCH 2/3] dcbnl: add appliction tlv handlers
[net-next-2.6 PATCH 3/3] net_dcb: add application notifiers

Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com>
---
 net/dcb/dcbnl.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index b387816..ff3c12d 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -1626,8 +1626,10 @@ u8 dcb_setapp(struct net_device *dev, struct dcb_app *new)
 	if (new->priority) {
 		struct dcb_app_type *entry;
 		entry = kmalloc(sizeof(struct dcb_app_type), GFP_ATOMIC);
-		if (!entry)
+		if (!entry) {
+			spin_unlock(&dcb_lock);
 			return -ENOMEM;
+		}
 
 		memcpy(&entry->app, new, sizeof(*new));
 		strncpy(entry->name, dev->name, IFNAMSIZ);
@@ -1640,7 +1642,7 @@ out:
 }
 EXPORT_SYMBOL(dcb_setapp);
 
-void dcb_flushapp(void)
+static void dcb_flushapp(void)
 {
 	struct dcb_app_type *app;
 
-- 
1.7.1





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [net-next-2.6 PATCH v2 4/4] dcbnl: cleanup
  2010-12-30 16:27 [net-next-2.6 PATCH v2 4/4] dcbnl: cleanup Shmulik Ravid
@ 2010-12-30 19:17 ` John Fastabend
  0 siblings, 0 replies; 2+ messages in thread
From: John Fastabend @ 2010-12-30 19:17 UTC (permalink / raw)
  To: Shmulik Ravid
  Cc: davem@davemloft.net, Eilon Greenstein, Liu, Lucy,
	netdev@vger.kernel.org

On 12/30/2010 8:27 AM, Shmulik Ravid wrote:
> A couple of small cleanups for patches:
> [net-next-2.6 PATCH 1/3] dcbnl: add support for ieee8021Qaz attributes
> [net-next-2.6 PATCH 2/3] dcbnl: add appliction tlv handlers
> [net-next-2.6 PATCH 3/3] net_dcb: add application notifiers
> 
> Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com>
> ---

Good catch, thanks a lot. I will roll this into my patch and push a v2 so that we don't introduce a known bug. Of course I'll give you credit.

Thanks,
John.

>  net/dcb/dcbnl.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
> index b387816..ff3c12d 100644
> --- a/net/dcb/dcbnl.c
> +++ b/net/dcb/dcbnl.c
> @@ -1626,8 +1626,10 @@ u8 dcb_setapp(struct net_device *dev, struct dcb_app *new)
>  	if (new->priority) {
>  		struct dcb_app_type *entry;
>  		entry = kmalloc(sizeof(struct dcb_app_type), GFP_ATOMIC);
> -		if (!entry)
> +		if (!entry) {
> +			spin_unlock(&dcb_lock);
>  			return -ENOMEM;
> +		}
>  
>  		memcpy(&entry->app, new, sizeof(*new));
>  		strncpy(entry->name, dev->name, IFNAMSIZ);
> @@ -1640,7 +1642,7 @@ out:
>  }
>  EXPORT_SYMBOL(dcb_setapp);
>  
> -void dcb_flushapp(void)
> +static void dcb_flushapp(void)
>  {
>  	struct dcb_app_type *app;
>  


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-30 19:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-30 16:27 [net-next-2.6 PATCH v2 4/4] dcbnl: cleanup Shmulik Ravid
2010-12-30 19:17 ` John Fastabend

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).