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:	Thu, 30 Jul 2009 14:30:14 -0400
From:	Vivek Goyal <vgoyal@...hat.com>
To:	Jerome Marchand <jmarchan@...hat.com>
Cc:	linux-kernel@...r.kernel.org,
	containers@...ts.linux-foundation.org, dm-devel@...hat.com,
	jens.axboe@...cle.com, nauman@...gle.com, dpshah@...gle.com,
	ryov@...inux.co.jp, guijianfeng@...fujitsu.com,
	balbir@...ux.vnet.ibm.com, righi.andrea@...il.com,
	lizf@...fujitsu.com, mikew@...gle.com, fchecconi@...il.com,
	paolo.valente@...more.it, fernando@....ntt.co.jp,
	s-uchida@...jp.nec.com, taka@...inux.co.jp, jmoyer@...hat.com,
	dhaval@...ux.vnet.ibm.com, m-ikeda@...jp.nec.com, agk@...hat.com,
	akpm@...ux-foundation.org, peterz@...radead.org
Subject: Re: [PATCH 05/24] io-controller: Modify cfq to make use of flat
	elevator fair queuing

On Thu, Jul 30, 2009 at 05:42:46PM +0200, Jerome Marchand wrote:
> Vivek Goyal wrote:
> > @@ -1616,11 +1234,12 @@ static void changed_ioprio(struct io_context *ioc, struct cfq_io_context *cic)
> >  	struct cfq_data *cfqd = cic->key;
> >  	struct cfq_queue *cfqq;
> >  	unsigned long flags;
> > +	struct request_queue *q = cfqd->queue;
> 
> cfqd may be NULL here. We'd better test it before using it.
> 

Thanks Jerome. 

Actually I will drop this chage altogether. This is not required. I don't
know why did I change original code to introduce another local variable. 

Thanks
Vivek

> >  
> >  	if (unlikely(!cfqd))
> >  		return;
> >  
> > -	spin_lock_irqsave(cfqd->queue->queue_lock, flags);
> > +	spin_lock_irqsave(q->queue_lock, flags);
> >  
> >  	cfqq = cic->cfqq[BLK_RW_ASYNC];
> >  	if (cfqq) {
> > @@ -1637,7 +1256,7 @@ static void changed_ioprio(struct io_context *ioc, struct cfq_io_context *cic)
> >  	if (cfqq)
> >  		cfq_mark_cfqq_prio_changed(cfqq);
> >  
> > -	spin_unlock_irqrestore(cfqd->queue->queue_lock, flags);
> > +	spin_unlock_irqrestore(q->queue_lock, flags);
> >  }
> >  
> >  static void cfq_ioc_set_ioprio(struct io_context *ioc)
> 
> 
> --- block/cfq-iosched.c.orig	2009-07-29 10:22:08.000000000 +0200
> +++ block/cfq-iosched.c	2009-07-30 17:25:05.000000000 +0200
> @@ -1271,11 +1271,12 @@ static void changed_ioprio(struct io_con
>  	struct cfq_data *cfqd = cic->key;
>  	struct cfq_queue *cfqq;
>  	unsigned long flags;
> -	struct request_queue *q = cfqd->queue;
> +	struct request_queue *q;
>  
>  	if (unlikely(!cfqd))
>  		return;
>  
> +	q = cfqd->queue;
>  	spin_lock_irqsave(q->queue_lock, flags);
>  
>  	cfqq = cic->cfqq[BLK_RW_ASYNC];
--
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