mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: 12o3l@tiscali.nl
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/?] Unlock when sn_oemdata can't be extended
Date: Fri, 26 Oct 2007 03:48:16 -0700 (PDT)	[thread overview]
Message-ID: <20071026.034816.178511694.davem@davemloft.net> (raw)
In-Reply-To: <471F1C48.1000803@tiscali.nl>

From: Roel Kluin <12o3l@tiscali.nl>
Date: Wed, 24 Oct 2007 12:19:52 +0200

>      Several unlocking issues
>      Signed-off-by: Roel Kluin <12o3l@tiscali.nl>

Some of these are wrong, for example:

> diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
> index 817169e..b09c499 100644
> --- a/net/bridge/netfilter/ebtables.c
> +++ b/net/bridge/netfilter/ebtables.c
> @@ -282,8 +282,10 @@ find_inlist_lock_noload(struct list_head *head, const char *name, int *error,
>  		return NULL;
>  
>  	list_for_each_entry(e, head, list) {
> -		if (strcmp(e->name, name) == 0)
> +		if (strcmp(e->name, name) == 0) {
> +			mutex_unlock(mutex);
>  			return e;
> +		}
>  	}
>  	*error = -ENOENT;
>  	mutex_unlock(mutex);

Please look at the comment right about this function, it clearly
explains that if the named object is found, the function returns
with the mutex locked.

The rest of the networking cases look OK, please just resubmit
the correct networking cases to netdev@vger.kernel.org.

Thanks.

      parent reply	other threads:[~2007-10-26 10:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-24  0:34 Roel Kluin
2007-10-24  1:04 ` [PATCH 2/2] Fix unlock on error Roel Kluin
2007-10-24 10:19 ` [PATCH 1/?] Unlock when sn_oemdata can't be extended Roel Kluin
2007-10-24 16:38   ` Roel Kluin
2007-10-26 10:48   ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071026.034816.178511694.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=12o3l@tiscali.nl \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome