From: Andrew Morton <akpm@osdl.org>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH] remove name length check in a workqueue
Date: Wed, 10 Aug 2005 10:37:33 -0700 [thread overview]
Message-ID: <20050810103733.42170f27.akpm@osdl.org> (raw)
In-Reply-To: <1123694672.5134.11.camel@mulgrave>
James Bottomley <James.Bottomley@SteelEye.com> wrote:
>
> On Wed, 2005-08-10 at 10:05 -0700, Andrew Morton wrote:
> > Ingo Molnar <mingo@redhat.com> wrote:
> > > yeah ... cannot remember why i have done it originally :-|
>
> > Might it be to do with sizeof(task_struct.comm)?
>
> But that's 16 bytes not 10;
Well we stick a "/%d" at the end, which gets us up to 14 chars, assuming
NR_CPUS < 1000
> and anyway, it doesn't have to be unique;
> set_task_comm just does a strlcpy from the name, so it will be truncated
> (same as for a binary with > 15 character name).
Yup. But it'd be fairly silly to go adding the /%d, only to have it
truncated off again.
We could truncate the name before adding the CPU number, but it sounds
saner to just prevent anyone passing in excessively long names. Via
BUG_ON, say ;)
What's the actual problem?
next prev parent reply other threads:[~2005-08-10 17:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-10 14:19 [PATCH] remove name length check in a workqueue James Bottomley
2005-08-10 14:45 ` Ingo Molnar
2005-08-10 17:05 ` Andrew Morton
2005-08-10 17:24 ` James Bottomley
2005-08-10 17:37 ` Andrew Morton [this message]
2005-08-10 17:54 ` James Bottomley
2005-08-10 18:27 ` Andrew Morton
2005-08-11 14:37 ` Simon Derr
2005-08-11 16:22 ` Coywolf Qi Hunt
2005-08-10 18:49 ` Frederic TEMPORELLI - astek
-- strict thread matches above, loose matches on Subject: below --
2005-08-11 18:48 Andreas Herrmann
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=20050810103733.42170f27.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mingo@redhat.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