]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stream-int: always reset si->ops when si->end is nullified
authorWilly Tarreau <w@1wt.eu>
Sun, 19 Apr 2015 23:03:17 +0000 (01:03 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 21 Apr 2015 12:15:22 +0000 (14:15 +0200)
commit7365dad40f977a1535a2cea3963a3b1098da813a
treebbed39d5e426751edaf6429fcef3abf9d3415f57
parent152b81e7b2565862956af883820d4f79177d0651
BUG/MEDIUM: stream-int: always reset si->ops when si->end is nullified

It happened after changing the stream interface deinitialization
sequence that we got random crashes with si_shutw() being called
on NULL si->end. The reason was that si->ops was not reset after
a call to si_release_endpoint() which is sometimes called directly.

Thus we now move the resetting of si->ops just after any si->end
assignment. It happens that si_detach() is now just the same as
si_release_endpoint() and stream_int_unregister_handler(). Some
cleanup will have to be performed there.

It's not sure whether this problem can impact 1.5 since in 1.5
applets are part of the default embedded stream handler. The only
way it could cause some trouble is if it's used with a connection,
which doesn't seem possible at first glance.
include/proto/stream_interface.h