Skip to contentSkip to conversation

Do not free io context when taking recursive faults in do_exit

PATCH In review Nikanth Karthikesan 2 participants 2 messages Nov 19, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Do not free io context when taking recursive faults in do_exit

When taking recursive faults in do_exit, if the io_context is not null, exit_io_context() is being called. But it might decrement the refcount more than once. It is better to leave this task alone.

---

kernel/exit.c +0 -2
index 80137a5..22dedf5 100644
@@ -1024,8 +1024,6 @@ NORET_TYPE void do_exit(long code)
 		 * task into the wait for ever nirwana as well.
 		 */
 		tsk->flags |= PF_EXITPIDONE;
-		if (tsk->io_context)
-			exit_io_context();
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		schedule();
 	}
#1 lore raw
Quoted 3 lines · Nikanth Karthikesan

When taking recursive faults in do_exit, if the io_context is not null, exit_io_context() is being called. But it might decrement the refcount more than once. It is better to leave this task alone.

Agree, it's better to just leave that alone. Applied to for-2.6.29.

Signature · 1 line
Jens Axboe