Date: Mon, 25 Sep 2017 14:46:37 -0700 From: Stephen Hurd <shurd@FreeBSD.org> To: Gleb Smirnoff <glebius@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r323944 - in head/sys: kern sys Message-ID: <929758eb-c4b6-2d0f-9eb3-f2f15b545e58@FreeBSD.org> In-Reply-To: <20170925212543.GX1055@FreeBSD.org> References: <201709230139.v8N1dGCi063544@repo.freebsd.org> <20170925212543.GX1055@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?929758eb-c4b6-2d0f-9eb3-f2f15b545e58>