MINOR: fd: Add BUG_ON checks on fd_insert()
This patch adds two BUG_ON on fd_insert() into the fdtab checking
if the fd has been correctly re-initialized into the fdtab
before a new insert.
It will raise a BUG if we try to insert the same fd multiple times
without an intermediate fd_delete().
First one checks that the owner for this fd in fdtab was reset to NULL.
Second one checks that the state flags for this fd in fdtab was reset
to 0.
This patch could be backported on version >= 2.4
(cherry picked from commit 36d9097cf3cc7ecace0b650db66055c606cd67e0)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit e6708064103ce0677de0ec688eff5c37b76d1dc9)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 1fe51d2628ae398bc16ff5de6c5fc4cde277c45d)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed