mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul Menage" <menage@google.com>
To: "Adrian Bunk" <bunk@kernel.org>
Cc: "Paul Jackson" <pj@sgi.com>, linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] kernel/cgroup.c: remove dead code
Date: Wed, 24 Oct 2007 10:13:26 -0700	[thread overview]
Message-ID: <6599ad830710241013s4a85984er3cebd2ba471baf62@mail.gmail.com> (raw)
In-Reply-To: <20071024170701.GB30533@stusta.de>

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

  reply	other threads:[~2007-10-24 17:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-24 16:25 Adrian Bunk
2007-10-24 16:30 ` Paul Menage
2007-10-24 17:07   ` Adrian Bunk
2007-10-24 17:13     ` Paul Menage [this message]
2007-10-24 17:34   ` Paul Jackson
2007-10-26  1:10     ` Paul Menage
2007-10-26  1:19       ` Adrian Bunk
2007-10-26  1:24       ` Paul Jackson
2007-10-26  1:26         ` Paul Menage
2007-10-26  1:37           ` Paul Jackson
2007-10-26  1:30         ` Adrian Bunk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6599ad830710241013s4a85984er3cebd2ba471baf62@mail.gmail.com \
    --to=menage@google.com \
    --cc=bunk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®