lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CBC3BE2.2020802@kernel.dk>
Date:	Mon, 18 Oct 2010 14:21:54 +0200
From:	Jens Axboe <axboe@...nel.dk>
To:	Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>
CC:	kosaki.motohiro@...fujitsu.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5] blk: fix a wrong accounting of hd_struct->in_flight

On 2010-10-18 14:19, Yasuaki Ishimatsu wrote:
> Hi Jens,
> 
> Jens Axboe wrote:
>> On 2010-10-18 10:28, Yasuaki Ishimatsu wrote:
>>> Hi Jens,
>>>
>>>> This looks good! To quiesce the queue, something like the below.
>>>> Completely untested.
>>> Thank you for your advice.
>>> I applied your idea to the patch.
>>
>> But you changed it, though:
>>
>>>  	if (old_ptbl) {
>>>  		rcu_assign_pointer(old_ptbl->last_lookup, NULL);
>>> +		spin_lock_irq(q->queue_lock);
>>> +		elv_quiesce_start(q);
>>>  		call_rcu(&old_ptbl->rcu_head, disk_free_ptbl_rcu_cb);
>>> +		elv_quiesce_end(q);
>>> +		spin_unlock_irq(q->queue_lock);
>>>  	}
>>>  }
>>
>> That is not going to work. The point is to start the drain period
>> before, then end it when the callback has gone through. By placing it
>> just after the call_rcu() call, there's no guarentee that the RCU grace
>> period has elapsed. That is why I placed it inside the rcu callback. Why
>> did you move it?
> 
> Ah...
> I misunderstood the purpose of the call_rcu().
> I moved elv_quiesce_end() to the rcu callback.

This version looks good, thanks for following through on this. What kind
of testing did you do?

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ