[OpenWrt-Devel] [PATCH, v2] procd sysupgrade: close input side of pipe before reading

Rafał Miłecki zajec5 at gmail.com
Mon Oct 28 18:03:53 EDT 2019


On Mon, 28 Oct 2019 at 17:52, Dustin Lundquist
<D.Lundquist at temperednetworks.com> wrote:
> > On Oct 27, 2019, at 6:44 AM, Rafał Miłecki <zajec5 at gmail.com> wrote:
> >
> > You also need to drop close(fds[1]); that is placed inside the "if
> > (!tok)" block.
>
>
> When /usr/libexec/validate_firmware_image is not present on the system
> procd will hang indefinitely on the read() since the input side of the
> pipe is still open.
>
> Also fix pipe file descriptor leak when fork() fails.
>
> Signed-off-by: Dustin Lundquist <d.lundquist at temperednetworks.com>

Thanks!

Acked-by: Rafał Miłecki <rafal at milecki.pl>

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list