Re: [Lksctp-developers] __unsafe() usage

From: Vlad Yasevich
Date: Tue Jul 24 2007 - 09:22:42 EST


Rusty Russell wrote:
>
[... snip ...]

> diff -r d7af727512fd net/sctp/protocol.c
> --- a/net/sctp/protocol.c Tue Jul 24 08:30:05 2007 +1000
> +++ b/net/sctp/protocol.c Tue Jul 24 09:12:43 2007 +1000
> @@ -1176,7 +1176,6 @@ SCTP_STATIC __init int sctp_init(void)
> if (status)
> goto err_v6_add_protocol;
>
> - __unsafe(THIS_MODULE);
> status = 0;
> out:
> return status;
> @@ -1216,6 +1215,7 @@ err_chunk_cachep:
> goto out;
> }
>
> +#if 0
> /* Exit handler for the SCTP protocol. */
> SCTP_STATIC __exit void sctp_exit(void)
> {
> @@ -1263,9 +1263,10 @@ SCTP_STATIC __exit void sctp_exit(void)
>
> proto_unregister(&sctp_prot);
> }
> +module_exit(sctp_exit);
> +#endif
>
> module_init(sctp_init);
> -module_exit(sctp_exit);
>

Please don't remove module_exit point for SCTP. Simply removing the __unsafe() call will
be sufficient.

The code has recently been cleaned up to allow safe unloading and I working on final
cleanups. It currently works correctly with forced unloading.

Thanks

-vlad

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/