1. 02 Nov, 2007 10 commits
    • Ilpo Järvinen's avatar
      Fix TCP's ->fastpath_cnt_hit handling. · 692767df
      Ilpo Järvinen authored
      changeset 48611c47 in mainline.
      
      When only GSO skb was partially ACKed, no hints are reset,
      therefore fastpath_cnt_hint must be tweaked too or else it can
      corrupt fackets_out. The corruption to occur, one must have
      non-trivial ACK/SACK sequence, so this bug is not very often
      that harmful. There's a fackets_out state reset in TCP because
      fackets_out is known to be inaccurate and that fixes the issue
      eventually anyway.
      
      In case there was also at least one skb that got fully ACKed,
      the fastpath_skb_hint is set to NULL which causes a recount for
      fastpath_cnt_hint (the old value won't be accessed anymore),
      thus it can safely be decremented without additional checking.
      
      Reported by Cedric Le Goater <clg@fr.ibm.com>
      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>
      692767df
    • David S. Miller's avatar
      Fix sys_ipc() SEMCTL on sparc64. · e43358c5
      David S. Miller authored
      changeset 6536a6b331d3225921c398eb7c6e4ecedb9b05e0 from mainline
      
      Thanks to Tom Callaway for the excellent bug report and
      test case.
      
      sys_ipc() has several problems, most to due with semaphore
      call handling:
      
      1) 'err' return should be a 'long'
      2) "union semun" is passed in a register on 64-bit compared
         to 32-bit which provides it on the stack and therefore
         by reference
      3) Second and third arguments to SEMCTL are swapped compared
         to 32-bit.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e43358c5
    • David S. Miller's avatar
      Fix zero length socket write() semantics. · 791333ba
      David S. Miller authored
      changeset e79ad711 from mainline.
      
      This fixes kernel bugzilla #5731
      
      It should generate an empty packet for datagram protocols when the
      socket is connected, for one.
      
      The check is doubly-wrong because all that a write() can be is a
      sendmsg() call with a NULL msg_control and a single entry iovec.  No
      special semantics should be assigned to it, therefore the zero length
      check should be removed entirely.
      
      This matches the behavior of BSD and several other systems.
      
      Alan Cox notes that SuSv3 says the behavior of a zero length write on
      non-files is "unspecified", but that's kind of useless since BSD has
      defined this behavior for a quarter century and BSD is essentially
      what application folks code to.
      
      Based upon a patch from Stephen Hemminger.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      791333ba
    • Alexey Dobriyan's avatar
      Fix ROSE module unload oops. · f7c6bfbb
      Alexey Dobriyan authored
      changeset 891e6a93 from mainline.
      
      Commit a3d38402 aka
      "[AX.25]: Fix unchecked rose_add_loopback_neigh uses"
      transformed rose_loopback_neigh var into statically allocated one.
      However, on unload it will be kfree's which can't work.
      
      Steps to reproduce:
      
      	modprobe rose
      	rmmod rose
      
      BUG: unable to handle kernel NULL pointer dereference at virtual address 00000008
       printing eip:
      c014c664
      *pde = 00000000
      Oops: 0000 [#1]
      PREEMPT DEBUG_PAGEALLOC
      Modules linked in: rose ax25 fan ufs loop usbhid rtc snd_intel8x0 snd_ac97_codec ehci_hcd ac97_bus uhci_hcd thermal usbcore button processor evdev sr_mod cdrom
      CPU:    0
      EIP:    0060:[<c014c664>]    Not tainted VLI
      EFLAGS: 00210086   (2.6.23-rc9 #3)
      EIP is at kfree+0x48/0xa1
      eax: 00000556   ebx: c1734aa0   ecx: f6a5e000   edx: f7082000
      esi: 00000000   edi: f9a55d20   ebp: 00200287   esp: f6a5ef28
      ds: 007b   es: 007b   fs: 0000  gs: 0033  ss: 0068
      Process rmmod (pid: 1823, ti=f6a5e000 task=f7082000 task.ti=f6a5e000)
      Stack: f9a55d20 f9a5200c 00000000 00000000 00000000 f6a5e000 f9a5200c f9a55a00
             00000000 bf818cf0 f9a51f3f f9a55a00 00000000 c0132c60 65736f72 00000000
             f69f9630 f69f9528 c014244a f6a4e900 00200246 f7082000 c01025e6 00000000
      Call Trace:
       [<f9a5200c>] rose_rt_free+0x1d/0x49 [rose]
       [<f9a5200c>] rose_rt_free+0x1d/0x49 [rose]
       [<f9a51f3f>] rose_exit+0x4c/0xd5 [rose]
       [<c0132c60>] sys_delete_module+0x15e/0x186
       [<c014244a>] remove_vma+0x40/0x45
       [<c01025e6>] sysenter_past_esp+0x8f/0x99
       [<c012bacf>] trace_hardirqs_on+0x118/0x13b
       [<c01025b6>] sysenter_past_esp+0x5f/0x99
       =======================
      Code: 05 03 1d 80 db 5b c0 8b 03 25 00 40 02 00 3d 00 40 02 00 75 03 8b 5b 0c 8b 73 10 8b 44 24 18 89 44 24 04 9c 5d fa e8 77 df fd ff <8b> 56 08 89 f8 e8 84 f4 fd ff e8 bd 32 06 00 3b 5c 86 60 75 0f
      EIP: [<c014c664>] kfree+0x48/0xa1 SS:ESP 0068:f6a5ef28
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f7c6bfbb
    • Brian Haley's avatar
      Fix ipv6 redirect processing, leads to TAHI failures. · e483eb68
      Brian Haley authored
      changeset bf0b48df from mainline.
      
      When the ICMPv6 Target address is multicast, Linux processes the
      redirect instead of dropping it.  The problem is in this code in
      ndisc_redirect_rcv():
      
               if (ipv6_addr_equal(dest, target)) {
                       on_link = 1;
               } else if (!(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) {
                       ND_PRINTK2(KERN_WARNING
                                  "ICMPv6 Redirect: target address is not
      link-local.\n");
                       return;
               }
      
      This second check will succeed if the Target address is, for example,
      FF02::1 because it has link-local scope.  Instead, it should be checking
      if it's a unicast link-local address, as stated in RFC 2461/4861 Section
      8.1:
      
             - The ICMP Target Address is either a link-local address (when
               redirected to a router) or the same as the ICMP Destination
               Address (when redirected to the on-link destination).
      
      I know this doesn't explicitly say unicast link-local address, but it's
      implied.
      
      This bug is preventing Linux kernels from achieving IPv6 Logo Phase II
      certification because of a recent error that was found in the TAHI test
      suite - Neighbor Disovery suite test 206 (v6LC.2.3.6_G) had the
      multicast address in the Destination field instead of Target field, so
      we were passing the test.  This won't be the case anymore.
      
      The patch below fixes this problem, and also fixes ndisc_send_redirect()
      to not send an invalid redirect with a multicast address in the Target
      field.  I re-ran the TAHI Neighbor Discovery section to make sure Linux
      passes all 245 tests now.
      Signed-off-by: default avatarBrian Haley <brian.haley@hp.com>
      Acked-by: default avatarDavid L Stevens <dlstevens@us.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e483eb68
    • Mitsuru Chinen's avatar
      Fix some cases of missed IPV6 DAD · 3b3ba80b
      Mitsuru Chinen authored
      changeset 0fcace22d38ce9216f5ba52f929a99d284aa7e49 from mainline
      
      To judge the timing for DAD, netif_carrier_ok() is used. However,
      there is a possibility that dev->qdisc stays noop_qdisc even if
      netif_carrier_ok() returns true. In that case, DAD NS is not sent out.
      We need to defer the IPv6 device initialization until a valid qdisc
      is specified.
      Signed-off-by: default avatarMitsuru Chinen <mitch@linux.vnet.ibm.com>
      Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      3b3ba80b
    • John W. Linville's avatar
      Fix ieee80211 handling of bogus hdrlength field · 1902abab
      John W. Linville authored
      changeset 04045f98 from mainline
      
      Reported by Chris Evans <scarybeasts@gmail.com>:
      
      > The summary is that an evil 80211 frame can crash out a victim's
      > machine. It only applies to drivers using the 80211 wireless code, and
      > only then to certain drivers (and even then depends on a card's
      > firmware not dropping a dubious packet). I must confess I'm not
      > keeping track of Linux wireless support, and the different protocol
      > stacks etc.
      >
      > Details are as follows:
      >
      > ieee80211_rx() does not explicitly check that "skb->len >= hdrlen".
      > There are other skb->len checks, but not enough to prevent a subtle
      > off-by-two error if the frame has the IEEE80211_STYPE_QOS_DATA flag
      > set.
      >
      > This leads to integer underflow and crash here:
      >
      > if (frag != 0)
      >    flen -= hdrlen;
      >
      > (flen is subsequently used as a memcpy length parameter).
      
      How about this?
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      1902abab
    • Stephen Hemminger's avatar
      Fix cls_u32 error return handling. · fda48520
      Stephen Hemminger authored
      changeset bf1b803b from mainline.
      Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      fda48520
    • David Miller's avatar
      Fix ESP host instance numbering. · c0d96d06
      David Miller authored
      changeset ff4abd6c in mainline.
      
      The ESP scsi driver does not initialize the host controller
      instance early enough, so the messages in the log confuse
      users.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c0d96d06
    • Thomas Gleixner's avatar
      ACPI: disable lower idle C-states across suspend/resume · f310d0f0
      Thomas Gleixner authored
      changeset b04e7bdb from mainline.
      
      device_suspend() calls ACPI suspend functions, which seems to have undesired
      side effects on lower idle C-states. It took me some time to realize that
      especially the VAIO BIOSes (both Andrews jinxed UP and my elfstruck SMP one)
      show this effect. I'm quite sure that other bug reports against suspend/resume
      about turning the system into a brick have the same root cause.
      
      After fishing in the dark for quite some time, I realized that removing the ACPI
      processor module before suspend (this removes the lower C-state functionality)
      made the problem disappear. Interestingly enough the propability of having a
      bricked box is influenced by various factors (interrupts, size of the ram image,
      ...). Even adding a bunch of printks in the wrong places made the problem go
      away. The previous periodic tick implementation simply pampered over the
      problem, which explains why the dyntick / clockevents changes made this more
      prominent.
      
      We avoid complex functionality during the boot process and we have to do the
      same during suspend/resume. It is a similar scenario and equaly fragile.
      
      Add suspend / resume functions to the ACPI processor code and disable the lower
      idle C-states across suspend/resume. Fall back to the default idle
      implementation (halt) instead.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Tested-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f310d0f0
  2. 10 Oct, 2007 14 commits
  3. 26 Sep, 2007 16 commits
    • Greg Kroah-Hartman's avatar
      Linux 2.6.22.9 · 9e6899a1
      Greg Kroah-Hartman authored
      9e6899a1
    • Larry Finger's avatar
      bcm43xx: Fix cancellation of work queue crashes · 4c532d5c
      Larry Finger authored
      port of 3f708697 from mainline.
      
      A crash upon booting that is caused by bcm43xx has been reported [1] and
      found to be due to a work queue being reinitialized while work on that
      queue is still pending. This fix modifies the shutdown of work queues and
      prevents periodic work from being requeued during shutdown. With this patch,
      no more crashes on reboot were observed by the original reporter. I do not
      get that particular failure on my system; however, when running a large
      number of ifdown/ifup sequences, my system would kernel panic with the
      'caps lock' light blinking at roughly a 1 Hz rate. In addition, there were
      infrequent failures in the firmware that resulted in 'IRQ READY TIMEOUT'
      errors. With this patch, no more of the first type of failure occur, and
      incidence of the second type is greatly reduced.
      
      [1] http://bugzilla.kernel.org/show_bug.cgi?id=8937Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Acked-by: default avatarMichael Buesch <mb@bu3sch.de>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4c532d5c
    • David Miller's avatar
      Fix sparc64 v100 platform booting. · f2727f8d
      David Miller authored
      commit 2cc7345f in mainline
      
      Subject: [PATCH] [SPARC64]: Fix booting on V100 systems.
      
      On the root PCI bus, the OBP device tree lists device 3 twice.
      Once as 'pm' and once as 'lomp'.
      
      Everything goes downhill from there.
      
      Ignore the second instance to workaround this.
      
      Thanks to Kövedi_Krisztián for the bug report and
      testing the fix.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f2727f8d
    • Adit Ranadive's avatar
      Fix pktgen src_mac handling. · 13af1611
      Adit Ranadive authored
      commit ce5d0b47 in mainline
      
      Subject: [PATCH] [PKTGEN]: srcmac fix
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      13af1611
    • Herbert Xu's avatar
      Fix datagram recvmsg NULL iov handling regression. · bbaded59
      Herbert Xu authored
      commit ef8aef55 in mainline
      
      Subject: [PATCH] [NET]: Do not dereference iov if length is zero
      
      When msg_iovlen is zero we shouldn't try to dereference
      msg_iov.  Right now the only thing that tries to do so
      is skb_copy_and_csum_datagram_iovec.  Since the total
      length should also be zero if msg_iovlen is zero, it's
      sufficient to check the total length there and simply
      return if it's zero.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      bbaded59
    • Ilpo Järvinen's avatar
      Fix TCP DSACK cwnd handling · 6d742fb6
      Ilpo Järvinen authored
      commit 49ff4bb4 in mainline.
      
      [TCP]: DSACK signals data receival, be conservative
      
      In case a DSACK is received, it's better to lower cwnd as it's
      a sign of data receival.
      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>
      6d742fb6
    • Ilpo Järvinen's avatar
      Handle snd_una in tcp_cwnd_down() · eb7bdad8
      Ilpo Järvinen authored
      commit 6ee8009e38006da81d2a53da1aaa27365552553e in mainline
      
      Subject: [PATCH 1/1] [TCP]: Also handle snd_una changes in tcp_cwnd_down
      
      tcp_cwnd_down must check for it too as it should be conservative
      in case of collapse stuff and also when receiver is trying to
      lie (though it wouldn't be successful anyway).
      
      Note:
      - Separated also is_dupack and do_lost in fast_retransalert
      	* Much cleaner look-and-feel now
      	* This time it really fixes cumulative ACK + many new
      	  SACK blocks recovery entry (I claimed this fixes with
      	  last patch but it wasn't). TCP will now call
      	  tcp_update_scoreboard regardless of is_dupack when
      	  in recovery as long as there is enough fackets_out.
      - Introduce FLAG_SND_UNA_ADVANCED
      	* Some prior_snd_una arguments are unnecessary after it
      - Added helper FLAG_ANY_PROGRESS to avoid long FLAG...|FLAG...
        constructs
      
      This is a reduced version of a mainline patch.
      Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      eb7bdad8
    • Stephen Hemminger's avatar
      Fix tc_ematch kbuild · 8f67cd4b
      Stephen Hemminger authored
      commit 09d74cdd88a59a18f2ad7cfa0b6045ed1817b632 in mainline.
      
      Subject: [PATCH] [KBUILD]: Sanitize tc_ematch headers.
      
      The headers in tc_ematch are used by iproute2, so these headers should
      be processed.
      Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8f67cd4b
    • Evgeniy Polyakov's avatar
      Fix oops in vlan and bridging code · 36e95db9
      Evgeniy Polyakov authored
      commit 8c7b43a2e58baa24002fa2b266d9a5007bc52a40 in mainline
      
      I tried to preserve bridging code as it was before, but logic is quite
      strange - I think we should free skb on error, since it is already
      unshared and thus will just leak.
      
      Herbert Xu states:
      
      > +	if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL)
      > +		goto out;
      
      If this happens it'll be a double-free on skb since we'll
      return NF_DROP which makes the caller free it too.
      
      We could return NF_STOLEN to prevent that but I'm not sure
      whether that's correct netfilter semantics.  Patrick, could
      you please make a call on this?
      
      Patrick McHardy states:
      
      NF_STOLEN should work fine here.
      Signed-off-by: default avatarEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      36e95db9
    • Jiri Kosina's avatar
      Fix ipv6 source address handling. · 29a2edbb
      Jiri Kosina authored
      commit 6ae5f983 in mainline
      
      The commit 95c385 broke proper source address selection for cases in which
      there is a address which is makred 'deprecated'. The commit mistakenly
      changed ifa->flags to ifa_result->flags (probably copy/paste error from a
      few lines above) in the 'Rule 3' address selection code.
      
      The patch restores the previous RFC-compliant behavior.
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      29a2edbb
    • Denis V. Lunev's avatar
      Fix IPV6 DAD handling · 7556e40b
      Denis V. Lunev authored
      commit 9e3be4b3 in mainline
      
      addrconf_dad_failure calls addrconf_dad_stop which takes referenced address
      and drops the count. So, in6_ifa_put perrformed at out: is extra. This
      results in message: "Freeing alive inet6 address" and not released dst entries.
      Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@openvz.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7556e40b
    • YOSHIFUJI Hideaki's avatar
      781514c1
    • Nick Bowler's avatar
      Fix IPSEC AH4 options handling · 770961c8
      Nick Bowler authored
      commit 8ee4f391831cb96916a8e8a05f04b1c1d7dd30d8 in mainline.
      
      In testing our ESP/AH offload hardware, I discovered an issue with how
      AH handles mutable fields in IPv4.  RFC 4302 (AH) states the following
      on the subject:
      
              For IPv4, the entire option is viewed as a unit; so even
              though the type and length fields within most options are immutable
              in transit, if an option is classified as mutable, the entire option
              is zeroed for ICV computation purposes.
      
      The current implementation does not zero the type and length fields,
      resulting in authentication failures when communicating with hosts
      that do (i.e. FreeBSD).
      
      I have tested record route and timestamp options (ping -R and ping -T)
      on a small network involving Windows XP, FreeBSD 6.2, and Linux hosts,
      with one router.  In the presence of these options, the FreeBSD and
      Linux hosts (with the patch or with the hardware) can communicate.
      The Windows XP host simply fails to accept these packets with or
      without the patch.
      
      I have also been trying to test source routing options (using
      traceroute -g), but haven't had much luck getting this option to work
      *without* AH, let alone with.
      Signed-off-by: default avatarNick Bowler <nbowler@ellipticsemi.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      770961c8
    • YOSHIFUJI Hideaki's avatar
      Fix IPV6 append OOPS. · 4674cae0
      YOSHIFUJI Hideaki authored
      commit e1f52208 in mainline.
      
      [IPv6]: Fix NULL pointer dereference in ip6_flush_pending_frames
      
      Some of skbs in sk->write_queue do not have skb->dst because
      we do not fill skb->dst when we allocate new skb in append_data().
      
      BTW, I think we may not need to (or we should not) increment some stats
      when using corking; if 100 sendmsg() (with MSG_MORE) result in 2 packets,
      how many should we increment?
      
      If 100, we should set skb->dst for every queued skbs.
      
      If 1 (or 2 (*)), we increment the stats for the first queued skb and
      we should just skip incrementing OutDiscards for the rest of queued skbs,
      adn we should also impelement this semantics in other places;
      e.g., we should increment other stats just once, not 100 times.
      
      *: depends on the place we are discarding the datagram.
      
      I guess should just increment by 1 (or 2).
      Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4674cae0
    • Patrick McHardy's avatar
      Fix inet_diag OOPS. · 6a43c15d
      Patrick McHardy authored
      commit 0a9c7301 in mainline
      
      [INET_DIAG]: Fix oops in netlink_rcv_skb
      
      netlink_run_queue() doesn't handle multiple processes processing the
      queue concurrently. Serialize queue processing in inet_diag to fix
      a oops in netlink_rcv_skb caused by netlink_run_queue passing a
      NULL for the skb.
      
      BUG: unable to handle kernel NULL pointer dereference at virtual address 00000054
      [349587.500454]  printing eip:
      [349587.500457] c03318ae
      [349587.500459] *pde = 00000000
      [349587.500464] Oops: 0000 [#1]
      [349587.500466] PREEMPT SMP
      [349587.500474] Modules linked in: w83627hf hwmon_vid i2c_isa
      [349587.500483] CPU:    0
      [349587.500485] EIP:    0060:[<c03318ae>]    Not tainted VLI
      [349587.500487] EFLAGS: 00010246   (2.6.22.3 #1)
      [349587.500499] EIP is at netlink_rcv_skb+0xa/0x7e
      [349587.500506] eax: 00000000   ebx: 00000000   ecx: c148d2a0   edx: c0398819
      [349587.500510] esi: 00000000   edi: c0398819   ebp: c7a21c8c   esp: c7a21c80
      [349587.500517] ds: 007b   es: 007b   fs: 00d8  gs: 0033  ss: 0068
      [349587.500521] Process oidentd (pid: 17943, ti=c7a20000 task=cee231c0 task.ti=c7a20000)
      [349587.500527] Stack: 00000000 c7a21cac f7c8ba78 c7a21ca4 c0331962 c0398819 f7c8ba00 0000004c
      [349587.500542]        f736f000 c7a21cb4 c03988e3 00000001 f7c8ba00 c7a21cc4 c03312a5 0000004c
      [349587.500558]        f7c8ba00 c7a21cd4 c0330681 f7c8ba00 e4695280 c7a21d00 c03307c6 7fffffff
      [349587.500578] Call Trace:
      [349587.500581]  [<c010361a>] show_trace_log_lvl+0x1c/0x33
      [349587.500591]  [<c01036d4>] show_stack_log_lvl+0x8d/0xaa
      [349587.500595]  [<c010390e>] show_registers+0x1cb/0x321
      [349587.500604]  [<c0103bff>] die+0x112/0x1e1
      [349587.500607]  [<c01132d2>] do_page_fault+0x229/0x565
      [349587.500618]  [<c03c8d3a>] error_code+0x72/0x78
      [349587.500625]  [<c0331962>] netlink_run_queue+0x40/0x76
      [349587.500632]  [<c03988e3>] inet_diag_rcv+0x1f/0x2c
      [349587.500639]  [<c03312a5>] netlink_data_ready+0x57/0x59
      [349587.500643]  [<c0330681>] netlink_sendskb+0x24/0x45
      [349587.500651]  [<c03307c6>] netlink_unicast+0x100/0x116
      [349587.500656]  [<c0330f83>] netlink_sendmsg+0x1c2/0x280
      [349587.500664]  [<c02fcce9>] sock_sendmsg+0xba/0xd5
      [349587.500671]  [<c02fe4d1>] sys_sendmsg+0x17b/0x1e8
      [349587.500676]  [<c02fe92d>] sys_socketcall+0x230/0x24d
      [349587.500684]  [<c01028d2>] syscall_call+0x7/0xb
      [349587.500691]  =======================
      [349587.500693] Code: f0 ff 4e 18 0f 94 c0 84 c0 0f 84 66 ff ff ff 89 f0 e8 86 e2 fc ff e9 5a ff ff ff f0 ff 40 10 eb be 55 89 e5 57 89 d7 56 89 c6 53 <8b> 50 54 83 fa 10 72 55 8b 9e 9c 00 00 00 31 c9 8b 03 83 f8 0f
      
      Reported by Athanasius <link@miggy.org>
      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>
      6a43c15d
    • Stephen Hemminger's avatar
      Fix device address listing for ipv4. · ae305630
      Stephen Hemminger authored
      commit 596e4150 in mainline
      
      Bug: http://bugzilla.kernel.org/show_bug.cgi?id=8876
      
      Not all ips are shown by "ip addr show" command when IPs number assigned to an
      interface is more than 60-80 (in fact it depends on broadcast/label etc
      presence on each address).
      
      Steps to reproduce:
      It's terribly simple to reproduce:
      
      # for i in $(seq 1 100); do ip ad add 10.0.$i.1/24 dev eth10 ; done
      # ip addr show
      
      this will _not_ show all IPs.
      Looks like the problem is in netlink/ipv4 message processing.
      
      This is fix from bug submitter, it looks correct.
      Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ae305630