| > +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?
|
Reading the (shared) 'ccids' array is the solution chosen to check whether
the module for CCID with number 'id' is already loaded.
It would be bad to call request_module() each time a new DCCP socket is
opened. Using the 'ccids' array may not be the only way to check whether
a given module (whose name depends on the value of 'id') is loaded.
But if this solution is chosen, then it requires to protect the read
access to 'ccids', which is shared among all DCCP sockets.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| David Woodhouse | [GIT *] Allow request_firmware() to be satisfied from in-kernel, use it in more dr... |
| Philipp Marek | Re: sys_chroot+sys_fchdir Fix |
| Greg Kroah-Hartman | [PATCH 008/196] Chinese: add translation of volatile-considered-harmful.txt |
git: | |
| Krishna Kumar | [PATCH 9/10 REV5] [IPoIB] Implement batching |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
