[Linux-stable-mirror] [added to the 4.1 stable tree] tcp: fix various issues for sockets morphing to listen state