[systemd-devel] [systemd-commits] TODO
David Herrmann
dh.herrmann at gmail.com
Wed Apr 29 07:23:21 PDT 2015
Hi
On Wed, Apr 29, 2015 at 2:25 PM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:
> On Wed, Apr 29, 2015 at 11:51:18AM +0200, Martin Pitt wrote:
>> Hello all,
>>
>> Lennart Poettering [2015-04-28 17:48 +0200]:
>> > Hmm, so, anyone found out anything useful about this? None of the
>> > links above has anything useful really. I have never seen this issue
>> > myself, so I kinda am relying on input from those who experiencing
>> > this.
>> >
>> > Is this still an issue with current, unpatched git (which has fsckd
>> > removed among other changes).
>>
>> Good news! I restarted my Reboot Loop Smoke Test Of Doom, and git
>> master indeed seems fine. So a git bisect run [1] and a few hours
>> later tells me that apparently
>> http://cgit.freedesktop.org/systemd/systemd/commit/?id=64144440 fixes
>> this for good. Thanks to Zbigniew and Coverity! :-)
> As I wrote in the commit message, I didn't see anything wrong in the
> original code. But if you say it helps... I don't mind.
Original code did this (simplified):
msg_control = alloca(CMSG_SPACE(cred) + CMSG_SPACE(fds));
msg_controllen = CMSG_LEN(fds);
...
msg_controllen += CMSG_LEN(cred);
However, this is _wrong_. "msg_controllen" is the sum of all
CMSG_SPACE(), not CMSG_LEN(). The latter doesn't add alignment to the
length of the payload.
The new code correctly uses CMSG_SPACE(), probably by accident.
Thanks
David
More information about the systemd-devel
mailing list