1. 07 3月, 2009 1 次提交
  2. 03 11月, 2008 1 次提交
  3. 25 7月, 2008 1 次提交
  4. 01 5月, 2008 1 次提交
  5. 31 10月, 2007 1 次提交
  6. 18 7月, 2007 2 次提交
    • J
      add argv_split() · d84d1cc7
      Jeremy Fitzhardinge 提交于
      argv_split() is a helper function which takes a string, splits it at
      whitespace, and returns a NULL-terminated argv vector.  This is
      deliberately simple - it does no quote processing of any kind.
      
      [ Seems to me that this is something which is already being done in
        the kernel, but I couldn't find any other implementations, either to
        steal or replace.  Keep an eye out. ]
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NChris Wright <chrisw@sous-sol.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      d84d1cc7
    • J
      add kstrndup · 1e66df3e
      Jeremy Fitzhardinge 提交于
      Add a kstrndup function, modelled on strndup.  Like strndup this
      returns a string copied into its own allocated memory, but it copies
      no more than the specified number of bytes from the source.
      
      Remove private strndup() from irda code.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NChris Wright <chrisw@sous-sol.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Cc: Akinobu Mita <akinobu.mita@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@mandriva.com>
      Cc: Al Viro <viro@ftp.linux.org.uk>
      Cc: Panagiotis Issaris <takis@issaris.org>
      Cc: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
      1e66df3e
  7. 26 4月, 2007 1 次提交
  8. 01 10月, 2006 1 次提交
    • A
      [PATCH] kmemdup: introduce · 1a2f67b4
      Alexey Dobriyan 提交于
      One of idiomatic ways to duplicate a region of memory is
      
      	dst = kmalloc(len, GFP_KERNEL);
      	if (!dst)
      		return -ENOMEM;
      	memcpy(dst, src, len);
      
      which is neat code except a programmer needs to write size twice.  Which
      sometimes leads to mistakes.  If len passed to kmalloc is smaller that len
      passed to memcpy, it's straight overwrite-beyond-end.  If len passed to
      memcpy is smaller than len passed to kmalloc, it's either a) legit
      behaviour ;-), or b) cloned buffer will contain garbage in second half.
      
      Slight trolling of commit lists shows several duplications bugs
      done exactly because of diverged lenghts:
      
      	Linux:
      		[CRYPTO]: Fix memcpy/memset args.
      		[PATCH] memcpy/memset fixes
      	OpenBSD:
      		kerberosV/src/lib/asn1: der_copy.c:1.4
      
      If programmer is given only one place to play with lengths, I believe, such
      mistakes could be avoided.
      
      With kmemdup, the snippet above will be rewritten as:
      
      	dst = kmemdup(src, len, GFP_KERNEL);
      	if (!dst)
      		return -ENOMEM;
      
      This also leads to smaller code (kzalloc effect). Quick grep shows
      200+ places where kmemdup() can be used.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      1a2f67b4
  9. 23 6月, 2006 1 次提交
  10. 11 4月, 2006 1 次提交
  11. 24 3月, 2006 1 次提交
  12. 09 10月, 2005 1 次提交
  13. 08 7月, 2005 1 次提交
  14. 24 6月, 2005 1 次提交
  15. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4