.. | .. |
---|
800 | 800 | static int |
---|
801 | 801 | svc_stop_kthreads(struct svc_serv *serv, struct svc_pool *pool, int nrservs) |
---|
802 | 802 | { |
---|
| 803 | + struct svc_rqst *rqstp; |
---|
803 | 804 | struct task_struct *task; |
---|
804 | 805 | unsigned int state = serv->sv_nrthreads-1; |
---|
805 | 806 | |
---|
.. | .. |
---|
808 | 809 | task = choose_victim(serv, pool, &state); |
---|
809 | 810 | if (task == NULL) |
---|
810 | 811 | break; |
---|
811 | | - kthread_stop(task); |
---|
| 812 | + rqstp = kthread_data(task); |
---|
| 813 | + /* Did we lose a race to svo_function threadfn? */ |
---|
| 814 | + if (kthread_stop(task) == -EINTR) |
---|
| 815 | + svc_exit_thread(rqstp); |
---|
812 | 816 | nrservs++; |
---|
813 | 817 | } while (nrservs < 0); |
---|
814 | 818 | return 0; |
---|
.. | .. |
---|
991 | 995 | #endif |
---|
992 | 996 | } |
---|
993 | 997 | |
---|
994 | | - trace_svc_register(progname, version, protocol, port, family, error); |
---|
| 998 | + trace_svc_register(progname, version, family, protocol, port, error); |
---|
995 | 999 | return error; |
---|
996 | 1000 | } |
---|
997 | 1001 | |
---|