[systemd-devel] [PATCH] journal: Don't hold pointers to journal while remapping

Lennart Poettering lennart at poettering.net
Wed Mar 14 09:58:11 PDT 2012


On Fri, 09.03.12 16:45, Marti Raudsepp (marti at juffo.org) wrote:

> Hi!
> 
> I was trying out the journal and the journalctl utility sometimes
> crashed on me. After some debugging, I tracked it down to the fact
> that next_with_matches() holds the "c" object pointer through the
> journal_file_next_entry_for_data() call -- which apparently may re-map
> the journal file, invalidating the pointer.
> 
> The attached patch fixes this crash for me, but being unfamiliar with
> the code, I don't know if I'm doing the right thing.

Looks right. Applied. Thanks a lot for tracking this down and fixing
it. Much appreciated!

Thanks,

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list