summaryrefslogtreecommitdiff
path: root/geoip.c
AgeCommit message (Expand)AuthorFilesLines
2013-05-12geoip: Don't leak file/socket descriptor in error caseTobias Klauser1-4/+10
2013-03-16build: respect PREFIX_STRING on config file locationsDaniel Borkmann1-7/+7
2013-03-16geoip: reorder statements, so that file handles are closed firstDaniel Borkmann1-4/+3
2013-03-16geoip: make sure we null-terminate after readDaniel Borkmann1-0/+2
2013-03-15all: import netsniff-ng 0.5.8-rc0 sourceDaniel Borkmann1-0/+595
-next.git/diff/?h=nds-private-remove&id=96a988ffeb90dba33a71c3826086fe67c897a183&id2=53e0e11efe9289535b060a51d4cf37c25e0d0f2b'>diff)
CIFS: Fix a possible double locking of mutex during reconnect
With the current code it is possible to lock a mutex twice when a subsequent reconnects are triggered. On the 1st reconnect we reconnect sessions and tcons and then persistent file handles. If the 2nd reconnect happens during the reconnecting of persistent file handles then the following sequence of calls is observed: cifs_reopen_file -> SMB2_open -> small_smb2_init -> smb2_reconnect -> cifs_reopen_persistent_file_handles -> cifs_reopen_file (again!). So, we are trying to acquire the same cfile->fh_mutex twice which is wrong. Fix this by moving reconnecting of persistent handles to the delayed work (smb2_reconnect_server) and submitting this work every time we reconnect tcon in SMB2 commands handling codepath. This can also lead to corruption of a temporary file list in cifs_reopen_persistent_file_handles() because we can recursively call this function twice. Cc: Stable <stable@vger.kernel.org> # v4.9+ Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat