* dqout dereference bug
@ 2004-04-16 21:32 Dave Jones
2004-04-19 13:11 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Dave Jones @ 2004-04-16 21:32 UTC (permalink / raw)
To: Linux Kernel; +Cc: jack
--- 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++) {
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: dqout dereference bug
2004-04-16 21:32 dqout dereference bug Dave Jones
@ 2004-04-19 13:11 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2004-04-19 13:11 UTC (permalink / raw)
To: Dave Jones, Linux Kernel, akpm, torvalds
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++) {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-04-19 13:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-16 21:32 dqout dereference bug Dave Jones
2004-04-19 13:11 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox