1. 01 Aug, 2008 32 commits
    • David S. Miller's avatar
      sparc64: Fix cpufreq notifier registry. · 548da331
      David S. Miller authored
      [ Upstream commit 7ae93f51 ]
      
      Based upon a report by Daniel Smolik.
      
      We do it too early, which triggers a BUG in
      cpufreq_register_notifier().
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      548da331
    • David S. Miller's avatar
      sparc64: Fix lockdep issues in LDC protocol layer. · cbbe97a5
      David S. Miller authored
      [ Upstream commit b7c2a757 ]
      
      We're calling request_irq() with a IRQs disabled.
      
      No straightforward fix exists because we want to
      enable these IRQs and setup state atomically before
      getting into the IRQ handler the first time.
      
      What happens now is that we mark the VIRQ to not be
      automatically enabled by request_irq().  Then we
      make explicit enable_irq() calls when we grab the
      LDC channel.
      
      This way we don't need to call request_irq() illegally
      under the LDC channel lock any more.
      
      Bump LDC version and release date.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      cbbe97a5
    • David S. Miller's avatar
      tcp: Clear probes_out more aggressively in tcp_ack(). · 311fe373
      David S. Miller authored
      [ Upstream commit 4b53fb67 ]
      
      This is based upon an excellent bug report from Eric Dumazet.
      
      tcp_ack() should clear ->icsk_probes_out even if there are packets
      outstanding.  Otherwise if we get a sequence of ACKs while we do have
      packets outstanding over and over again, we'll never clear the
      probes_out value and eventually think the connection is too sick and
      we'll reset it.
      
      This appears to be some "optimization" added to tcp_ack() in the 2.4.x
      timeframe.  In 2.2.x, probes_out is pretty much always cleared by
      tcp_ack().
      
      Here is Eric's original report:
      
      ----------------------------------------
      Apparently, we can in some situations reset TCP connections in a couple of seconds when some frames are lost.
      
      In order to reproduce the problem, please try the following program on linux-2.6.25.*
      
      Setup some iptables rules to allow two frames per second sent on loopback interface to tcp destination port 12000
      
      iptables -N SLOWLO
      iptables -A SLOWLO -m hashlimit --hashlimit 2 --hashlimit-burst 1 --hashlimit-mode dstip --hashlimit-name slow2 -j ACCEPT
      iptables -A SLOWLO -j DROP
      
      iptables -A OUTPUT -o lo -p tcp --dport 12000 -j SLOWLO
      
      Then run the attached program and see the output :
      
      # ./loop
      State      Recv-Q Send-Q                                  Local Address:Port                                    Peer Address:Port
      ESTAB      0      40                                          127.0.0.1:54455                                      127.0.0.1:12000  timer:(persist,200ms,1)
      State      Recv-Q Send-Q                                  Local Address:Port                                    Peer Address:Port
      ESTAB      0      40                                          127.0.0.1:54455                                      127.0.0.1:12000  timer:(persist,200ms,3)
      State      Recv-Q Send-Q                                  Local Address:Port                                    Peer Address:Port
      ESTAB      0      40                                          127.0.0.1:54455                                      127.0.0.1:12000  timer:(persist,200ms,5)
      State      Recv-Q Send-Q                                  Local Address:Port                                    Peer Address:Port
      ESTAB      0      40                                          127.0.0.1:54455                                      127.0.0.1:12000  timer:(persist,200ms,7)
      State      Recv-Q Send-Q                                  Local Address:Port                                    Peer Address:Port
      ESTAB      0      40                                          127.0.0.1:54455                                      127.0.0.1:12000  timer:(persist,200ms,9)
      State      Recv-Q Send-Q                                  Local Address:Port                                    Peer Address:Port
      ESTAB      0      40                                          127.0.0.1:54455                                      127.0.0.1:12000  timer:(persist,200ms,11)
      State      Recv-Q Send-Q                                  Local Address:Port                                    Peer Address:Port
      ESTAB      0      40                                          127.0.0.1:54455                                      127.0.0.1:12000  timer:(persist,201ms,13)
      State      Recv-Q Send-Q                                  Local Address:Port                                    Peer Address:Port
      ESTAB      0      40                                          127.0.0.1:54455                                      127.0.0.1:12000  timer:(persist,188ms,15)
      write(): Connection timed out
      wrote 890 bytes but was interrupted after 9 seconds
      ESTAB      0      0                 127.0.0.1:12000            127.0.0.1:54455
      Exiting read() because no data available (4000 ms timeout).
      read 860 bytes
      
      While this tcp session makes progress (sending frames with 50 bytes of payload, every 500ms), linux tcp stack decides to reset it, when tcp_retries 2 is reached (default value : 15)
      
      tcpdump :
      
      15:30:28.856695 IP 127.0.0.1.56554 > 127.0.0.1.12000: S 33788768:33788768(0) win 32792 <mss 16396,nop,nop,sackOK,nop,wscale 7>
      15:30:28.856711 IP 127.0.0.1.12000 > 127.0.0.1.56554: S 33899253:33899253(0) ack 33788769 win 32792 <mss 16396,nop,nop,sackOK,nop,wscale 7>
      15:30:29.356947 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 1:61(60) ack 1 win 257
      15:30:29.356966 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 61 win 257
      15:30:29.866415 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 61:111(50) ack 1 win 257
      15:30:29.866427 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 111 win 257
      15:30:30.366516 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 111:161(50) ack 1 win 257
      15:30:30.366527 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 161 win 257
      15:30:30.876196 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 161:211(50) ack 1 win 257
      15:30:30.876207 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 211 win 257
      15:30:31.376282 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 211:261(50) ack 1 win 257
      15:30:31.376290 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 261 win 257
      15:30:31.885619 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 261:311(50) ack 1 win 257
      15:30:31.885631 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 311 win 257
      15:30:32.385705 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 311:361(50) ack 1 win 257
      15:30:32.385715 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 361 win 257
      15:30:32.895249 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 361:411(50) ack 1 win 257
      15:30:32.895266 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 411 win 257
      15:30:33.395341 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 411:461(50) ack 1 win 257
      15:30:33.395351 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 461 win 257
      15:30:33.918085 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 461:511(50) ack 1 win 257
      15:30:33.918096 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 511 win 257
      15:30:34.418163 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 511:561(50) ack 1 win 257
      15:30:34.418172 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 561 win 257
      15:30:34.927685 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 561:611(50) ack 1 win 257
      15:30:34.927698 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 611 win 257
      15:30:35.427757 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 611:661(50) ack 1 win 257
      15:30:35.427766 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 661 win 257
      15:30:35.937359 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 661:711(50) ack 1 win 257
      15:30:35.937376 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 711 win 257
      15:30:36.437451 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 711:761(50) ack 1 win 257
      15:30:36.437464 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 761 win 257
      15:30:36.947022 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 761:811(50) ack 1 win 257
      15:30:36.947039 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 811 win 257
      15:30:37.447135 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 811:861(50) ack 1 win 257
      15:30:37.447203 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 861 win 257
      15:30:41.448171 IP 127.0.0.1.12000 > 127.0.0.1.56554: F 1:1(0) ack 861 win 257
      15:30:41.448189 IP 127.0.0.1.56554 > 127.0.0.1.12000: R 33789629:33789629(0) win 0
      
      Source of program :
      
      /*
       * small producer/consumer program.
       * setup a listener on 127.0.0.1:12000
       * Forks a child
       *   child connect to 127.0.0.1, and sends 10 bytes on this tcp socket every 100 ms
       * Father accepts connection, and read all data
       */
      #include <sys/types.h>
      #include <sys/socket.h>
      #include <netinet/in.h>
      #include <unistd.h>
      #include <stdio.h>
      #include <time.h>
      #include <sys/poll.h>
      
      int port = 12000;
      char buffer[4096];
      int main(int argc, char *argv[])
      {
              int lfd = socket(AF_INET, SOCK_STREAM, 0);
              struct sockaddr_in socket_address;
              time_t t0, t1;
              int on = 1, sfd, res;
              unsigned long total = 0;
              socklen_t alen = sizeof(socket_address);
              pid_t pid;
      
              time(&t0);
              socket_address.sin_family = AF_INET;
              socket_address.sin_port = htons(port);
              socket_address.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
      
              if (lfd == -1) {
                      perror("socket()");
                      return 1;
              }
              setsockopt(lfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int));
              if (bind(lfd, (struct sockaddr *)&socket_address, sizeof(socket_address)) == -1) {
                      perror("bind");
                      close(lfd);
                      return 1;
              }
              if (listen(lfd, 1) == -1) {
                      perror("listen()");
                      close(lfd);
                      return 1;
              }
              pid = fork();
              if (pid == 0) {
                      int i, cfd = socket(AF_INET, SOCK_STREAM, 0);
                      close(lfd);
                      if (connect(cfd, (struct sockaddr *)&socket_address, sizeof(socket_address)) == -1) {
                              perror("connect()");
                              return 1;
                              }
                      for (i = 0 ; ;) {
                              res = write(cfd, "blablabla\n", 10);
                              if (res > 0) total += res;
                              else if (res == -1) {
                                      perror("write()");
                                      break;
                              } else break;
                              usleep(100000);
                              if (++i == 10) {
                                      system("ss -on dst 127.0.0.1:12000");
                                      i = 0;
                              }
                      }
                      time(&t1);
                      fprintf(stderr, "wrote %lu bytes but was interrupted after %g seconds\n", total, difftime(t1, t0));
                      system("ss -on | grep 127.0.0.1:12000");
                      close(cfd);
                      return 0;
              }
              sfd = accept(lfd, (struct sockaddr *)&socket_address, &alen);
              if (sfd == -1) {
                      perror("accept");
                      return 1;
              }
              close(lfd);
              while (1) {
                      struct pollfd pfd[1];
                      pfd[0].fd = sfd;
                      pfd[0].events = POLLIN;
                      if (poll(pfd, 1, 4000) == 0) {
                              fprintf(stderr, "Exiting read() because no data available (4000 ms timeout).\n");
                              break;
                      }
                      res = read(sfd, buffer, sizeof(buffer));
                      if (res > 0) total += res;
                      else if (res == 0) break;
                      else perror("read()");
              }
              fprintf(stderr, "read %lu bytes\n", total);
              close(sfd);
              return 0;
      }
      ----------------------------------------
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      311fe373
    • Andrew Morton's avatar
      ARM: fix fls() for 64-bit arguments · a1ef23ea
      Andrew Morton authored
      commit 0c65f459 upstream
      
      arm's fls() is implemented as a macro, causing it to misbehave when passed
      64-bit arguments.  Fix.
      
      Cc: Nickolay Vinogradov <nickolay@protei.ru>
      Tested-by: default avatarKrzysztof Halasa <khc@pm.waw.pl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a1ef23ea
    • Jan Beulich's avatar
      vmlinux.lds: move __attribute__((__cold__)) functions back into final .text section · e79ef852
      Jan Beulich authored
      commit fb5e2b37 upstream
      
      Due to the addition of __attribute__((__cold__)) to a few symbols
      without adjusting the linker scripts, those symbols currently may end
      up outside the [_stext,_etext) range, as they get placed in
      .text.unlikely by (at least) gcc 4.3.0. This may confuse code not only
      outside of the kernel, symbol_put_addr()'s BUG() could also trigger.
      Hence we need to add .text.unlikely (and for future uses of
      __attribute__((__hot__)) also .text.hot) to the TEXT_TEXT() macro.
      
      Issue observed by Lukas Lipavsky.
      Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
      Tested-by: default avatarLukas Lipavsky <llipavsky@suse.cz>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e79ef852
    • David Brownell's avatar
      rtc-at91rm9200: avoid spurious irqs · 4e0567d4
      David Brownell authored
      commit 449321b3 upstream
      
      This fixes kernel http://bugzilla.kernel.org/show_bug.cgi?id=11112 (bogus
      RTC update IRQs reported) for rtc-at91rm9200 by scrubbing old IRQ status
      before enabling IRQs.
      
      It also removes nonfunctional periodic IRQ support from this driver;
      only update IRQs are reported, or provided by the hardware.
      
      I suspect some other RTCs probably have versions of #11112; it's easy to
      overlook, since most non-RTC drivers don't care about spurious IRQs:
      they're not reported to userspace.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Report-by: default avatarW Unruh <unruh@physics.ubc.ca>
      Cc: Andrew Victor <avictor.za@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4e0567d4
    • Jens Axboe's avatar
      ide-cd: fix oops when using growisofs · 4dd29fcb
      Jens Axboe authored
      commit e8e7b9eb upstream
      
      cdrom_read_capacity() will blindly return the capacity from the device
      without sanity-checking it.  This later causes code in fs/buffer.c to
      oops.
      
      Fix this by checking that the device is telling us sensible things.
      
      From: Jens Axboe <jens.axboe@oracle.com>
      Cc: Michael Buesch <mb@bu3sch.de>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <petkovbb@googlemail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      [bart: print device name instead of driver name]
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      [harvey: blocklen is a big-endian value]
      Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4dd29fcb
    • Jan Kratochvil's avatar
      x86: fix crash due to missing debugctlmsr on AMD K6-3 · 3ce75c55
      Jan Kratochvil authored
      commit d536b1f8 upstream
      
      currently if you use PTRACE_SINGLEBLOCK on AMD K6-3 (i586) it will crash.
      Kernel now wrongly assumes existing DEBUGCTLMSR MSR register there.
      
      Removed the assumption also for some other non-K6 CPUs but I am not sure there
      (but it can only bring small inefficiency there if my assumption is wrong).
      
      Based on info from Roland McGrath, Chuck Ebbert and Mikulas Patocka.
      More info at:
      	https://bugzilla.redhat.com/show_bug.cgi?id=456175Signed-off-by: default avatarJan Kratochvil <jan.kratochvil@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      3ce75c55
    • Miao Xie's avatar
      cpusets: fix wrong domain attr updates · d4f38652
      Miao Xie authored
      commit 91cd4d6e upstream
      
      Fix wrong domain attr updates, or we will always update the first sched
      domain attr.
      Signed-off-by: default avatarMiao Xie <miaox@cn.fujitsu.com>
      Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Cc: Paul Jackson <pj@sgi.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d4f38652
    • Alexey Dobriyan's avatar
      proc: fix /proc/*/pagemap some more · 81952a23
      Alexey Dobriyan authored
      commit ee1e6ab6 upstream
      
      struct pagemap_walk was placed on stack, some hooks are initialized, the
      rest (->pgd_entry, ->pud_entry, ->pte_entry) are valid but junk.
      Reported-by: default avatarEric Sesterhenn <snakebyte@gmx.de>
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Cc: "Vegard Nossum" <vegard.nossum@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      81952a23
    • Atsushi Nemoto's avatar
      Fix build on COMPAT platforms when CONFIG_EPOLL is disabled · 12b47b11
      Atsushi Nemoto authored
      commit 5f17156f upstream
      
      Add missing cond_syscall() entry for compat_sys_epoll_pwait.
      Signed-off-by: default avatarAtsushi Nemoto <anemo@mba.ocn.ne.jp>
      Cc: Davide Libenzi <davidel@xmailserver.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      12b47b11
    • Mathieu Desnoyers's avatar
      markers: fix duplicate modpost entry · 6fa4cd9a
      Mathieu Desnoyers authored
      commit: d35cb360
      
      When a kernel was rebuilt, the previous Module.markers was not cleared.
      It caused markers with different format strings to appear as duplicates
      when a markers was changed.  This problem is present since
      scripts/mod/modpost.c started to generate Module.markers, commit
      b2e3e658
      
      It therefore applies to 2.6.25, 2.6.26 and linux-next.
      
      I merely merged the patches from Roland, Wenji and Takashi here.
      
      Credits to
      Roland McGrath <roland@redhat.com>
      Wenji Huang <wenji.huang@oracle.com>
      and
      Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
      
      for providing the individual fixes.
      
      - Changelog :
        - Integrated Takashi's Makefile modification to clear Module.markers upon
          make clean.
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Wenji Huang <wenji.huang@oracle.com>
      Cc: Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6fa4cd9a
    • H. Peter Anvin's avatar
      x86, suspend, acpi: enter Big Real Mode · 94b73c67
      H. Peter Anvin authored
      Commit 3bf2e774 upstream
      
      x86, suspend, acpi: enter Big Real Mode
      
      The explanation for recent video BIOS suspend quirk failures is that
      the VESA BIOS expects to be entered in Big Real Mode (*.limit = 0xffffffff)
      instead of ordinary Real Mode (*.limit = 0xffff).
      
      This patch changes the segment descriptors to Big Real Mode instead.
      
      The segment descriptor registers (what Intel calls "segment cache") is
      always active.  The only thing that changes based on CR0.PE is how it is
      *loaded* and the interpretation of the CS flags.
      
      The segment descriptor registers contain of the following sub-registers:
      selector (the "visible" part), base, limit and flags.  In protected mode
      or long mode, they are loaded from descriptors (or fs.base or gs.base can
      be manipulated directly in long mode.)  In real mode, the only thing
      changed by a segment register load is the selector and the base, where the
      base <- selector << 4.  In particular, *the limit and the flags are not
      changed*.
      
      As far as the handling of the CS flags: a code segment cannot be writable
      in protected mode, whereas it is "just another segment" in real mode, so
      there is some kind of quirk that kicks in for this when CR0.PE <- 0.  I'm
      not sure if this is accomplished by actually changing the cs.flags register
      or just changing the interpretation; it might be something that is
      CPU-specific.  In particular, the Transmeta CPUs had an explicit "CS is
      writable if you're in real mode" override, so even if you had loaded CS
      with an execute-only segment it'd be writable (but not readable!) on return
      to real mode.  I'm not at all sure if that is how other CPUs behave.
      Signed-off-by: default avatar"H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      94b73c67
    • Oliver Neukum's avatar
      USB: fix usb serial pm counter decrement for disconnected interfaces · d10b263f
      Oliver Neukum authored
      commit 62ad296b upstream
      
      usb serial decrements the pm counter even if an interface has been
      disconnected. If it was a logical disconnect the interface may belong
      already to another driver. This patch introduces a check for disconnected
      interfaces.
      Signed-off-by: default avatarOliver Neukum <oneukum@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d10b263f
    • Ingo Molnar's avatar
      x86 reboot quirks: add Dell Precision WorkStation T5400 · d114d08c
      Ingo Molnar authored
      commit fab3b58d upstream
      
      as reported in:
      
        "reboot=bios is mandatory on Dell T5400 server."
        http://bugzilla.kernel.org/show_bug.cgi?id=11108
      
      add a DMI reboot quirk.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d114d08c
    • Herton Ronaldo Krzesinski's avatar
      Fix typos from signal_32/64.h merge · f26eb5b7
      Herton Ronaldo Krzesinski authored
      commit 723edb50 upstream
      
      Fallout from commit 33185c50 ("x86:
      merge signal_32/64.h")
      
      Thanks to Dick Streefland who provided an useful testcase on
      http://lkml.org/lkml/2008/3/17/205 (only applicable to 2.6.24.x), that
      helped a lot as a deterministic way to bisect an issue that leaded to
      this fix.
      Signed-off-by: default avatarHerton Ronaldo Krzesinski <herton@mandriva.com.br>
      Signed-off-by: default avatarLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
      Cc: Roland McGrath <roland@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f26eb5b7
    • Paul E. McKenney's avatar
      rcu: fix rcu_try_flip_waitack_needed() to prevent grace-period stall · 6c6748b2
      Paul E. McKenney authored
      commit d7c06513 upstream
      
      The comment was correct -- need to make the code match the comment.
      Without this patch, if a CPU goes dynticks idle (and stays there forever)
      in just the right phase of preemptible-RCU grace-period processing,
      grace periods stall.  The offending sequence of events (courtesy
      of Promela/spin, at least after I got the liveness criterion coded
      correctly...) is as follows:
      
      o	CPU 0 is in dynticks-idle mode.  Its dynticks_progress_counter
      	is (say) 10.
      
      o	CPU 0 takes an interrupt, so rcu_irq_enter() increments CPU 0's
      	dynticks_progress_counter to 11.
      
      o	CPU 1 is doing RCU grace-period processing in rcu_try_flip_idle(),
      	sees rcu_pending(), so invokes dyntick_save_progress_counter(),
      	which in turn takes a snapshot of CPU 0's dynticks_progress_counter
      	into CPU 0's rcu_dyntick_snapshot -- now set to 11.  CPU 1 then
      	updates the RCU grace-period state to rcu_try_flip_waitack().
      
      o	CPU 0 returns from its interrupt, so rcu_irq_exit() increments
      	CPU 0's dynticks_progress_counter to 12.
      
      o	CPU 1 later invokes rcu_try_flip_waitack(), which notices that
      	CPU 0 has not yet responded, and hence in turn invokes
      	rcu_try_flip_waitack_needed().  This function examines the
      	state of CPU 0's dynticks_progress_counter and rcu_dyntick_snapshot
      	variables, which it copies to curr (== 12) and snap (== 11),
      	respectively.
      
      	Because curr!=snap, the first condition fails.
      
      	Because curr-snap is only 1 and snap is odd, the second
      	condition fails.
      
      	rcu_try_flip_waitack_needed() therefore incorrectly concludes
      	that it must wait for CPU 0 to explicitly acknowledge the
      	counter flip.
      
      o	CPU 0 remains forever in dynticks-idle mode, never taking
      	any more hardware interrupts or any NMIs, and never running
      	any more tasks.  (Of course, -something- will usually eventually
      	happen, which might be why we haven't seen this one in the
      	wild.  Still should be fixed!)
      
      Therefore the grace period never ends.  Fix is to make the code match
      the comment, as shown below.  With this fix, the above scenario
      would be satisfied with curr being even, and allow the grace period
      to proceed.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Josh Triplett <josh@kernel.org>
      Cc: Dipankar Sarma <dipankar@in.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6c6748b2
    • Roland McGrath's avatar
      Patch Upstream: x86 ptrace: fix PTRACE_GETFPXREGS error · a6f625f6
      Roland McGrath authored
      commit 45fdc3a7 upstream
      
      ptrace has always returned only -EIO for all failures to access
      registers.  The user_regset calls are allowed to return a more
      meaningful variety of errors.  The REGSET_XFP calls use -ENODEV
      for !cpu_has_fxsr hardware.  Make ptrace return the traditional
      -EIO instead of the error code from the user_regset call.
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a6f625f6
    • Avi Kivity's avatar
      KVM: MMU: Fix potential race setting upper shadow ptes on nonpae hosts · 8c5a4a12
      Avi Kivity authored
      Original-Commit-Hash: c23a6fe17abf8562e675465f8d55ba1a551d314d
      
      The direct mapped shadow code (used for real mode and two dimensional paging)
      sets upper-level ptes using direct assignment rather than calling
      set_shadow_pte().  A nonpae host will split this into two writes, which opens
      up a race if another vcpu accesses the same memory area.
      
      Fix by calling set_shadow_pte() instead of assigning directly.
      
      Noticed by Izik Eidus.
      Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      8c5a4a12
    • Marcelo Tosatti's avatar
      KVM: MMU: nuke shadowed pgtable pages and ptes on memslot destruction · c857ebba
      Marcelo Tosatti authored
      Original-Commit-Hash: 3cc312f03e06a8fa39ecb4cc0189efc2bd888899
      
      Flush the shadow mmu before removing regions to avoid stale entries.
      Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c857ebba
    • Mohammed Gamal's avatar
      KVM: x86 emulator: Fix HLT instruction · 205cb934
      Mohammed Gamal authored
      Original-Commit-Hash: bcc542267538e9ba933d08b4cd4ebd796e03a3d7
      
      This patch fixes issue encountered with HLT instruction
      under FreeDOS's HIMEM XMS Driver.
      
      The HLT instruction jumped directly to the done label and
      skips updating the EIP value, therefore causing the guest
      to spin endlessly on the same instruction.
      
      The patch changes the instruction so that it writes back
      the updated EIP value.
      Signed-off-by: default avatarMohammed Gamal <m.gamal005@gmail.com>
      Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      205cb934
    • Sheng Yang's avatar
      KVM: VMX: Add ept_sync_context in flush_tlb · 5c9e0efd
      Sheng Yang authored
      Original-Commit-Hash: 73f785350b92e1a3af945340f7d10f3978193cba
      
      Fix a potention issue caused by kvm_mmu_slot_remove_write_access(). The
      old behavior don't sync EPT TLB with modified EPT entry, which result
      in inconsistent content of EPT TLB and EPT table.
      Signed-off-by: default avatarSheng Yang <sheng.yang@intel.com>
      Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      5c9e0efd
    • Marcelo Tosatti's avatar
      KVM: mmu_shrink: kvm_mmu_zap_page requires slots_lock to be held · b1e0349e
      Marcelo Tosatti authored
      Original-Commit-Hash: 64f6a0c041bd8fc100a0d655058bdbc31feda03c
      
      kvm_mmu_zap_page() needs slots lock held (rmap_remove->gfn_to_memslot,
      for example).
      
      Since kvm_lock spinlock is held in mmu_shrink(), do a non-blocking
      down_read_trylock().
      
      Untested.
      Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b1e0349e
    • Joerg Roedel's avatar
      KVM: SVM: fix suspend/resume support · 88532fcf
      Joerg Roedel authored
      Original-Commit-Hash: ab6267b708bec563891294488f2e854be404bdaf
      
      On suspend the svm_hardware_disable function is called which frees all svm_data
      variables. On resume they are not re-allocated. This patch removes the
      deallocation of svm_data from the hardware_disable function to the
      hardware_unsetup function which is not called on suspend.
      Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
      Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      88532fcf
    • Sheng Yang's avatar
      KVM: VMX: Fix a wrong usage of vmcs_config · 82506d9b
      Sheng Yang authored
      Original-Commit-Hash: 406046a9638a455876b030853862e576a4378d29
      
      The function ept_update_paging_mode_cr0() write to
      CPU_BASED_VM_EXEC_CONTROL based on vmcs_config.cpu_based_exec_ctrl. That's
      wrong because the variable may not consistent with the content in the
      CPU_BASE_VM_EXEC_CONTROL MSR.
      Signed-off-by: default avatarSheng Yang <sheng.yang@intel.com>
      Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      82506d9b
    • Adam Greenblatt's avatar
      isofs: fix minor filesystem corruption · c7cc70b6
      Adam Greenblatt authored
      commit c0a1633b upstream
      
      Some iso9660 images contain files with rockridge data that is either
      incorrect or incompletely parsed.  Prior to commit
      f2966632 ("[PATCH] rock: handle directory
      overflows") (included with kernel 2.6.13) the kernel ignored the rockridge
      data for these files, while still allowing the files to be accessed under
      their non-rockridge names.  That commit inadvertently changed things so
      that files with invalid rockridge data could not be accessed at all.  (I
      ran across the problem when comparing some old CDs with hard disk copies I
      had made long ago under kernel 2.4: a few of the files on the hard disk
      copies were no longer visible on the CDs.)
      
      This change reverts to the pre-2.6.13 behavior.
      Signed-off-by: default avatarAdam Greenblatt <adam.greenblatt@gmail.com>
      Reviewed-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c7cc70b6
    • Jan Kara's avatar
      quota: fix possible infinite loop in quota code · 6b918773
      Jan Kara authored
      commit b48d3805 upstream
      
      When quota structure is going to be dropped and it is dirty, quota code tries
      to write it.  If the write fails for some reason (e.  g.  transaction cannot
      be started because the journal is aborted), we try writing again and again and
      again...  Fix the problem by clearing the dirty bit even if the write failed.
      
      (akpm: for 2.6.27, 2.6.26.x and 2.6.25.x)
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Reviewed-by: default avatardingdinghua <dingdinghua85@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6b918773
    • Micah Dowty's avatar
      hdlcdrv: Fix CRC calculation. · 5f817e2b
      Micah Dowty authored
      [ Upstream commit ae6134bd ]
      
      This is a trivial patch against the hdlcdrv module that fixes its CRC
      calculation. The finished CRC was overwriting the first two bytes of
      each packet rather than being appended to the end.
      
      I've tested this with 2.6.8 and 2.6.10-rc1, but hdlcdrv hasn't changed
      much recently so it should work with many other kernel versions.
      Signed-off-by: default avatarMicah Dowty <micah@navi.cx>
      Acked-by: default avatarThomas Sailer <t.sailer@alumni.ethz.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      5f817e2b
    • David S. Miller's avatar
      ipv6: __KERNEL__ ifdef struct ipv6_devconf · 75a3a965
      David S. Miller authored
      [ Upstream commit ebb36a97 ]
      
      Based upon a report by Olaf Hering.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      75a3a965
    • Stephen Hemminger's avatar
      ipv6: use timer pending · 579effcc
      Stephen Hemminger authored
      [ Upstream commit 847499ce ]
      
      This fixes the bridge reference count problem and cleanups ipv6 FIB
      timer management.  Don't use expires field, because it is not a proper
      way to test, instead use timer_pending().
      Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      579effcc
    • Gerrit Renker's avatar
      udplite: Protection against coverage value wrap-around · 5844cdf8
      Gerrit Renker authored
      [ Upstream commit 47112e25 ]
      
      This patch clamps the cscov setsockopt values to a maximum of 0xFFFF.
      
      Setsockopt values greater than 0xffff can cause an unwanted
      wrap-around.  Further, IPv6 jumbograms are not supported (RFC 3838,
      3.5), so that values greater than 0xffff are not even useful.
      
      Further changes: fixed a typo in the documentation.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      5844cdf8
    • Karl Beldan's avatar
      a51ea045
  2. 13 Jul, 2008 6 commits
  3. 12 Jul, 2008 2 commits