pj wrote:
> Check out the assembly code generated by:
>
> BUG_ON(sizeof(cgrp->root->release_agent_path) < PATH_MAX));
>
> (Hint: you can't find it ;)
>
> It -is- compile time!
To be clear, BUG_ON() in general is a runtime check.
But the compiler can optimize out constant expressions,
and code
On Thu, Oct 25, 2007 at 06:24:25PM -0700, Paul Jackson wrote:
> Paul M wrote:
> > Sounds reasonable to me. Is there any kind of compile-time assert
> > macro in the kernel?
>
> Check out the assembly code generated by:
>
> BUG_ON(sizeof(cgrp->root->release_agent_path) < PATH_MAX));
>
> (Hint
On 10/25/07, Paul Jackson <[EMAIL PROTECTED]> wrote:
> Paul M wrote:
> > Sounds reasonable to me. Is there any kind of compile-time assert
> > macro in the kernel?
>
> Check out the assembly code generated by:
>
> BUG_ON(sizeof(cgrp->root->release_agent_path) < PATH_MAX));
>
> (Hint: you can't
Paul M wrote:
> Sounds reasonable to me. Is there any kind of compile-time assert
> macro in the kernel?
Check out the assembly code generated by:
BUG_ON(sizeof(cgrp->root->release_agent_path) < PATH_MAX));
(Hint: you can't find it ;)
It -is- compile time!
--
I won't res
On Thu, Oct 25, 2007 at 06:10:24PM -0700, Paul Menage wrote:
> On 10/24/07, Paul Jackson <[EMAIL PROTECTED]> wrote:
> > Paul M wrote:
> > > I think I'd rather not make this change - if we later changed the size
> > > of release_agent_path[] this could silently fail. Can we get around
> > > the cove
On 10/24/07, Paul Jackson <[EMAIL PROTECTED]> wrote:
> Paul M wrote:
> > I think I'd rather not make this change - if we later changed the size
> > of release_agent_path[] this could silently fail. Can we get around
> > the coverity checker somehow?
>
> Perhaps we can simplify this check then, to:
Paul M wrote:
> I think I'd rather not make this change - if we later changed the size
> of release_agent_path[] this could silently fail. Can we get around
> the coverity checker somehow?
Perhaps we can simplify this check then, to:
BUG_ON(sizeof(cgrp->root->release_agent_path) < PATH_MAX));
On 10/24/07, Adrian Bunk <[EMAIL PROTECTED]> wrote:
>
> Two questions:
> - Is it really intended to perhaps change release_agent_path[] to have
> less than PATH_MAX size?
I've got no intention to do so currently.
> - If yes, do you want to return -E2BIG for (nbytes >= PATH_MAX) or for
> (nbyt
On Wed, Oct 24, 2007 at 09:30:23AM -0700, Paul Menage wrote:
> I think I'd rather not make this change - if we later changed the size
> of release_agent_path[] this could silently fail. Can we get around
> the coverity checker somehow?
I do not care what the Coverity checker thinks about the code,
I think I'd rather not make this change - if we later changed the size
of release_agent_path[] this could silently fail. Can we get around
the coverity checker somehow?
Paul
On 10/24/07, Adrian Bunk <[EMAIL PROTECTED]> wrote:
> This patch removes dead code spotted by the Coverity checker
> (look
This patch removes dead code spotted by the Coverity checker
(look at the "(nbytes >= PATH_MAX)" check).
Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
---
kernel/cgroup.c | 18 --
1 file changed, 8 insertions(+), 10 deletions(-)
--- linux-2.6/kernel/cgroup.c.old 2007-1
11 matches
Mail list logo