Do not free io context when taking recursive faults in do_exit
authorNikanth Karthikesan <knikanth@suse.de>
Wed, 19 Nov 2008 09:20:23 +0000 (10:20 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 29 Dec 2008 07:28:43 +0000 (08:28 +0100)
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.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
kernel/exit.c

index c7422ca920382b47445ace263bdba0fe6fbf6bf8..9a213474f54aa608d682380d24f5cc9d85b77efb 100644 (file)
@@ -1037,8 +1037,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();
        }