1. 09 Aug, 2007 14 commits
    • Satyam Sharma's avatar
      Netpoll leak · acad36f9
      Satyam Sharma authored
      [NETPOLL]: Fix a leak-n-bug in netpoll_cleanup()
      
      93ec2c72 applied excessive duct tape to
      the netpoll beast's netpoll_cleanup(), thus substituting one leak with
      another, and opening up a little buglet :-)
      
      net_device->npinfo (netpoll_info) is a shared and refcounted object and
      cannot simply be set NULL the first time netpoll_cleanup() is called.
      Otherwise, further netpoll_cleanup()'s see np->dev->npinfo == NULL and
      become no-ops, thus leaking. And it's a bug too: the first call to
      netpoll_cleanup() would thus (annoyingly) "disable" other (still alive)
      netpolls too. Maybe nobody noticed this because netconsole (only user
      of netpoll) never supported multiple netpoll objects earlier.
      
      This is a trivial and obvious one-line fixlet.
      Signed-off-by: default avatarSatyam Sharma <ssatyam@cse.iitk.ac.in>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      acad36f9
    • Vlad Yasevich's avatar
      Fix ipv6 link down handling. · 7e2d130b
      Vlad Yasevich authored
      [IPV6]: Call inet6addr_chain notifiers on link down
      
      Currently if the link is brought down via ip link or ifconfig down,
      the inet6addr_chain notifiers are not called even though all
      the addresses are removed from the interface.  This caused SCTP
      to add duplicate addresses to it's list.
      Signed-off-by: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7e2d130b
    • Dmitry Butskoy's avatar
      Fix error queue socket lookup in ipv6 · c709631f
      Dmitry Butskoy authored
      [IPV6]: MSG_ERRQUEUE messages do not pass to connected raw sockets
      
      From: Dmitry Butskoy <dmitry@butskoy.name>
      
      Taken from http://bugzilla.kernel.org/show_bug.cgi?id=8747
      
      Problem Description:
      
      It is related to the possibility to obtain MSG_ERRQUEUE messages from the udp
      and raw sockets, both connected and unconnected.
      
      There is a little typo in net/ipv6/icmp.c code, which prevents such messages
      to be delivered to the errqueue of the correspond raw socket, when the socket
      is CONNECTED.  The typo is due to swap of local/remote addresses.
      
      Consider __raw_v6_lookup() function from net/ipv6/raw.c. When a raw socket is
      looked up usual way, it is something like:
      
      sk = __raw_v6_lookup(sk, nexthdr, daddr, saddr, IP6CB(skb)->iif);
      
      where "daddr" is a destination address of the incoming packet (IOW our local
      address), "saddr" is a source address of the incoming packet (the remote end).
      
      But when the raw socket is looked up for some icmp error report, in
      net/ipv6/icmp.c:icmpv6_notify() , daddr/saddr are obtained from the echoed
      fragment of the "bad" packet, i.e.  "daddr" is the original destination
      address of that packet, "saddr" is our local address.  Hence, for
      icmpv6_notify() must use "saddr, daddr" in its arguments, not "daddr, saddr"
      ...
      
      Steps to reproduce:
      
      Create some raw socket, connect it to an address, and cause some error
      situation: f.e. set ttl=1 where the remote address is more than 1 hop to reach.
      Set IPV6_RECVERR .
      Then send something and wait for the error (f.e. poll() with POLLERR|POLLIN).
      You should receive "time exceeded" icmp message (because of "ttl=1"), but the
      socket do not receive it.
      
      If you do not connect your raw socket, you will receive MSG_ERRQUEUE
      successfully.  (The reason is that for unconnected socket there are no actual
      checks for local/remote addresses).
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c709631f
    • Ranko Zivojnovic's avatar
      gen estimator deadlock fix · 8a1c1646
      Ranko Zivojnovic authored
      [NET]: gen_estimator deadlock fix
      
      -Fixes ABBA deadlock noted by Patrick McHardy <kaber@trash.net>:
      
      > There is at least one ABBA deadlock, est_timer() does:
      > read_lock(&est_lock)
      > spin_lock(e->stats_lock) (which is dev->queue_lock)
      >
      > and qdisc_destroy calls htb_destroy under dev->queue_lock, which
      > calls htb_destroy_class, then gen_kill_estimator and this
      > write_locks est_lock.
      
      To fix the ABBA deadlock the rate estimators are now kept on an rcu list.
      
      -The est_lock changes the use from protecting the list to protecting
      the update to the 'bstat' pointer in order to avoid NULL dereferencing.
      
      -The 'interval' member of the gen_estimator structure removed as it is
      not needed.
      Signed-off-by: default avatarRanko Zivojnovic <ranko@spidernet.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8a1c1646
    • Patrick McHardy's avatar
      gen estimator timer unload race · 2e9d3cf8
      Patrick McHardy authored
      [NET]: Fix gen_estimator timer removal race
      
      As noticed by Jarek Poplawski <jarkao2@o2.pl>, the timer removal in
      gen_kill_estimator races with the timer function rearming the timer.
      
      Check whether the timer list is empty before rearming the timer
      in the timer function to fix this.
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Acked-by: default avatarJarek Poplawski <jarkao2@o2.pl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      2e9d3cf8
    • Ingo Molnar's avatar
      Fix rfkill IRQ flags. · 360737d9
      Ingo Molnar authored
      [RFKILL]: fix net/rfkill/rfkill-input.c bug on 64-bit systems
      
      Subject: [patch] net/input: fix net/rfkill/rfkill-input.c bug on 64-bit systems
      
      this recent commit:
      
       commit cf4328cd
       Author: Ivo van Doorn <IvDoorn@gmail.com>
       Date:   Mon May 7 00:34:20 2007 -0700
      
           [NET]: rfkill: add support for input key to control wireless radio
      
      added this 64-bit bug:
      
              ....
      	unsigned int flags;
      
       	spin_lock_irqsave(&task->lock, flags);
              ....
      
      irq 'flags' must be unsigned long, not unsigned int. The -rt tree has
      strict checks about this on 64-bit so this triggered a build failure.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      360737d9
    • Vlad Yasevich's avatar
      SCTP scope_id handling fix · 9bff1948
      Vlad Yasevich authored
      SCTP: Add scope_id validation for link-local binds
      
      SCTP currently permits users to bind to link-local addresses,
      but doesn't verify that the scope id specified at bind matches
      the interface that the address is configured on.  It was report
      that this can hang a system.
      Signed-off-by: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      9bff1948
    • Adrian Bunk's avatar
      Missing header include in ipt_iprange.h · 420eb873
      Adrian Bunk authored
      [NETFILTER]: ipt_iprange.h must #include <linux/types.h>
      
      ipt_iprange.h must #include <linux/types.h> since it uses __be32.
      
      This patch fixes kernel Bugzilla #7604.
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      420eb873
    • Christian Lamparter's avatar
      Add a PCI ID for santa rosa's PATA controller. · a03cf181
      Christian Lamparter authored
      This is commit c1e6f28c which is
      merged during 23-rc1 window.  Considering the popularity of these
      chips, I think including it in -stable release would be good idea.
      Signed-off-by: default avatarChristian Lamparter <chunkeey@web.de>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a03cf181
    • David S. Miller's avatar
      Fix console write locking in sparc drivers. · 64be2d2b
      David S. Miller authored
      Mirror the logic in 8250 for proper console write locking
      when SYSRQ is triggered or an OOPS is in progress.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      64be2d2b
    • Patrick McHardy's avatar
      Fix IPCOMP crashes. · 3ee0edac
      Patrick McHardy authored
      [XFRM]: Fix crash introduced by struct dst_entry reordering
      
      XFRM expects xfrm_dst->u.next to be same pointer as dst->next, which
      was broken by the dst_entry reordering in commit 1e19e02c~, causing
      an oops in xfrm_bundle_ok when walking the bundle upwards.
      
      Kill xfrm_dst->u.next and change the only user to use dst->next instead.
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      3ee0edac
    • Patrick McHardy's avatar
      Fix TC deadlock. · c1bb8182
      Patrick McHardy authored
      [NET_SCHED]: Revert "avoid transmit softirq on watchdog wakeup" optimization
      
      As noticed by Ranko Zivojnovic <ranko@spidernet.net>, calling qdisc_run
      from the timer handler can result in deadlock:
      
      > CPU#0
      >
      > qdisc_watchdog() fires and gets dev->queue_lock
      > qdisc_run()...qdisc_restart()...
      > -> releases dev->queue_lock and enters dev_hard_start_xmit()
      >
      > CPU#1
      >
      > tc del qdisc dev ...
      > qdisc_graft()...dev_graft_qdisc()...dev_deactivate()...
      > -> grabs dev->queue_lock ...
      >
      > qdisc_reset()...{cbq,hfsc,htb,netem,tbf}_reset()...qdisc_watchdog_cancel()...
      > -> hrtimer_cancel() - waiting for the qdisc_watchdog() to exit, while still
      >		        holding dev->queue_lock
      >
      > CPU#0
      >
      > dev_hard_start_xmit() returns ...
      > -> wants to get dev->queue_lock(!)
      >
      > DEADLOCK!
      
      The entire optimization is a bit questionable IMO, it moves potentially
      large parts of NET_TX_SOFTIRQ work to TIMER_SOFTIRQ/HRTIMER_SOFTIRQ,
      which kind of defeats the separation of them.
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Acked-by: default avatarRanko Zivojnovic <ranko@spidernet.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c1bb8182
    • Ilpo Järvinen's avatar
      TCP FRTO retransmit bug fix · 2c92c72b
      Ilpo Järvinen authored
      [TCP]: Verify the presence of RETRANS bit when leaving FRTO
      
      For yet unknown reason, something cleared SACKED_RETRANS bit
      underneath FRTO.
      Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      2c92c72b
    • Alan Stern's avatar
      USB: cdc-acm: fix sysfs attribute registration bug · 6b30a4e1
      Alan Stern authored
      This patch (as950) fixes a bug in the cdc-acm driver.  It doesn't keep
      track of which interface (control or data) the sysfs attributes get
      registered for, and as a result, during disconnect it will sometimes
      attempt to remove the attributes from the wrong interface.  The
      left-over attributes can cause a crash later on, particularly if the driver
      module has been unloaded.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      CC: Oliver Neukum <oliver@neukum.name>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6b30a4e1
  2. 10 Jul, 2007 2 commits
  3. 08 Jul, 2007 6 commits
  4. 07 Jul, 2007 4 commits
    • Adrian Bunk's avatar
      DLM must depend on SYSFS · 95511ad4
      Adrian Bunk authored
      The dependency of DLM on SYSFS got lost in
      commit 6ed7257b resulting in the
      following compile error with CONFIG_DLM=y, CONFIG_SYSFS=n:
      
      <--  snip  -->
      
      ...
        LD      .tmp_vmlinux1
      fs/built-in.o: In function `dlm_lockspace_init':
      /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/fs/dlm/lockspace.c:231: undefined reference to `kernel_subsys'
      fs/built-in.o: In function `configfs_init':
      /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/fs/configfs/mount.c:143: undefined reference to `kernel_subsys'
      make[1]: *** [.tmp_vmlinux1] Error 1
      
      <--  snip  -->
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      95511ad4
    • Dave Jones's avatar
      Clean up E7520/7320/7525 quirk printk. · 38377be8
      Dave Jones authored
      The printk level in this printk is bogus, as the previous printk
      didn't have a terminating \n resulting in ..
      
      Intel E7520/7320/7525 detected.<6>Disabling irq balancing and affinity
      
      It also never printed a \n at all in the case where we didn't do
      the quirk.
      
      Change it to only make noise if it actually does something useful.
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      38377be8
    • Adrian Bunk's avatar
      include/linux/kallsyms.h must #include <linux/errno.h> · 40e48eed
      Adrian Bunk authored
      This patch fixes the following 2.6.22 regression with CONFIG_KALLSYMS=n:
      
      <--  snip  -->
      
      ...
        CC      arch/m32r/kernel/traps.o
      In file included from /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/arch/m32r/kernel/traps.c:14:
      /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h: In function 'lookup_symbol_name':
      /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h:66: error: 'ERANGE' undeclared (first use in this function)
      /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h:66: error: (Each undeclared identifier is reported only once
      /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h:66: error: for each function it appears in.)
      /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h: In function 'lookup_symbol_attrs':
      /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h:71: error: 'ERANGE' undeclared (first use in this function)
      make[2]: *** [arch/m32r/kernel/traps.o] Error 1
      
      <--  snip  -->
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      40e48eed
    • David Woodhouse's avatar
      Fix use-after-free oops in Bluetooth HID. · 1c39858b
      David Woodhouse authored
      When cleaning up HIDP sessions, we currently close the ACL connection
      before deregistering the input device. Closing the ACL connection
      schedules a workqueue to remove the associated objects from sysfs, but
      the input device still refers to them -- and if the workqueue happens to
      run before the input device removal, the kernel will oops when trying to
      look up PHYSDEVPATH for the removed input device.
      
      Fix this by deregistering the input device before closing the
      connections.
      Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
      Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1c39858b
  5. 06 Jul, 2007 14 commits