From: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu, 24 Jul 2008 14:13:42 -0700 (PDT)Actually in the old code this precondition didn't hold, which explains how it is. The old code looked like: if (newlen >= ksize(ct->ext)) { new = kmalloc(newlen, gfp); if (!new) return NULL; ... ct->ext = new; } ct->ext->offset[id] = newoff; ct->ext->len = newlen; memset((void *)ct->ext + newoff, 0, newlen - newoff); return (void *)ct->ext + newoff; and in that context 'new' is only assigned in the "newlen >=" guarded code block. Anyways, it does seem that we should indeed only update the new larger length only after we've initialized the contents. Note that we could make krealloc() and friends clear out the trailing bits of the new buffer, and therefore the caller wouldn't even need to be mindful of such things. I don't know if that's desirable in general, probably it isn't. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Greg KH | Og dreams of kernels |
| Jens Axboe | [PATCH 31/33] Fusion: sg chaining support |
| Arnd Bergmann | Re: finding your own dead "CONFIG_" variables |
| Mark Brown | [PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset |
| Tony Breeds | [LGUEST] Look in object dir for .config |
git: | |
| Brian Downing | Re: Git in a Nutshell guide |
| John Benes | Re: master has some toys |
| Matthias Lederhofer | [PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree |
| Alexander Sulfrian | [RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set |
| Junio C Hamano | Re: Rss produced by git is not valid xml? |
| Linux Kernel Mailing List | iSeries: fix section mismatch in iseries_veth |
| Linux Kernel Mailing List | ixbge: remove TX lock and redo TX accounting. |
| Linux Kernel Mailing List | ixgbe: fix several counter register errata |
| Linux Kernel Mailing List | b43: fix build with CONFIG_SSB_PCIHOST=n |
