[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e2d7436a0812130555r52422bel1dd9b66ba8479e2a@mail.gmail.com>
Date: Sat, 13 Dec 2008 14:55:05 +0100
From: "Michał Mirosław" <mirqus@...il.com>
To: "Gerrit Renker" <gerrit@....abdn.ac.uk>
Cc: davem@...emloft.net, dccp@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation
2008/12/13 Gerrit Renker <gerrit@....abdn.ac.uk>:
> +/**
> + * ccid_request_module - Pre-load CCID module for later use
> + * This should be called only from process context (e.g. during connection
> + * setup) and is necessary for later calls to ccid_new (typically in software
> + * interrupt), so that it has the modules available when they are needed.
> + */
> +static int ccid_request_module(u8 id)
> +{
> + if (!in_atomic()) {
> + ccids_read_lock();
> + if (ccids[id] == NULL) {
> + ccids_read_unlock();
> + return request_module("net-dccp-ccid-%d", id);
> + }
> + ccids_read_unlock();
> + }
> + return 0;
> +}
Just a random thought: does this lock really do anything useful here?
Best Regards,
Michał Mirosław
Powered by blists - more mailing lists