lkml.org 
[lkml]   [2007]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [2.6 patch] kernel/cgroup.c: remove dead code
On 10/24/07, Adrian Bunk <bunk@kernel.org> 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
> (nbytes >= sizeof(root->release_agent_path)) ?

I think E2BIG for the former for backwards compatabilty; the latter
could be either ENOSPC or E2BIG; i.e. both checks are useful - one to
stop us allocating more memory than is sensible, and one to stop us
overrunning the buffer; the fact that these two are the same size at
the moment is coincidence.

I guess ideally the first check would be for the max() of any of the
data structures that we expect to be able to write over; PATH_MAX was
just picked as a convenience.

Paul
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-10-24 19:17    [W:0.173 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site