Skip to contentSkip to conversation

ring_info spinlock initialization

PATCH In review FabF 2 participants 4 messages May 21, 2004 – May 22, 2004

lore
Share & tools
lore

FabF

author
#0 lore raw

PATCH 1/1 ring_info spinlock initialization

Hi,
ring_info spinlock was not initialized in INIT_KIOCTX.

Regards,
FabF

include/linux/init_task.h +1 -0
diff -Naur orig/include/linux/init_task.h edited/include/linux/init_task.h
@@ -29,6 +29,7 @@
 	.ctx_lock	= SPIN_LOCK_UNLOCKED,		\
 	.reqs_active	= 0U,				\
 	.max_reqs	= ~0U,				\
+	.ring_info.ring_lock = SPIN_LOCK_UNLOCKED	\
 }
 
 #define INIT_MM(name) \
#1 lore raw
Quoted 2 lines · FabF

Hi,
ring_info spinlock was not initialized in INIT_KIOCTX.

Shouldn't something have caught that?

Zwane

author
#2 lore raw
Quoted 6 lines · Zwane Mwaikambo
Quoted 2 lines · FabF

Hi,
ring_info spinlock was not initialized in INIT_KIOCTX.

Shouldn't something have caught that?

aio stuff is the only place which doesn't use INIT_KIOCTX and does explicitely that initialization so I guess this patch is needed ...

Quoted 4 lines

Zwane

author
#3 lore raw
In reply to Zwane Mwaikambo
Quoted 6 lines · Zwane Mwaikambo
Quoted 2 lines · FabF

Hi,
ring_info spinlock was not initialized in INIT_KIOCTX.

Shouldn't something have caught that?

Zwane,
Did you find something about that thread ? I don't see anything
relevant in mm5 :(

Regards,
FabF

Quoted 4 lines

Zwane

include/linux/init_task.h +1 -0
diff -Naur orig/include/linux/init_task.h edited/include/linux/init_task.h
@@ -29,6 +29,7 @@
 	.ctx_lock	= SPIN_LOCK_UNLOCKED,		\
 	.reqs_active	= 0U,				\
 	.max_reqs	= ~0U,				\
+	.ring_info.ring_lock = SPIN_LOCK_UNLOCKED	\
 }
 
 #define INIT_MM(name) \