lkml.org 
[lkml]   [2001]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectLooback bugfix
  Hello,

I'm sending you a patch which should fix bug in loopback device - it
allows you to setup loopback /dev/loop0 -> /dev/loop0 with very unpleasant
(hard deadlock) results. The patch is against 2.4.16 but should apply well
against 2.5.0 too. Could oth of you apply the patch please?

Bye

Honza

--
Jan Kara <jack@suse.cz>
SuSE CR Labs

------- <cut> ---------

diff -ruX /home/jack/.kerndiffexclude linux-2.4.16/drivers/block/loop.c linux-2.4.16-loopfix/drivers/block/loop.c
--- linux-2.4.16/drivers/block/loop.c Mon Nov 19 23:48:02 2001
+++ linux-2.4.16-loopfix/drivers/block/loop.c Sat Dec 1 00:07:39 2001
@@ -640,6 +640,10 @@

if (S_ISBLK(inode->i_mode)) {
lo_device = inode->i_rdev;
+ if (lo_device == dev) {
+ error = -EBUSY;
+ goto out;
+ }
} else if (S_ISREG(inode->i_mode)) {
struct address_space_operations *aops = inode->i_mapping->a_ops;
/*
-
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:18    [W:0.023 / U:3.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site