Re: [PATCH] blkcg: add rcu lock to bio_clone_blkg_association()

2018-12-21 Thread Dennis Zhou
On Fri, Dec 21, 2018 at 08:26:02AM -0700, Jens Axboe wrote: > On 12/21/18 7:54 AM, Dennis Zhou wrote: > > I cleaned up blkg_tryget_closest() to require rcu_read_lock() earlier. > > However, this was a subtle case too which clearly was too subtle for me. > > The idea was the src bio should be holdin

Re: [PATCH] blkcg: add rcu lock to bio_clone_blkg_association()

2018-12-21 Thread Jens Axboe
On 12/21/18 10:02 AM, Dennis Zhou wrote: > On Fri, Dec 21, 2018 at 08:26:02AM -0700, Jens Axboe wrote: >> On 12/21/18 7:54 AM, Dennis Zhou wrote: >>> I cleaned up blkg_tryget_closest() to require rcu_read_lock() earlier. >>> However, this was a subtle case too which clearly was too subtle for me. >

Re: [PATCH] blkcg: add rcu lock to bio_clone_blkg_association()

2018-12-21 Thread Jens Axboe
On 12/21/18 7:54 AM, Dennis Zhou wrote: > I cleaned up blkg_tryget_closest() to require rcu_read_lock() earlier. > However, this was a subtle case too which clearly was too subtle for me. > The idea was the src bio should be holding a ref to the blkg so rcu > wasn't technically needed. If it doesn'

[PATCH] blkcg: add rcu lock to bio_clone_blkg_association()

2018-12-21 Thread Dennis Zhou
I cleaned up blkg_tryget_closest() to require rcu_read_lock() earlier. However, this was a subtle case too which clearly was too subtle for me. The idea was the src bio should be holding a ref to the blkg so rcu wasn't technically needed. If it doesn't hold a ref, it should be %NULL and the blkg->p