From: Dave Jones <davej@redhat.com>
To: Oleg Drokin <green@linuxhacker.ru>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, mason@suse.com,
reiserfs-dev@namesys.com
Subject: Re: [PATCH] [2.6] Make reiserfs not to crash on oom
Date: Wed, 12 May 2004 19:01:45 +0100 [thread overview]
Message-ID: <20040512180145.GA1573@redhat.com> (raw)
In-Reply-To: <20040512165038.GA72981@linuxhacker.ru>
On Wed, May 12, 2004 at 07:50:38PM +0300, Oleg Drokin wrote:
> Hello!
>
> Thanks to Standford guys, a case where reiserfs can dereference NULL pointer
> if memory allocation fail during mount was identified.
>
> @@ -2260,8 +2260,10 @@
> INIT_LIST_HEAD (&SB_JOURNAL(p_s_sb)->j_prealloc_list);
> INIT_LIST_HEAD(&SB_JOURNAL(p_s_sb)->j_working_list);
> INIT_LIST_HEAD(&SB_JOURNAL(p_s_sb)->j_journal_list);
> - reiserfs_allocate_list_bitmaps(p_s_sb, SB_JOURNAL(p_s_sb)->j_list_bitmap,
> - SB_BMAP_NR(p_s_sb)) ;
> + if (reiserfs_allocate_list_bitmaps(p_s_sb,
> + SB_JOURNAL(p_s_sb)->j_list_bitmap,
> + SB_BMAP_NR(p_s_sb)))
> + goto free_and_return ;
> allocate_bitmap_nodes(p_s_sb) ;
Are you leaking the 'journal' allocation here?
(Ditto some of the other failure paths too)
There's also a typod 'jornal' a few lines further down.
Dave
next prev parent reply other threads:[~2004-05-12 18:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-12 16:50 Oleg Drokin
2004-05-12 18:01 ` Dave Jones [this message]
2004-05-12 18:20 ` Oleg Drokin
2004-05-12 18:22 ` Dave Jones
2004-05-12 18:31 ` Chris Mason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040512180145.GA1573@redhat.com \
--to=davej@redhat.com \
--cc=akpm@osdl.org \
--cc=green@linuxhacker.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mason@suse.com \
--cc=reiserfs-dev@namesys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®