Problem with latest kernel
Hello,
If you use the latest version of Acronis on linuw with latest kernel (>3.7), the module snapapi26 will not load correctly with saying a problem with kernel_thread.
The problem is that kernel_thread not exist anymore.
I've created a patch to avoid this problem. Maybe this patch is not correct but it works.
For Acronis, when will you release a new version for latest kernel ?
Thanks.
Regards,
Alessandro
This is a patch for snapapi26-0.7.69 :
--- snapapi26.c.old 2013-04-24 01:07:50.000000000 +0200
+++ snapapi26.c 2013-06-05 16:28:32.854930673 +0200
@@ -2172,12 +2172,21 @@
static int start_req_handler_thread(struct session_struct *s)
{
int ret;
-
- ret = kernel_thread(pending_req_handler_thread, s, CLONE_KERNEL);
- if (ret < 0) {
- sa_debug(DEBUG_API, "Can't create thread err=%d.\n", ret);
- return ret;
- }
+ #ifndef USE_KERNEL_THREAD
+ ret = kthread_create(pending_req_handler_thread, s, "snapapid-th");
+ if (IS_ERR(ret)) {
+ ret = IS_ERR(ret);
+ sa_debug(DEBUG_API, "Can't create thread err=%d.\n", ret);
+ return ret;
+ }
+ wake_up_process(ret);
+ #else
+ ret = kernel_thread(pending_req_handler_thread, s, CLONE_KERNEL);
+ if (ret < 0) {
+ sa_debug(DEBUG_API, "Can't create thread err=%d.\n", ret);
+ return ret;
+ }
+ #endif
wait_for_completion(&s->s_pending_queue.pq_done);
return 0;
}

- Log in to post comments