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] [day] [month] [year] [list]
Message-ID: <4CC199D5.1010709@fusionio.com>
Date:	Fri, 22 Oct 2010 16:04:05 +0200
From:	Jens Axboe <jaxboe@...ionio.com>
To:	Vivek Goyal <vgoyal@...hat.com>
CC:	linux kernel mailing list <linux-kernel@...r.kernel.org>,
	Andi Kleen <ak@...ux.intel.com>,
	Moyer Jeff Moyer <jmoyer@...hat.com>
Subject: Re: [PATCH] cfq-iosched: Fix a gcc 4.5 warning and put some comments

On 2010-10-22 15:31, Vivek Goyal wrote:
> On Fri, Oct 22, 2010 at 09:46:19AM +0200, Jens Axboe wrote:
>> On 2010-10-21 20:24, Vivek Goyal wrote:
>>> - Andi encountedred following warning with gcc 4.5
>>>
>>>   linux/block/cfq-iosched.c: In function ‘cfq_dispatch_requests’:
>>>   linux/block/cfq-iosched.c:2156:3: warning: array subscript is above array
>>>   bounds
>>>
>>> - Warning happens due to following code.
>>>
>>>   slice = group_slice * count /
>>> 		max_t(unsigned, cfqg->busy_queues_avg[cfqd->serving_prio],
>>> 		cfq_group_busy_queues_wl(cfqd->serving_prio, cfqd, cfqg));
>>>
>>>   gcc is complaining about cfqg->busy_queues_avg[] being indexed by CFQ
>>>   prio classes (RT, BE and IDLE) while the array size is only 2.
>>>
>>> - At run time, we never access cfqg->busy_queues_avg[IDLE] and return from
>>>   function before this code hits.
>>>
>>> - To fix warning increase the array size though it will remain unused. This
>>>   patch also puts some comments to clarify some of the confusions.
>>>
>>> - I have taken Jens's patch and modified it a bit.
>>>
>>> - Compile tested with gcc 4.4 and boot tested. I don't have gcc 4.5
>>>   running, Andi can you please test it with gcc 4.5 to make sure it
>>>   worked.
>>>
>>> Reported-by: Andi Kleen <ak@...ux.intel.com>
>>> Signed-off-by: Vivek Goyal <vgoyal@...hat.com>
>>> Signed-off-by: Jens Axboe <axboe@...nel.dk>
>>
>> Thanks, I'll put this one in. BTW, you can't just add a signed-off-by
>> from me (or anyone else, for that matter), they have to be provided
>> explicitly by each individual.
> 
> Ok, sorry about that.
> 
> So in general, if I happen to pick somebody's patch, modify it and repost
> it, how do I reflect the Signed-off-by of original author.

What I usually do is leave the original signed-off-by, then describe my
changes, then add my signed-off-by. I think that is acceptable
behaviour. It's very different from adding a signed-off-by to something
that hasn't been signed-off by the original author yet that's legally an
issue. But hey, IANAL :-)

-- 
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