Commit f9b89803 authored by Konstantin Baev's avatar Konstantin Baev

Update sources 2.6.27 - 2.6.28

Fix bug Eter#3626 (cifs kmem_cache_destroy problem)
parent 7c5e8691
...@@ -176,6 +176,7 @@ struct TCP_Server_Info { ...@@ -176,6 +176,7 @@ struct TCP_Server_Info {
struct mac_key mac_signing_key; struct mac_key mac_signing_key;
char ntlmv2_hash[16]; char ntlmv2_hash[16];
unsigned long lstrp; /* when we got last response from this server */ unsigned long lstrp; /* when we got last response from this server */
int running;
}; };
/* /*
......
...@@ -348,6 +348,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) ...@@ -348,6 +348,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
bool isMultiRsp; bool isMultiRsp;
int reconnect; int reconnect;
server->running = 1;
current->flags |= PF_MEMALLOC; current->flags |= PF_MEMALLOC;
cFYI(1, ("Demultiplex PID: %d", task_pid_nr(current))); cFYI(1, ("Demultiplex PID: %d", task_pid_nr(current)));
...@@ -759,6 +760,8 @@ multi_t2_fnd: ...@@ -759,6 +760,8 @@ multi_t2_fnd:
kfree(server->hostname); kfree(server->hostname);
task_to_wake = xchg(&server->tsk, NULL); task_to_wake = xchg(&server->tsk, NULL);
server->running = 0;
msleep(20);
kfree(server); kfree(server);
length = atomic_dec_return(&tcpSesAllocCount); length = atomic_dec_return(&tcpSesAllocCount);
...@@ -1420,6 +1423,9 @@ cifs_put_tcp_session(struct TCP_Server_Info *server) ...@@ -1420,6 +1423,9 @@ cifs_put_tcp_session(struct TCP_Server_Info *server)
task = xchg(&server->tsk, NULL); task = xchg(&server->tsk, NULL);
if (task) if (task)
force_sig(SIGKILL, task); force_sig(SIGKILL, task);
while(server->running == 1)
msleep(10);
} }
static struct cifsSesInfo * static struct cifsSesInfo *
......
...@@ -176,6 +176,7 @@ struct TCP_Server_Info { ...@@ -176,6 +176,7 @@ struct TCP_Server_Info {
struct mac_key mac_signing_key; struct mac_key mac_signing_key;
char ntlmv2_hash[16]; char ntlmv2_hash[16];
unsigned long lstrp; /* when we got last response from this server */ unsigned long lstrp; /* when we got last response from this server */
int running;
}; };
/* /*
......
...@@ -350,6 +350,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) ...@@ -350,6 +350,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
bool isMultiRsp; bool isMultiRsp;
int reconnect; int reconnect;
server->running = 1;
current->flags |= PF_MEMALLOC; current->flags |= PF_MEMALLOC;
cFYI(1, ("Demultiplex PID: %d", task_pid_nr(current))); cFYI(1, ("Demultiplex PID: %d", task_pid_nr(current)));
...@@ -760,6 +761,8 @@ multi_t2_fnd: ...@@ -760,6 +761,8 @@ multi_t2_fnd:
kfree(server->hostname); kfree(server->hostname);
task_to_wake = xchg(&server->tsk, NULL); task_to_wake = xchg(&server->tsk, NULL);
server->running = 0;
msleep(20);
kfree(server); kfree(server);
length = atomic_dec_return(&tcpSesAllocCount); length = atomic_dec_return(&tcpSesAllocCount);
...@@ -1427,6 +1430,9 @@ cifs_put_tcp_session(struct TCP_Server_Info *server) ...@@ -1427,6 +1430,9 @@ cifs_put_tcp_session(struct TCP_Server_Info *server)
task = xchg(&server->tsk, NULL); task = xchg(&server->tsk, NULL);
if (task) if (task)
force_sig(SIGKILL, task); force_sig(SIGKILL, task);
while(server->running == 1)
msleep(10);
} }
static struct cifsSesInfo * static struct cifsSesInfo *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment