Re: [PATCH/RFC] New module refcounting for net_proto_family

From: Roman Zippel (zippel@linux-m68k.org)
Date: Wed Feb 19 2003 - 15:31:58 EST


Hi,

On Tue, 18 Feb 2003, David S. Miller wrote:

> Firstly, the owner field should probably be in struct proto_ops not
> struct socket, where the function pointers are.
>
> I think this is one of Alexey's main problems with the
> patch.

BTW the access to sockets_in_use is not preempt safe. Although the data
has only statistic value, it might be worth to fix this. The easiest
solution might be to move socket allocation and the create call outside
the net_family lock. The read lock should at least get a preempt enable/
disable (brlock might be another possibilty) and within this lock we can
safely modify sockets_in_use and do something like net_family_get()/
net_family_put() similiar to get_fs_type().

bye, Roman

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



This archive was generated by hypermail 2b29 : Sun Feb 23 2003 - 22:00:26 EST