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: <87ljc7egil.fsf@openvz.org>
Date:	Wed, 28 Apr 2010 19:36:02 +0400
From:	Dmitry Monakhov <dmonakhov@...nvz.org>
To:	Vivek Goyal <vgoyal@...hat.com>
Cc:	linux-kernel@...r.kernel.org, jens.axboe@...cle.com
Subject: Re: CFQ is broken for CONFIG_BLK_CGROUP=y, CFQ_GROUP_IOSCHED=n

Vivek Goyal <vgoyal@...hat.com> writes:

> On Wed, Apr 28, 2010 at 04:44:51PM +0400, Dmitry Monakhov wrote:
>> 
>> I've had an  oops on kernel boot due to NULL pointer deference
>> linux-2.6-block/for-next HEAD:7eaed1226ab411ee5dc8c34fc0d8034e4c98e3c6
>> I've enabled CONFIG_BLK_CGROUP, but not CFQ_GROUP_IOSCHED
>> In this case cfq_ref_get_cfqg() defined as 
>> static inline struct cfq_group *cfq_ref_get_cfqg(struct cfq_group *cfqg)
>> {
>>         return NULL;
>> }
>> So following call trace is simply NOOP
>> cfq_set_request()
>>  rq->elevator_private3 = cfq_ref_get_cfqg(cfqq->cfqg);
>> 
>> Which later result in OOPS on bio insertion
>> cfq_insert_request
>>  -> blkiocg_update_io_add_stats(&(RQ_CFQG(rq))->blkg,...)
>>     -> spin_lock_irqsave(&blkg->stats_lock, flags);
>> 
>> Bad commit.
>> >From 7f1dc8a2d2f45fc557b27fd56115338b1d34fc24 Mon Sep 17 00:00:00 2001
>> From: Vivek Goyal <vgoyal@...hat.com>
>> Date: Wed, 21 Apr 2010 17:44:16 +0200
>> Subject: [PATCH] blkio: Fix blkio crash during rq stat update
>
> Dmitry, this patch should fix the issue. Can you please give it a try.
Yes. the issue is gone.
>
> Jens, I know you don't like this form of cfq_ref_get_cfqg(), but this
> seems to be the simplest solution to fix it.
IMHO following fix is simpler, and cleaner.

View attachment "diff" of type "text/plain" (367 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ