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]
Date:	Mon, 18 Apr 2011 12:38:40 +0530
From:	Raghavendra D Prabhu <rprabhu@...hang.net>
To:	Dave Chinner <david@...morbit.com>
Cc:	linux-mm@...ck.org, Artem Bityutskiy <Artem.Bityutskiy@...ia.com>,
	Jens Axboe <jaxboe@...ionio.com>,
	Christoph Hellwig <hch@....de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [TOME] Re: [PATCH 1/1] Add check for dirty_writeback_interval in
 bdi_wakeup_thread_delayed

* On Mon, Apr 18, 2011 at 10:02:04AM +1000, Dave Chinner <david@...morbit.com> wrote:
>On Sun, Apr 17, 2011 at 09:53:08PM +0530, Raghavendra D Prabhu wrote:
>> In the function bdi_wakeup_thread_delayed, no checks are performed on
>> dirty_writeback_interval unlike other places and timeout is being set to
>> zero as result, thus defeating the purpose. So, I have changed it to be
>> passed default value of interval which is 500 centiseconds, when it is
>> set to zero.
>> I have also verified this and tested it.

>> Signed-off-by: Raghavendra D Prabhu <rprabhu@...hang.net>
>> ---
>>  mm/backing-dev.c |    5 ++++-
>>  1 files changed, 4 insertions(+), 1 deletions(-)

>> diff --git a/mm/backing-dev.c b/mm/backing-dev.c
>> index befc875..d06533c 100644
>> --- a/mm/backing-dev.c
>> +++ b/mm/backing-dev.c
>> @@ -336,7 +336,10 @@ void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi)
>>  {
>>  	unsigned long timeout;
>> -	timeout = msecs_to_jiffies(dirty_writeback_interval * 10);
>> +	if (dirty_writeback_interval)
>> +		timeout = msecs_to_jiffies(dirty_writeback_interval * 10);
>> +	else
>> +		timeout = msecs_to_jiffies(5000);
>>  	mod_timer(&bdi->wb.wakeup_timer, jiffies + timeout);
>>  }
>
>Isn't the problem that the sysctl handler does not have a min/max
>valid value set? I.e. to prevent invalid values from being set in
>the first place?
>
>Cheers,
>
>Dave.
0 is a valid value for dirty_writeback_interval which according to the
definition/documentation is disabled when set to 0. In other places, a constraint
check is done on that value except here.

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ