Re: 2.6.0-test6 crash while reading files in /proc/fs/reiserfs/sda1

From: Nikita Danilov
Date: Thu Oct 02 2003 - 10:41:45 EST


viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx writes:
> [Linus, please wait with applying the patch below until ACK from Nikita, OK?]
>

[...]

>
>
> If you are OK with the patch below - please ACK it. AFAICS it's the minimal
> fix and combined with optimistic sget() patch it should address all objections.

Yes, it works (cum optimistic sget()).

>
> diff -urN B6-rest/fs/reiserfs/procfs.c B6-current/fs/reiserfs/procfs.c
> --- B6-rest/fs/reiserfs/procfs.c Sat Sep 27 22:04:57 2003
> +++ B6-current/fs/reiserfs/procfs.c Thu Oct 2 07:57:31 2003
> @@ -478,14 +478,15 @@
> static void *r_next(struct seq_file *m, void *v, loff_t *pos)
> {
> ++*pos;
> + if (v)
> + deactivate_super(v);
> return NULL;
> }
>
> static void r_stop(struct seq_file *m, void *v)
> {
> - struct proc_dir_entry *de = m->private;
> - struct super_block *s = de->data;
> - deactivate_super(s);
> + if (v)
> + deactivate_super(v);
> }
>
> static int r_show(struct seq_file *m, void *v)

Nikita.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/