Message ID | 20200508123035.271450729@linuxfoundation.org |
---|---|
State | New |
Headers | show |
Series | None | expand |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 697edc92dff27..58e7288e5151c 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -348,8 +348,10 @@ static int reconn_set_ipaddr(struct TCP_Server_Info *server) return rc; } + spin_lock(&cifs_tcp_ses_lock); rc = cifs_convert_address((struct sockaddr *)&server->dstaddr, ipaddr, strlen(ipaddr)); + spin_unlock(&cifs_tcp_ses_lock); kfree(ipaddr); return !rc ? -1 : 0;