Date: Sun, 12 Aug 2007 23:30:07 GMT From: "Timur I. Bakeyev" <timur@freebsd.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/115430: [rpc.statd] rpc.statd core dumps if unable to mmap() /var/db/statd.status file Message-ID: <200708122330.l7CNU72E001747@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/115430; it has been noted by GNATS. From: "Timur I. Bakeyev" <timur@freebsd.org> To: bug-followup@freebsd.org Cc: truckman@freebsd.org, Maxim Konovalov <maxim@macomnet.ru> Subject: Re: bin/115430: [rpc.statd] rpc.statd core dumps if unable to mmap() /var/db/statd.status file Date: Mon, 13 Aug 2007 00:24:08 +0200 On Sun, Aug 12, 2007 at 09:52:04PM +0000, truckman@FreeBSD.org wrote: > Synopsis: [rpc.statd] rpc.statd core dumps if unable to mmap() /var/db/statd.status file > > State-Changed-Why: > The mmap() failure is fixed in: > usr.sbin/rpc.statd/statd.c 1.15 (Sun Aug 5 16:33:06 2007 UTC) - HEAD > usr.sbin/rpc.statd/statd.c 1.12.8.2 (Sun Aug 12 01:46:19 2007 UTC) - RELENG_6 No, I don't think the bug is fixed. Your fix addressed the reason why mmap() fails to me, thanks. But the errorneous execution flow in a file.c still in place - should, by any other reason, mmap() fails for rpc.statd again - we'll get another perfect coredump to fix. Patching code around the faulty condition to prevent it to be trigged is never safe - it'll always be another reason for it to fail. If you so confident that your fix makes it impossible for mmap() to fail in the init_file() - replace: warn("unable to mmap() status file"); with err(). Still I prefer cleaner solution, which just doesn't try to dereference bogus pointer. Regards, Timur.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708122330.l7CNU72E001747>