lkml.org 
[lkml]   [2001]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] 2.5.1-pre3 fix error in drivers/block/rd.c
Date
From
Linus,

I think someone made a very silly mistake which this patchlet fixes.
Taking a spinlock and returning from a function before releasing it...

Best regards,

Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/

--- linux-2.5.1-pre3-vanilla/drivers/block/rd.c.old Thu Nov 29 00:34:17 2001
+++ linux-2.5.1-pre3-vanilla/drivers/block/rd.c Thu Nov 29 00:35:03 2001
@@ -437,9 +437,9 @@

#ifdef CONFIG_BLK_DEV_INITRD
if (unit == INITRD_MINOR) {
+ if (!initrd_start) return -ENODEV;
spin_lock( &initrd_users_lock );
initrd_users++;
- if (!initrd_start) return -ENODEV;
spin_unlock( &initrd_users_lock );
filp->f_op = &initrd_fops;
return 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.043 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site