Re: [2.6 patch] kernel/cgroup.c: remove dead code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
>   (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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux