svn commit: r323944 - in head/sys: kern sys
Stephen Hurd
shurd at FreeBSD.org
Mon Sep 25 21:48:44 UTC 2017
Gleb Smirnoff wrote:
> Stephen,
>
> On Sat, Sep 23, 2017 at 01:39:16AM +0000, Stephen Hurd wrote:
> S> Author: shurd
> S> Date: Sat Sep 23 01:39:16 2017
> S> New Revision: 323944
> S> URL: https://svnweb.freebsd.org/changeset/base/323944
> S>
> S> Log:
> S> Make struct grouptask gt_name member a char array
> S>
> S> Previously, it was just a pointer which was copied, but
> S> some callers pass in a stack variable which will go out of scope.
> S> Add GROUPTASK_NAMELEN macro (32) and snprintf() the name into it,
> S> using "grouptask" if name is NULL. We can now safely include
> S> gtask->gt_name in console messages.
>
> Have you estimated which structures include struct grouptask, so
> that they now got larger?
I did take a look through and didn't see anything alarming in either
iflib or the linuxkpi stuff which seem to be the only consumers at this
time.
> Is this done only for the sake of console messages?
I'm not sure yet. The member was already there and had pointers to the
stack in it. Nothing appeared to be consuming it, but I noticed the
error while working on console messages, so that's all it's used for
now. I need to finish digging through the rest of the iflib backlog to
see if there's another use for it.
The safest change seemed to be making it part of the structure and
reviewing the usage later.
More information about the svn-src-all
mailing list