diff options
author | Jonathan T. Looney <jtl@FreeBSD.org> | 2018-04-06 17:20:37 +0000 |
---|---|---|
committer | Jonathan T. Looney <jtl@FreeBSD.org> | 2018-04-06 17:20:37 +0000 |
commit | 8fa799bd74f25e9963ae0b7b5530ac13ae96367a (patch) | |
tree | 3d9770ffbdb8d0f8ac42b76610b5c9bbf5907b12 /sys/kern/pic_if.m | |
parent | 047a2ef6974e4c0ab7b02b6c346f7199983fb0bd (diff) |
If a user closes the socket before we call tcp_usr_abort(), then
tcp_drop() may unlock the INP. Currently, tcp_usr_abort() does not
check for this case, which results in a panic while trying to unlock
the already-unlocked INP (not to mention, a use-after-free violation).
Make tcp_usr_abort() check the return value of tcp_drop(). In the case
where tcp_drop() returns NULL, tcp_usr_abort() can skip further steps
to abort the connection and simply unlock the INP_INFO lock prior to
returning.
Reviewed by: glebius
MFC after: 2 weeks
Sponsored by: Netflix, Inc.
Notes
Notes:
svn path=/head/; revision=332120
Diffstat (limited to 'sys/kern/pic_if.m')
0 files changed, 0 insertions, 0 deletions