public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@cogenit.fr>
To: Maksim Krasnyanskiy <maxk@qualcomm.com>
Cc: Robert Love <rml@tech9.net>, Frode Isaksen <fisaksen@bewan.com>,
	mitch@sfgoth.com, linux-kernel@vger.kernel.org,
	marcelo Tosatti <marcelo@conectiva.com.br>,
	alan@lxorguk.ukuu.org.uk
Subject: Re: [PATCH] ATM locking fix. [Re: [PATCH] spinlock not locked when unlocking in atm_dev_register]
Date: Sat, 9 Mar 2002 19:45:15 +0100	[thread overview]
Message-ID: <20020309194515.B6626@fafner.intra.cogenit.fr> (raw)
In-Reply-To: <5.1.0.14.2.20020307141124.084dbde8@mail1.qualcomm.com>
In-Reply-To: <5.1.0.14.2.20020307141124.084dbde8@mail1.qualcomm.com>; from maxk@qualcomm.com on Thu, Mar 07, 2002 at 02:11:37PM -0800

Greetings,

Maksim Krasnyanskiy <maxk@qualcomm.com> :
> --- linux/net/atm/resources.c.orig	Thu Mar  7 13:56:00 2002
> +++ linux/net/atm/resources.c	Thu Mar  7 13:56:40 2002
[...]
>   		if (atm_proc_dev_register(dev) < 0) {
>   			printk(KERN_ERR "atm_dev_register: "
>   			    "atm_proc_dev_register failed for dev %s\n",type);
> -			spin_unlock (&atm_dev_lock);		
>   			free_atm_dev(dev);   <====== (A)
> -			return NULL;
> +			goto done;
>   		}
>   #endif
> -	spin_unlock (&atm_dev_lock);
> +
> +done:
> +	spin_unlock(&atm_dev_lock); 
>   	return dev;                          <====== (B)
>   }

- dev = NULL is to be inserted between (A) and (B) or the caller won't 
  notice the failure
- atm_proc_dev_register issues kmalloc(...,GFP_KERNEL) and atm_dev_lock 
  is hold

-- 
Ueimor

  reply	other threads:[~2002-03-09 18:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-07 22:11 [PATCH] ATM locking fix. [Re: [PATCH] spinlock not locked when unlocking in atm_dev_register] Maksim Krasnyanskiy
2002-03-09 18:45 ` Francois Romieu [this message]
2002-03-11 18:38 ` Maksim Krasnyanskiy
2002-03-11 20:04   ` Francois Romieu
2002-03-26 22:52 ` [PATCH] ATM locking fix David S. Miller
2002-03-26 23:08   ` Dave Jones
2002-03-26 23:11     ` David S. Miller
2002-03-26 23:27   ` Mr. James W. Laferriere
2002-03-28  1:55   ` Maksim Krasnyanskiy
2002-03-28  1:56     ` David S. Miller

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=20020309194515.B6626@fafner.intra.cogenit.fr \
    --to=romieu@cogenit.fr \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=fisaksen@bewan.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=maxk@qualcomm.com \
    --cc=mitch@sfgoth.com \
    --cc=rml@tech9.net \
    /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