]> git.baikalelectronics.ru Git - kernel.git/commit
elevator: fix double release of elevator module
authorChao Yu <chao2.yu@samsung.com>
Thu, 23 Apr 2015 16:47:44 +0000 (10:47 -0600)
committerJens Axboe <axboe@fb.com>
Thu, 23 Apr 2015 16:47:44 +0000 (10:47 -0600)
commit2b87f8f89a816385fd424ee2755f8725da62c8dc
treeef5319354f305374ff5b67f2fbee019a1dc5c587
parentac87f9eec65c06702002a484cc512bd2344f0085
elevator: fix double release of elevator module

Our issue is descripted in below call path:
->elevator_init
 ->elevator_init_fn
  ->{cfq,deadline,noop}_init_queue
   ->elevator_alloc
    ->kzalloc_node
   fail to call kzalloc_node and then put module in elevator_alloc;
fail to call elevator_init_fn and then put module again in elevator_init.

Remove elevator_put invoking in error path of elevator_alloc to avoid
double release issue.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/elevator.c