mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frode Isaksen <fisaksen@bewan.com>
To: mitch@sfgoth.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] spinlock not locked when unlocking in atm_dev_register
Date: Fri, 1 Mar 2002 18:46:28 +0100	[thread overview]
Message-ID: <20020301163936.7FA725F963@postfix2-2.free.fr> (raw)

If you compile the kernel with SMP and spinlock debugging, BUG() will be 
called when registering your atm driver, since the "atm_dev_lock" spinlock is 
not locked when unlocking it.

kernel 2.4.18

Regards,
Frode

--- resources.c.orig	Fri Mar  1 18:34:02 2002
+++ resources.c	Fri Mar  1 18:34:17 2002
@@ -110,12 +110,10 @@
 		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);
 			return NULL;
 		}
 #endif
-	spin_unlock (&atm_dev_lock);		
 	return dev;
 }

             reply	other threads:[~2002-03-01 16:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-01 17:46 Frode Isaksen [this message]
2002-03-01 22:15 ` Robert Love
2002-03-04  8:29   ` Frode Isaksen
2002-03-04 18:58     ` Robert Love
2002-03-01 22:32 ` Maksim Krasnyanskiy
2002-03-01 22:38   ` David S. Miller
2002-03-01 23:06   ` Mitchell Blank Jr
2002-03-02  0:28   ` Maksim Krasnyanskiy
2002-03-01 22:35 ` Robert Love
2002-03-01 22:48   ` How to get kernel data using /proc system? Lei Wang

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=20020301163936.7FA725F963@postfix2-2.free.fr \
    --to=fisaksen@bewan.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mitch@sfgoth.com \
    /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

all inboxes | Powered by JetHome®