Re: [PATCH 4/4] blk-mq: fix mq_usage_counter race when switching to percpu mode

2015-06-29 Thread Akinobu Mita
2015-06-24 21:35 GMT+09:00 Ming Lei : > On Sun, Jun 21, 2015 at 9:52 PM, Akinobu Mita wrote: >> percpu_ref_switch_to_percpu() and percpu_ref_kill() must not be >> executed at the same time as the following scenario is possible: >> >> 1. q->mq_usage_counter is initialized in atomic mode. >>(ato

Re: [PATCH 4/4] blk-mq: fix mq_usage_counter race when switching to percpu mode

2015-06-24 Thread Ming Lei
On Sun, Jun 21, 2015 at 9:52 PM, Akinobu Mita wrote: > percpu_ref_switch_to_percpu() and percpu_ref_kill() must not be > executed at the same time as the following scenario is possible: > > 1. q->mq_usage_counter is initialized in atomic mode. >(atomic counter: 1) > > 2. After the disk registr

[PATCH 4/4] blk-mq: fix mq_usage_counter race when switching to percpu mode

2015-06-21 Thread Akinobu Mita
percpu_ref_switch_to_percpu() and percpu_ref_kill() must not be executed at the same time as the following scenario is possible: 1. q->mq_usage_counter is initialized in atomic mode. (atomic counter: 1) 2. After the disk registration, a process like systemd-udev starts accessing the disk, a