1. 29 6月, 2005 4 次提交
  2. 27 6月, 2005 5 次提交
    • P
      [IPVS]: Fix for overflows · 4da62fc7
      pageexec 提交于
      From: <pageexec@freemail.hu>
      
      $subject was fixed in 2.4 already, 2.6 needs it as well.
      
      The impact of the bugs is a kernel stack overflow and privilege escalation
      from CAP_NET_ADMIN via the IP_VS_SO_SET_STARTDAEMON/IP_VS_SO_GET_DAEMON
      ioctls.  People running with 'root=all caps' (i.e., most users) are not
      really affected (there's nothing to escalate), but SELinux and similar
      users should take it seriously if they grant CAP_NET_ADMIN to other users.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4da62fc7
    • D
      [NETLINK]: Fix two socket hashing bugs. · d470e3b4
      David S. Miller 提交于
      1) netlink_release() should only decrement the hash entry
         count if the socket was actually hashed.
      
         This was causing hash->entries to underflow, which
         resulting in all kinds of troubles.
      
         On 64-bit systems, this would cause the following
         conditional to erroneously trigger:
      
      	err = -ENOMEM;
      	if (BITS_PER_LONG > 32 && unlikely(hash->entries >= UINT_MAX))
      		goto err;
      
      2) netlink_autobind() needs to propagate the error return from
         netlink_insert().  Otherwise, callers will not see the error
         as they should and thus try to operate on a socket with a zero pid,
         which is very bad.
      
         However, it should not propagate -EBUSY.  If two threads race
         to autobind the socket, that is fine.  This is consistent with the
         autobind behavior in other protocols.
      
         So bug #1 above, combined with this one, resulted in hangs
         on netlink_sendmsg() calls to the rtnetlink socket.  We'd try
         to do the user sendmsg() with the socket's pid set to zero,
         later we do a socket lookup using that pid (via the value we
         stashed away in NETLINK_CB(skb).pid), but that won't give us the
         user socket, it will give us the rtnetlink socket.  So when we
         try to wake up the receive queue, we dive back into rtnetlink_rcv()
         which tries to recursively take the rtnetlink semaphore.
      
      Thanks to Jakub Jelink for providing backtraces.  Also, thanks to
      Herbert Xu for supplying debugging patches to help track this down,
      and also finding a mistake in an earlier version of this fix.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d470e3b4
    • R
      64053bee
    • A
      [TCP]: Let TCP_CONG_ADVANCED default to n · 60fe7403
      Adrian Bunk 提交于
      It doesn't seem to make much sense to let an "If unsure, say N." option 
      default to y.
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      60fe7403
    • D
      [IPV4]: Fix thinko in TCP_CONG_BIC default. · 6c360767
      David S. Miller 提交于
      Since it is tristate when we offer it as a choice, we should
      definte it also as tristate when forcing it as the default.
      Otherwise kconfig warns.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6c360767
  3. 26 6月, 2005 1 次提交
    • C
      [PATCH] Cleanup patch for process freezing · 3e1d1d28
      Christoph Lameter 提交于
      1. Establish a simple API for process freezing defined in linux/include/sched.h:
      
         frozen(process)		Check for frozen process
         freezing(process)		Check if a process is being frozen
         freeze(process)		Tell a process to freeze (go to refrigerator)
         thaw_process(process)	Restart process
         frozen_process(process)	Process is frozen now
      
      2. Remove all references to PF_FREEZE and PF_FROZEN from all
         kernel sources except sched.h
      
      3. Fix numerous locations where try_to_freeze is manually done by a driver
      
      4. Remove the argument that is no longer necessary from two function calls.
      
      5. Some whitespace cleanup
      
      6. Clear potential race in refrigerator (provides an open window of PF_FREEZE
         cleared before setting PF_FROZEN, recalc_sigpending does not check
         PF_FROZEN).
      
      This patch does not address the problem of freeze_processes() violating the rule
      that a task may only modify its own flags by setting PF_FREEZE. This is not clean
      in an SMP environment. freeze(process) is therefore not SMP safe!
      Signed-off-by: NChristoph Lameter <christoph@lameter.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3e1d1d28
  4. 25 6月, 2005 4 次提交
  5. 24 6月, 2005 22 次提交
  6. 23 6月, 2005 4 次提交
    • S
      [X25]: Fast select with no restriction on response · ebc3f64b
      Shaun Pereira 提交于
      This patch is a follow up to patch 1 regarding "Selective Sub Address
      matching with call user data".  It allows use of the Fast-Select-Acceptance
      optional user facility for X.25.
      
      This patch just implements fast select with no restriction on response
      (NRR).  What this means (according to ITU-T Recomendation 10/96 section
      6.16) is that if in an incoming call packet, the relevant facility bits are
      set for fast-select-NRR, then the called DTE can issue a direct response to
      the incoming packet using a call-accepted packet that contains
      call-user-data.  This patch allows such a response.  
      
      The called DTE can also respond with a clear-request packet that contains
      call-user-data.  However, this feature is currently not implemented by the
      patch.
      
      How is Fast Select Acceptance used?
      By default, the system does not allow fast select acceptance (as before).
      To enable a response to fast select acceptance,  
      After a listen socket in created and bound as follows
      	socket(AF_X25, SOCK_SEQPACKET, 0);
      	bind(call_soc, (struct sockaddr *)&locl_addr, sizeof(locl_addr));
      but before a listen system call is made, the following ioctl should be used.
      	ioctl(call_soc,SIOCX25CALLACCPTAPPRV);
      Now the listen system call can be made
      	listen(call_soc, 4);
      After this, an incoming-call packet will be accepted, but no call-accepted 
      packet will be sent back until the following system call is made on the socket
      that accepts the call
      	ioctl(vc_soc,SIOCX25SENDCALLACCPT);
      The network (or cisco xot router used for testing here) will allow the 
      application server's call-user-data in the call-accepted packet, 
      provided the call-request was made with Fast-select NRR.
      Signed-off-by: NShaun Pereira <spereira@tusc.com.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ebc3f64b
    • S
      [X25]: Selective sub-address matching with call user data. · cb65d506
      Shaun Pereira 提交于
      From: Shaun Pereira <spereira@tusc.com.au>
      
      This is the first (independent of the second) patch of two that I am
      working on with x25 on linux (tested with xot on a cisco router).  Details
      are as follows.
      
      Current state of module:
      
      A server using the current implementation (2.6.11.7) of the x25 module will
      accept a call request/ incoming call packet at the listening x.25 address,
      from all callers to that address, as long as NO call user data is present
      in the packet header.
      
      If the server needs to choose to accept a particular call request/ incoming
      call packet arriving at its listening x25 address, then the kernel has to
      allow a match of call user data present in the call request packet with its
      own.  This is required when multiple servers listen at the same x25 address
      and device interface.  The kernel currently matches ALL call user data, if
      present.
      
      Current Changes:
      
      This patch is a follow up to the patch submitted previously by Andrew
      Hendry, and allows the user to selectively control the number of octets of
      call user data in the call request packet, that the kernel will match.  By
      default no call user data is matched, even if call user data is present. 
      To allow call user data matching, a cudmatchlength > 0 has to be passed
      into the kernel after which the passed number of octets will be matched. 
      Otherwise the kernel behavior is exactly as the original implementation.
      
      This patch also ensures that as is normally the case, no call user data
      will be present in the Call accepted / call connected packet sent back to
      the caller 
      
      Future Changes on next patch:
      
      There are cases however when call user data may be present in the call
      accepted packet.  According to the X.25 recommendation (ITU-T 10/96)
      section 5.2.3.2 call user data may be present in the call accepted packet
      provided the fast select facility is used.  My next patch will include this
      fast select utility and the ability to send up to 128 octets call user data
      in the call accepted packet provided the fast select facility is used.  I
      am currently testing this, again with xot on linux and cisco.  
      Signed-off-by: NShaun Pereira <spereira@tusc.com.au>
      
      (With a fix from Alexey Dobriyan <adobriyan@gmail.com>)
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cb65d506
    • J
      [EBTABLES]: vfree() checking cleanups · 68d31872
      James Lamanna 提交于
      From: jlamanna@gmail.com
      
      ebtables.c vfree() checking cleanups.
      
      Signed-off by: James Lamanna <jlamanna@gmail.com>
      Signed-off-by: NDomen Puncer <domen@coderock.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      68d31872
    • N
      [ATALK] aarp: replace schedule_timeout() with msleep() · 285b3afe
      Nishanth Aravamudan 提交于
      From: Nishanth Aravamudan <nacc@us.ibm.com>
      
      Use msleep() instead of schedule_timeout() to guarantee the task
      delays as expected. The current code is not wrong, but it does not account for
      early return due to signals, so I think msleep() should be appropriate.
      Signed-off-by: NNishanth Aravamudan <nacc@us.ibm.com>
      Signed-off-by: NDomen Puncer <domen@coderock.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      285b3afe