cvs commit: src/sys/netinet/libalias alias_irc.c
Vadim Goncharov
vadim_nuclight at mail.ru
Tue Mar 18 12:38:11 PDT 2008
Hi Paolo Pisati!
On Mon, 17 Mar 2008 22:16:19 +0000 (UTC); Paolo Pisati <piso at FreeBSD.org> wrote:
> piso 2008-03-17 22:16:19 UTC
> FreeBSD src repository
> Modified files: (Branch: RELENG_7)
> sys/netinet/libalias alias_irc.c
> Log:
> MFC revision 1.25:
> Don't abuse stack space while in kernel land, use heap instead.
>
> PR: kern/121693
>
> Revision Changes Path
> 1.23.2.1 +10 -5 src/sys/netinet/libalias/alias_irc.c
Paolo,
this violates rules 6 and 10 from committers-guide.
The original commit log in HEAD did not contained "MFC After:", so the code
was not supposed to be MFCed to STABLE. Moreover, minimum MFC period is
3 days, and you've done MFCs to both 6-STABLE and 7-STABLE in 8 minutes
after commit to HEAD. Then, PR must not be closed so fast, as originator
has not yet confirmed that patch has fixed his problem.
This could be non-critical, but that rules exists to guard against bugs in the
code, so - let's look at the code. You are changing "char newpacket[65536]" to
"char *newpacket", and there are places there like:
if (iCopy + 4 > sizeof(newpacket))
goto lPACKET_DONE;
which you hasn't changed, while "iCopy" is "unsigned int". This will break
behaviour, of course, in 7-STABLE - in 6-STABLE it is still an array.
It is questionable whether silent change in size from 65536 to IP_MAXPACKET
(which is one less) is acceptable, but there is also another clear point:
this will be allocated with M_NOWAIT on every packet. It is better to prealloc
that memory on module load, the way you've done in 6-STABLE's MFC variant.
--
WBR, Vadim Goncharov. ICQ#166852181 mailto:vadim_nuclight at mail.ru
[Moderator of RU.ANTI-ECOLOGY][FreeBSD][http://antigreen.org][LJ:/nuclight]
More information about the cvs-src
mailing list