1. 12 1月, 2006 1 次提交
  2. 04 1月, 2006 1 次提交
  3. 09 11月, 2005 1 次提交
  4. 28 10月, 2005 1 次提交
  5. 09 10月, 2005 1 次提交
  6. 28 9月, 2005 1 次提交
    • F
      [NET]: Fix module reference counts for loadable protocol modules · a79af59e
      Frank Filz 提交于
      I have been experimenting with loadable protocol modules, and ran into
      several issues with module reference counting.
      
      The first issue was that __module_get failed at the BUG_ON check at
      the top of the routine (checking that my module reference count was
      not zero) when I created the first socket. When sk_alloc() is called,
      my module reference count was still 0. When I looked at why sctp
      didn't have this problem, I discovered that sctp creates a control
      socket during module init (when the module ref count is not 0), which
      keeps the reference count non-zero. This section has been updated to
      address the point Stephen raised about checking the return value of
      try_module_get().
      
      The next problem arose when my socket init routine returned an error.
      This resulted in my module reference count being decremented below 0.
      My socket ops->release routine was also being called. The issue here
      is that sock_release() calls the ops->release routine and decrements
      the ref count if sock->ops is not NULL. Since the socket probably
      didn't get correctly initialized, this should not be done, so we will
      set sock->ops to NULL because we will not call try_module_get().
      
      While searching for another bug, I also noticed that sys_accept() has
      a possibility of doing a module_put() when it did not do an
      __module_get so I re-ordered the call to security_socket_accept().
      Signed-off-by: NFrank Filz <ffilzlnx@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a79af59e
  7. 07 9月, 2005 2 次提交
    • P
      [NET]: proto_unregister: fix sleeping while atomic · 0a3f4358
      Patrick McHardy 提交于
      proto_unregister holds a lock while calling kmem_cache_destroy, which
      can sleep.
      
      Noticed by Daniele Orlandi <daniele@orlandi.com>.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0a3f4358
    • E
      [NET]: Make sure l_linger is unsigned to avoid negative timeouts · 9261c9b0
      Eric Dumazet 提交于
      One of my x86_64 (linux 2.6.13) server log is filled with :
      
      schedule_timeout: wrong timeout value ffffffffffffff06 from ffffffff802e63ca
      schedule_timeout: wrong timeout value ffffffffffffff06 from ffffffff802e63ca
      schedule_timeout: wrong timeout value ffffffffffffff06 from ffffffff802e63ca
      schedule_timeout: wrong timeout value ffffffffffffff06 from ffffffff802e63ca
      schedule_timeout: wrong timeout value ffffffffffffff06 from ffffffff802e63ca
      
      This is because some application does a
      
      struct linger li;
      li.l_onoff = 1;
      li.l_linger = -1;
      setsockopt(sock, SOL_SOCKET, SO_LINGER, &li, sizeof(li));
      
      And unfortunatly l_linger is defined as a 'signed int' in
      include/linux/socket.h:
      
      struct linger {
               int             l_onoff;        /* Linger active                */
               int             l_linger;       /* How long to linger for       */
      };
      
      I dont know if it's safe to change l_linger to 'unsigned int' in the
      include file (It might be defined as int in ABI specs)
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9261c9b0
  8. 06 9月, 2005 1 次提交
  9. 30 8月, 2005 4 次提交
  10. 28 7月, 2005 1 次提交
  11. 09 7月, 2005 1 次提交
  12. 19 6月, 2005 1 次提交
    • A
      [NET] Generalise TCP's struct open_request minisock infrastructure · 2e6599cb
      Arnaldo Carvalho de Melo 提交于
      Kept this first changeset minimal, without changing existing names to
      ease peer review.
      
      Basicaly tcp_openreq_alloc now receives the or_calltable, that in turn
      has two new members:
      
      ->slab, that replaces tcp_openreq_cachep
      ->obj_size, to inform the size of the openreq descendant for
        a specific protocol
      
      The protocol specific fields in struct open_request were moved to a
      class hierarchy, with the things that are common to all connection
      oriented PF_INET protocols in struct inet_request_sock, the TCP ones
      in tcp_request_sock, that is an inet_request_sock, that is an
      open_request.
      
      I.e. this uses the same approach used for the struct sock class
      hierarchy, with sk_prot indicating if the protocol wants to use the
      open_request infrastructure by filling in sk_prot->rsk_prot with an
      or_calltable.
      
      Results? Performance is improved and TCP v4 now uses only 64 bytes per
      open request minisock, down from 96 without this patch :-)
      
      Next changeset will rename some of the structs, fields and functions
      mentioned above, struct or_calltable is way unclear, better name it
      struct request_sock_ops, s/struct open_request/struct request_sock/g,
      etc.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e6599cb
  13. 06 5月, 2005 2 次提交
  14. 01 5月, 2005 1 次提交
    • P
      [PATCH] DocBook: changes and extensions to the kernel documentation · 4dc3b16b
      Pavel Pisa 提交于
      I have recompiled Linux kernel 2.6.11.5 documentation for me and our
      university students again.  The documentation could be extended for more
      sources which are equipped by structured comments for recent 2.6 kernels.  I
      have tried to proceed with that task.  I have done that more times from 2.6.0
      time and it gets boring to do same changes again and again.  Linux kernel
      compiles after changes for i386 and ARM targets.  I have added references to
      some more files into kernel-api book, I have added some section names as well.
       So please, check that changes do not break something and that categories are
      not too much skewed.
      
      I have changed kernel-doc to accept "fastcall" and "asmlinkage" words reserved
      by kernel convention.  Most of the other changes are modifications in the
      comments to make kernel-doc happy, accept some parameters description and do
      not bail out on errors.  Changed <pid> to @pid in the description, moved some
      #ifdef before comments to correct function to comments bindings, etc.
      
      You can see result of the modified documentation build at
        http://cmp.felk.cvut.cz/~pisa/linux/lkdb-2.6.11.tar.gz
      
      Some more sources are ready to be included into kernel-doc generated
      documentation.  Sources has been added into kernel-api for now.  Some more
      section names added and probably some more chaos introduced as result of quick
      cleanup work.
      Signed-off-by: NPavel Pisa <pisa@cmp.felk.cvut.cz>
      Signed-off-by: NMartin Waitz <tali@admingilde.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4dc3b16b
  15. 26 4月, 2005 2 次提交
    • A
      [NET]: kill gratitious includes of major.h · 5523662c
      Al Viro 提交于
      	A lot of places in there are including major.h for no reason
      whatsoever.  Removed.  And yes, it still builds.
      
      	The history of that stuff is often amusing.  E.g. for net/core/sock.c
      the story looks so, as far as I've been able to reconstruct it: we used to
      need major.h in net/socket.c circa 1.1.early.  In 1.1.13 that need had
      disappeared, along with register_chrdev(SOCKET_MAJOR, "socket", &net_fops)
      in sock_init().  Include had not.  When 1.2 -> 1.3 reorg of net/* had moved
      a lot of stuff from net/socket.c to net/core/sock.c, this crap had followed...
      Signed-off-by: NAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5523662c
    • A
      [PATCH] kill gratitious includes of major.h under net/* · b453257f
      Al Viro 提交于
      A lot of places in there are including major.h for no reason whatsoever.
      Removed.  And yes, it still builds. 
      
      The history of that stuff is often amusing.  E.g.  for net/core/sock.c
      the story looks so, as far as I've been able to reconstruct it: we used
      to need major.h in net/socket.c circa 1.1.early.  In 1.1.13 that need
      had disappeared, along with register_chrdev(SOCKET_MAJOR, "socket",
      &net_fops) in sock_init().  Include had not.  When 1.2 -> 1.3 reorg of
      net/* had moved a lot of stuff from net/socket.c to net/core/sock.c,
      this crap had followed... 
      Signed-off-by: NAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b453257f
  16. 20 4月, 2005 1 次提交
  17. 17 4月, 2005 2 次提交