[systemd-devel] [Fwd: [PATCH] journal: fix dereferenced pointer in journal_file_rotate()]

shawn shawnlandden at gmail.com
Tue May 22 00:27:30 PDT 2012


On Tue, 2012-05-22 at 08:40 +0200, Sjoerd Simons wrote: 
> On Mon, 2012-05-21 at 21:35 -0700, shawn wrote:
> > > If journal_file_open() failed, due to (e.g.) -ENOSPC on open()
> > > new_file might still be NULL.
> > > 
> > > On error, leave pointer to the old JournalFile (now closed),
> > > and require caller to check for error approiately.
> > > 
> > > 	Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43020
> > > 	Reported-by: Sjoerd Simons <sjoerd at luon.net>
> 
> The bugzilla link seems wrong ? 
yes, I was looking at your patch, (via debian BTS) but I copied the url
wrong. (corrected patch attached) That is how I knew to forward it to
you. I read your patch, however there are many reasons other than ENOSPC
why open() could fail leaving a null pointer, and my patch takes care of
that. 
> 
> This actually remind me though, i did submit a patch for this issue to
> bugzilla (slightly different then your solution) more then a month ago.
> And a companion patch to not make the issue occur so easily, bugs filed
> here:
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=48688
> https://bugs.freedesktop.org/show_bug.cgi?id=48685
> 
> If the systemd bugzilla is just somewhat of a decoy i'm happy to repost
> the patches to the list ofcourse :)
Well the first patch I submitted to systemd bugzilla sure didn't get any
traction....


-- 
-Shawn Landden


More information about the systemd-devel mailing list