[Ocf-linux-users] Problem compiling with 2.6.27
Brought to you by:
david-m
|
From: Marco <mar...@gm...> - 2008-12-23 17:12:40
|
Hi,
mot a serious problem but the function kill_proc is not present anymore.
I propose to modify the function crypto_exit in the crypto.c:
--- crypto_orig.c 2008-07-03 02:58:33.000000000 +0200
+++ crypto.c 2008-12-23 17:27:22.000000000 +0100
@@ -1673,6 +1673,11 @@
{
pid_t p;
unsigned long d_flags;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)
+ struct pid *cryptoproc_pid;
+ struct pid *cryptoretproc_pid;
+#endif
+
dprintk("%s()\n", __FUNCTION__);
@@ -1683,7 +1688,13 @@
CRYPTO_DRIVER_LOCK();
p = cryptoproc;
cryptoproc = (pid_t) -1;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)
+ cryptoproc_pid = find_get_pid(p);
+ if(cryptoproc_pid)
+ kill_pid(cryptoproc_pid, SIGTERM, 1);
+#else
kill_proc(p, SIGTERM, 1);
+#endif
wake_up_interruptible(&cryptoproc_wait);
CRYPTO_DRIVER_UNLOCK();
@@ -1692,7 +1703,13 @@
CRYPTO_DRIVER_LOCK();
p = cryptoretproc;
cryptoretproc = (pid_t) -1;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)
+ cryptoretproc_pid = find_get_pid(p);
+ if(cryptoretproc_pid)
+ kill_pid(cryptoretproc_pid, SIGTERM, 1);
+#else
kill_proc(p, SIGTERM, 1);
+#endif
wake_up_interruptible(&cryptoretproc_wait);
CRYPTO_DRIVER_UNLOCK();
Regards,
Marco
|