> + if (ccids[id] == NULL) {
> + ccids_read_unlock();
> + return request_module("net-dccp-ccid-%d", id);
> + }
> + ccids_read_unlock();
> + }
> + return 0;
> +}
> +
> +int ccid_request_modules(u8 const *ccid_array, u8 array_len)
> +{
> +#ifdef CONFIG_MODULES
> + while (array_len--)
> + if (ccid_request_module(ccid_array[array_len]))
> + return -1;
> +#endif
> + return 0;
> +}
> +
> struct ccid *ccid_new(unsigned char id, struct sock *sk, int rx, gfp_t gfp)
> {
> struct ccid_operations *ccid_ops;
> struct ccid *ccid = NULL;
>
> ccids_read_lock();
> -#ifdef CONFIG_MODULES
> - if (ccids[id] == NULL) {
> - /* We only try to load if in process context */
> - ccids_read_unlock();
> - if (gfp & GFP_ATOMIC)
> - goto out;
> - request_module("net-dccp-ccid-%d", id);
> - ccids_read_lock();
> - }
> -#endif
> ccid_ops = ccids[id];
> if (ccid_ops == NULL)
> goto out_unlock;
> --- a/net/dccp/feat.c
> +++ b/net/dccp/feat.c
> @@ -1163,6 +1163,11 @@ int dccp_feat_init(struct sock *sk)
> ccid_get_builtin_ccids(&rx.val, &rx.len))
> return -ENOBUFS;
>
> + /* Pre-load all CCID modules that are going to be advertised */
> + rc = -EUNATCH;
> + if (ccid_request_modules(tx.val, tx.len))
> + goto free_ccid_lists;
> +
> if (!dccp_feat_prefer(sysctl_dccp_feat_tx_ccid, tx.val, tx.len) ||
> !dccp_feat_prefer(sysctl_dccp_feat_rx_ccid, rx.val, rx.len))
> goto free_ccid_lists;
> --
> To unsubscribe from this list: send the line "unsubscribe dccp" in
> the body of a message to
majordomo@vger.kernel.org
> More majordomo info at
http://vger.kernel.org/majordomo-info.html