1. 22 Jul, 2009 7 commits
  2. 21 Jul, 2009 7 commits
  3. 20 Jul, 2009 14 commits
  4. 19 Jul, 2009 4 commits
    • Julia Lawall's avatar
      HID: Move dereferences below a NULL test · 76c317d6
      Julia Lawall authored
      If the NULL test is necessary, then the dereferences should be moved below
      the NULL test.
      
      The semantic patch that makes this change is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @@
      type T;
      expression E,E1;
      identifier i,fld;
      statement S;
      @@
      
      - T i = E->fld;
      + T i;
        ... when != E=E1
            when != i
        if (E == NULL||...) S
      + i = E->fld;
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      76c317d6
    • Jaswinder Singh Rajput's avatar
      ALSA: OSS sequencer should be initialized after snd_seq_system_client_init · f96e0808
      Jaswinder Singh Rajput authored
      When build SND_SEQUENCER in kernel then OSS sequencer(alsa_seq_oss_init)
      is initialized before System (snd_seq_system_client_init) which leads to
      memory leak :
      
      unreferenced object 0xf6b0e680 (size 256):
        comm "swapper", pid 1, jiffies 4294670753
        backtrace:
          [<c108ac5c>] create_object+0x135/0x204
          [<c108adfe>] kmemleak_alloc+0x26/0x4c
          [<c1087de2>] kmem_cache_alloc+0x72/0xff
          [<c126d2ac>] seq_create_client1+0x22/0x160
          [<c126e3b6>] snd_seq_create_kernel_client+0x72/0xef
          [<c1485a05>] snd_seq_oss_create_client+0x86/0x142
          [<c1485920>] alsa_seq_oss_init+0xf6/0x155
          [<c1001059>] do_one_initcall+0x4f/0x111
          [<c14655be>] kernel_init+0x115/0x166
          [<c10032af>] kernel_thread_helper+0x7/0x10
          [<ffffffff>] 0xffffffff
      unreferenced object 0xf688a580 (size 64):
        comm "swapper", pid 1, jiffies 4294670753
        backtrace:
          [<c108ac5c>] create_object+0x135/0x204
          [<c108adfe>] kmemleak_alloc+0x26/0x4c
          [<c1087de2>] kmem_cache_alloc+0x72/0xff
          [<c126f964>] snd_seq_pool_new+0x1c/0xb8
          [<c126d311>] seq_create_client1+0x87/0x160
          [<c126e3b6>] snd_seq_create_kernel_client+0x72/0xef
          [<c1485a05>] snd_seq_oss_create_client+0x86/0x142
          [<c1485920>] alsa_seq_oss_init+0xf6/0x155
          [<c1001059>] do_one_initcall+0x4f/0x111
          [<c14655be>] kernel_init+0x115/0x166
          [<c10032af>] kernel_thread_helper+0x7/0x10
          [<ffffffff>] 0xffffffff
      unreferenced object 0xf6b0e480 (size 256):
        comm "swapper", pid 1, jiffies 4294670754
        backtrace:
          [<c108ac5c>] create_object+0x135/0x204
          [<c108adfe>] kmemleak_alloc+0x26/0x4c
          [<c1087de2>] kmem_cache_alloc+0x72/0xff
          [<c12725a0>] snd_seq_create_port+0x51/0x21c
          [<c126de50>] snd_seq_ioctl_create_port+0x57/0x13c
          [<c126d07a>] snd_seq_do_ioctl+0x4a/0x69
          [<c126d0de>] snd_seq_kernel_client_ctl+0x33/0x49
          [<c1485a74>] snd_seq_oss_create_client+0xf5/0x142
          [<c1485920>] alsa_seq_oss_init+0xf6/0x155
          [<c1001059>] do_one_initcall+0x4f/0x111
          [<c14655be>] kernel_init+0x115/0x166
          [<c10032af>] kernel_thread_helper+0x7/0x10
          [<ffffffff>] 0xffffffff
      
      The correct order should be :
      
      System (snd_seq_system_client_init) should be initialized before
      OSS sequencer(alsa_seq_oss_init) which is equivalent to :
      
      1. insmod sound/core/seq/snd-seq-device.ko
      2. insmod sound/core/seq/snd-seq.ko
      3. insmod sound/core/seq/snd-seq-midi-event.ko
      4. insmod sound/core/seq/oss/snd-seq-oss.ko
      
      Including sound/core/seq/oss/Makefile after other seq modules
      fixes the ordering and memory leak.
      Signed-off-by: default avatarJaswinder Singh Rajput <jaswinderrajput@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f96e0808
    • Julia Lawall's avatar
      ALSA: sound/isa: convert nested spin_lock_irqsave to spin_lock · fcb2954b
      Julia Lawall authored
      If spin_lock_irqsave is called twice in a row with the same second
      argument, the interrupt state at the point of the second call overwrites
      the value saved by the first call.  Indeed, the second call does not need
      to save the interrupt state, so it is changed to a simple spin_lock.
      
      The semantic match that finds this problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @@
      expression lock1,lock2;
      expression flags;
      @@
      
      *spin_lock_irqsave(lock1,flags)
      ... when != flags
      *spin_lock_irqsave(lock2,flags)
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      fcb2954b
    • Jaroslav Kysela's avatar
      ALSA: hda_codec: Check for invalid zero connections · 2e9bf247
      Jaroslav Kysela authored
      To prevent "Too many connections" message and the error path for some HDMI
      codecs (which makes onboard audio unusable), check for invalid zero
      connections for CONNECT_LIST verb.
      Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      2e9bf247
  5. 18 Jul, 2009 4 commits
  6. 17 Jul, 2009 4 commits
    • Tim Abbott's avatar
      vmlinux.lds.h: restructure BSS linker script macros · 04e448d9
      Tim Abbott authored
      The BSS section macros in vmlinux.lds.h currently place the .sbss
      input section outside the bounds of [__bss_start, __bss_end].  On all
      architectures except for microblaze that handle both .sbss and
      __bss_start/__bss_end, this is wrong: the .sbss input section is
      within the range [__bss_start, __bss_end].  Relatedly, the example
      code at the top of the file actually has __bss_start/__bss_end defined
      twice; I believe the right fix here is to define them in the
      BSS_SECTION macro but not in the BSS macro.
      
      Another problem with the current macros is that several
      architectures have an ALIGN(4) or some other small number just before
      __bss_stop in their linker scripts.  The BSS_SECTION macro currently
      hardcodes this to 4; while it should really be an argument.  It also
      ignores its sbss_align argument; fix that.
      
      mn10300 is the only user at present of any of the macros touched by
      this patch.  It looks like mn10300 actually was incorrectly converted
      to use the new BSS() macro (the alignment of 4 prior to conversion was
      a __bss_stop alignment, but the argument to the BSS macro is a start
      alignment).  So fix this as well.
      
      I'd like acks from Sam and David on this one.  Also CCing Paul, since
      he has a patch from me which will need to be updated to use
      BSS_SECTION(0, PAGE_SIZE, 4) once this gets merged.
      Signed-off-by: default avatarTim Abbott <tabbott@ksplice.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      04e448d9
    • Arnaud Lacombe's avatar
      kconfig: initialize the screen before using curses(3) functions · d0e1e095
      Arnaud Lacombe authored
      This is needed on non ncurses based implementation to get a properly
      initialized `stdscr' in main().
      
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      d0e1e095
    • Arnaud Lacombe's avatar
      kconfig: variable argument lists needs `stdarg.h' · 668cdedf
      Arnaud Lacombe authored
      Fix build on non GNU based platforms.
      
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      668cdedf
    • maximilian attems's avatar
      kbuild, deb-pkg: fix install scripts for posix sh · 241ad11f
      maximilian attems authored
      bash versus dash and posh disagree on expanding $@ within double quotes:
      export x="$@"
      see http://bugs.debian.org/381091 for details
      just use the arglist with $*.
      
      dpkg: error processing linux-image-2.6.31-rc1_2.6.31-rc1-18_i386.deb (--install):
       subprocess pre-installation script returned error exit status 2
      export: 6: 2.6.31-rc1-18: bad variable name
      fixes http://bugzilla.kernel.org/show_bug.cgi?id=13567
      
      seen on Ubuntu as there dash is the default sh,
      versus bash on Debian.
      Reported-by: default avatarPauli <suokkos@gmail.com>
      Cc: Frans Pop <elendil@planet.nl>
      Signed-off-by: default avatarmaximilian attems <max@stro.at>
      Acked-By: default avatarAndres Salomon <dilinger@collabora.co.uk>
      241ad11f