lkml.org 
[lkml]   [2004]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: dqout dereference bug
  Yes, the patch is right. The case sb == NULL should not happen but
it's always good to have clean code :). Linus/Andrew please apply.

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


--- linux-2.6.5/fs/dquot.c~ 2004-04-16 22:30:05.000000000 +0100
+++ linux-2.6.5/fs/dquot.c 2004-04-16 22:30:48.000000000 +0100
@@ -1145,11 +1145,13 @@
int vfs_quota_off(struct super_block *sb, int type)
{
int cnt;
- struct quota_info *dqopt = sb_dqopt(sb);
+ struct quota_info *dqopt;

if (!sb)
goto out;

+ dqopt = sb_dqopt(sb);
+
/* We need to serialize quota_off() for device */
down(&dqopt->dqonoff_sem);
for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
-
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 14:02    [W:0.058 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site