[LTP] [PATCH 3/3] netstress.c: convert to new library API

Cyril Hrubis
2017-01-23T14:57:34Z

Hi!
> shutdown(*fd, SHUT_WR);
> - SAFE_CLOSE(cleanup, *fd);
> + SAFE_CLOSE(*fd);
> *fd = -1;

FYI the SAFE_CLOSE() already sets fd to -1.

Otherwise it looks pretty much straightforward. I was concerned about
the cleanup, i.e. if the rest of the threads should be stopped before we
run it, but it looks like the worst case is 'use after free' in the
short period after of the threads enters cleanup via tst_brk() and
before it calls exit(), which does not sound that bad considering
something has failed anyway since we are most likely exitting with TBROK.

In short, acked.

--
Cyril Hrubis
chrubis@suse.cz