mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andres Salomon <dilinger@mp3revolution.net>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.5.44 device_add double up() of device_sem
Date: Sat, 19 Oct 2002 03:27:27 -0400	[thread overview]
Message-ID: <20021019072727.GA3981@chunk.voxel.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 277 bytes --]

I noticed this while tracking down an oops.  If there's any sort of
error in device_add(), register_done is jumped to.  At that point,
device_sem is up()'d twice.  This patch fixes that.


-- 
It's not denial.  I'm just selective about the reality I accept.
	-- Bill Watterson

[-- Attachment #2: core.c.diff --]
[-- Type: text/plain, Size: 326 bytes --]

--- a/drivers/base/core.c	2002-10-19 02:45:26.000000000 -0400
+++ b/drivers/base/core.c	2002-10-19 03:07:35.000000000 -0400
@@ -59,7 +59,7 @@
 	devclass_add_device(dev);
  register_done:
 	if (error) {
-		up(&device_sem);
+		down(&device_sem);
 		list_del_init(&dev->g_list);
 		list_del_init(&dev->node);
 		up(&device_sem);

                 reply	other threads:[~2002-10-19  7:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20021019072727.GA3981@chunk.voxel.net \
    --to=dilinger@mp3revolution.net \
    --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

all inboxes | Powered by JetHome®