[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20080802033048.GA3758@martell.zuzino.mipt.ru>
Date: Sat, 2 Aug 2008 07:30:48 +0400
From: Alexey Dobriyan <adobriyan@...il.com>
To: viro@...iv.linux.org.uk
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] proc: inode number fixlet
Ouch, if number taken from IDA is too big, the intent was to signal an
error, not check for overflow and still do overflowing addition.
One still needs 2^28 proc entries to notice this.
Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
---
fs/proc/generic.c | 1 +
1 file changed, 1 insertion(+)
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -330,6 +330,7 @@ retry:
spin_lock(&proc_inum_lock);
ida_remove(&proc_inum_ida, i);
spin_unlock(&proc_inum_lock);
+ return 0;
}
return PROC_DYNAMIC_FIRST + i;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists