1. 07 9月, 2005 1 次提交
    • 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
  2. 06 9月, 2005 3 次提交
  3. 30 8月, 2005 28 次提交
  4. 12 8月, 2005 7 次提交
  5. 31 7月, 2005 1 次提交