Jivin Marco lays it down ...
> 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:
Thanks for the patch, I'll keep that around.
I knew about this problem but I haven't had to move up to 2.6.27 or later yet,
so I hadn't worked out a fix yet or done a release.
If possible, I usually try and use the latest API (ie struct pid) and
then handle old kernels by emulating the new API in compat.h. Not
always possible though :-(
On a quick check it looks like kill_pid and friends are GPL only
symbols. This will be a problem for OCF which is BSD licensed :-(
Cheers,
Davidm
> --- 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
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Ocf-linux-users mailing list
> Ocf...@li...
> https://lists.sourceforge.net/lists/listinfo/ocf-linux-users
>
--
David McCullough, dav...@se..., Ph:+61 734352815
Secure Computing - SnapGear http://www.uCdot.org http://www.snapgear.com
|