freebsd-dev/sys/geom/gate
Mikolaj Golub baf63f65ae In g_gate_create() there is a window between when g_gate_softc is
registered in g_gate_units array and when its sc_provider field is
filled. If during this period g_gate_units is accessed by another
thread that is checking for provider name collision the crash is
possible.

Fix this by adding sc_name field to struct g_gate_softc. In
g_gate_create() when g_gate_softc is created but sc_provider is still
not sc_name points to provider name stored in the local array.

Approved by:	pjd (mentor)
Reported by:	Freddie Cash <fjwcash@gmail.com>
MFC after:	1 week
2011-03-27 19:56:55 +00:00
..
g_gate.c In g_gate_create() there is a window between when g_gate_softc is 2011-03-27 19:56:55 +00:00
g_gate.h In g_gate_create() there is a window between when g_gate_softc is 2011-03-27 19:56:55 +00:00