Re: [PATCH] net: inet: diag: Fix an error handling

2016-09-12 Thread Christophe JAILLET
Le 12/09/2016 à 16:35, David Ahern a écrit : On 9/12/16 12:02 AM, Christophe JAILLET wrote: diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index abfbe492ebfe..795af25cf84c 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c @@ -1134,7 +1134,6 @@ int inet_diag_handler_get_info(

Re: [PATCH] net: inet: diag: Fix an error handling

2016-09-12 Thread David Ahern
On 9/12/16 12:02 AM, Christophe JAILLET wrote: > diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c > index abfbe492ebfe..795af25cf84c 100644 > --- a/net/ipv4/inet_diag.c > +++ b/net/ipv4/inet_diag.c > @@ -1134,7 +1134,6 @@ int inet_diag_handler_get_info(struct sk_buff *skb, > struct sock *s

[PATCH] net: inet: diag: Fix an error handling

2016-09-11 Thread Christophe JAILLET
If 'inet_diag_lock_handler()' returns an error, we should not call 'inet_diag_unlock_handler()' on it. 'handler' is not a valid mutexc in this case. This has been spotted with the folowing coccinelle script: @@ expression x; identifier f; @@ * if (IS_ERR(x)) {