1. 24 Oct, 2012 7 commits
  2. 22 Oct, 2012 13 commits
    • Randy Dunlap's avatar
      staging: ramster: depends on NET · b3ca610a
      Randy Dunlap authored
      ramster uses network interfaces that are only present when
      CONFIG_NET is enabled, so it should depend on NET.
      
      Fixes these build errors:
      
      drivers/built-in.o: In function `sc_kref_release':
      tcp.c:(.text+0x24b9af): undefined reference to `sock_release'
      drivers/built-in.o: In function `r2net_open_listening_sock':
      tcp.c:(.text+0x24ca2b): undefined reference to `sock_create'
      tcp.c:(.text+0x24cb91): undefined reference to `sock_release'
      drivers/built-in.o: In function `r2net_recv_tcp_msg':
      tcp.c:(.text+0x24cdbd): undefined reference to `sock_recvmsg'
      drivers/built-in.o: In function `r2net_send_tcp_msg':
      tcp.c:(.text+0x24d341): undefined reference to `sock_sendmsg'
      drivers/built-in.o: In function `r2net_start_connect':
      tcp.c:(.text+0x24d8fa): undefined reference to `sock_create'
      drivers/built-in.o: In function `r2net_shutdown_sc':
      tcp.c:(.text+0x24e30c): undefined reference to `kernel_sock_shutdown'
      drivers/built-in.o: In function `r2net_accept_one':
      tcp.c:(.text+0x24f392): undefined reference to `sock_create_lite'
      tcp.c:(.text+0x24f3c3): undefined reference to `sock_release'
      drivers/built-in.o: In function `r2net_stop_listening':
      (.text+0x250f63): undefined reference to `sock_release'
      Signed-off-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
      Cc: konrad.wilk@oracle.com
      Acked-by: default avatarDan Magenheimer <dan.magenheimer@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b3ca610a
    • Vincent Penquerc'h's avatar
    • Nitin Gupta's avatar
      staging: zram: Fix handling of incompressible pages · c8f2f0db
      Nitin Gupta authored
      Change 130f315a (staging: zram: remove special handle of uncompressed page)
      introduced a bug in the handling of incompressible pages which resulted in
      memory allocation failure for such pages.
      
      When a page expands on compression, say from 4K to 4K+30, we were trying to
      do zsmalloc(pool, 4K+30). However, the maximum size which zsmalloc can
      allocate is PAGE_SIZE (for obvious reasons), so such allocation requests
      always return failure (0).
      
      For a page that has compressed size larger than the original size (this may
      happen with already compressed or random data), there is no point storing
      the compressed version as that would take more space and would also require
      time for decompression when needed again. So, the fix is to store any page,
      whose compressed size exceeds a threshold (max_zpage_size), as-it-is i.e.
      without compression.  Memory required for storing this uncompressed page can
      then be requested from zsmalloc which supports PAGE_SIZE sized allocations.
      
      Lastly, the fix checks that we do not attempt to "decompress" the page which
      we stored in the uncompressed form -- we just memcpy() out such pages.
      Signed-off-by: default avatarNitin Gupta <ngupta@vflare.org>
      Reported-by: viechweg@gmail.com
      Reported-by: paerley@gmail.com
      Reported-by: wu.tommy@gmail.com
      Acked-by: default avatarMinchan Kim <minchan@kernel.org>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c8f2f0db
    • Arve Hjønnevåg's avatar
      Staging: android: binder: Allow using highmem for binder buffers · 585650dc
      Arve Hjønnevåg authored
      The default kernel mapping for the pages allocated for the binder
      buffers is never used. Set the __GFP_HIGHMEM flag when allocating
      these pages so we don't needlessly use low memory pages that may
      be required elsewhere.
      Signed-off-by: default avatarArve Hjønnevåg <arve@android.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      585650dc
    • Arve Hjønnevåg's avatar
      Staging: android: binder: Fix memory leak on thread/process exit · 675d66b0
      Arve Hjønnevåg authored
      If a thread or process exited while a reply, one-way transaction or
      death notification was pending, the struct holding the pending work
      was leaked.
      Signed-off-by: default avatarArve Hjønnevåg <arve@android.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      675d66b0
    • Ian Abbott's avatar
      staging: comedi: ni_labpc: fix possible NULL deref during detach · 922b67c1
      Ian Abbott authored
      `labpc_common_detach()` is called by the comedi core to clean up if
      either `labpc_attach()` (including the one in the "ni_labpc_cs" module)
      or `labpc_attach_pci()` returns an error.  It assumes the `thisboard`
      macro (expanding to `((struct labpc_board_struct *)dev->board_ptr)`) is
      non-null.  This is a valid assumption if `labpc_attach()` fails, but not
      if `labpc_attach_pci()` fails, leading to a possible NULL pointer
      dereference.
      
      Check `thisboard` at the top of `labpc_common_detach()` and return early
      if it is `NULL`.  This is okay because the only other thing that could
      have been allocated is `dev->private` and that is freed by the comedi
      core, not by this function.
      
      Cc: <stable@vger.kernel.org> # 3.6.x
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      922b67c1
    • Ian Abbott's avatar
      staging: comedi: das08: fix possible NULL deref during detach · ee280d13
      Ian Abbott authored
      `das08_detach()` is called by the comedi core to clean up if either
      `das08_attach()` or `das08_attach_pci()` returns an error.  It sets
      `thisboard` to the return value of `comedi_board(dev)` and assumes it is
      non-null.  This is a valid assumption if `das08_attach()` fails, but not
      if `das08_attach_pci()` fails, leading to a possible NULL pointer
      dereference.
      
      Check `thisboard` at the top of `das08_detach()` and return early if it
      is `NULL`.  This is okay because the only other thing that could have
      been allocated is `dev->private` and that is freed by the comedi core,
      not by this function.
      
      Cc: <stable@vger.kernel.org> # 3.6.x
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ee280d13
    • Ian Abbott's avatar
      staging: comedi: amplc_pc263: fix possible NULL deref during detach · 1d1171ff
      Ian Abbott authored
      `pc263_detach()` is called by the comedi core to clean up if either
      `pc263_attach()` or `pc263_attach_pci()` returns an error.  It sets
      `thisboard` to the return value of `comedi_board(dev)` and assumes it is
      non-null.  This is a valid assumption if `pc263_attach()` fails, but not
      if `pc263_attach_pci()` fails, leading to a possible NULL pointer
      dereference.
      
      Check `thisboard` at the top of `pc263_detach()` and return early if it
      is `NULL`.  This is okay because no other resources need cleaning up in
      this case.
      
      Cc: <stable@vger.kernel.org> # 3.6.x
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1d1171ff
    • Ian Abbott's avatar
      staging: comedi: amplc_pc236: fix possible NULL deref during detach · 2db012bd
      Ian Abbott authored
      `pc236_detach()` is called by the comedi core to clean up if either
      `pc236_attach()` or `pc236_attach_pci()` returns an error.  It sets
      `thisboard` to the return value of `comedi_board(dev)` and assumes it is
      non-null.  This is a valid assumption if `pc236_attach()` fails, but not
      if `pc236_attach_pci()` fails, leading to a possible NULL pointer
      dereference.
      
      Check `thisboard` at the top of `pc236_detach()` and return early if it
      is `NULL`.  This is okay because the only other thing that could have
      been allocated is `dev->private` and that is freed by the comedi core,
      not by this function.
      
      Cc: <stable@vger.kernel.org> # 3.6.x
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2db012bd
    • Ian Abbott's avatar
      staging: comedi: amplc_pc236: fix invalid register access during detach · aaeb61a9
      Ian Abbott authored
      `pc236_detach()` is called by the comedi core if it attempted to attach
      a device and failed.  `pc236_detach()` calls `pc236_intr_disable()` if
      the comedi device private data pointer (`devpriv`) is non-null.  This
      test is insufficient as `pc236_intr_disable()` accesses hardware
      registers and the attach routine may have failed before it has saved
      their I/O base addresses.
      
      Fix it by checking `dev->iobase` is non-zero before calling
      `pc236_intr_disable()` as that means the I/O base addresses have been
      saved and the hardware registers can be accessed.  It also implies the
      comedi device private data pointer is valid, so there is no need to
      check it.
      
      Cc: <stable@vger.kernel.org> # 3.5.x, 3.6.x
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      aaeb61a9
    • Ian Abbott's avatar
      staging: comedi: amplc_dio200: fix possible NULL deref during detach · dfb2540e
      Ian Abbott authored
      `dio200_detach()` is called by the comedi core to clean up if either
      `dio200_attach()` or `dio200_attach_pci()` return an error.  It assigns
      `thisboard` to the return value of `comedi_board(dev)` and assumes it is
      non-null.  In the case of a previous call to `dio200_attach()` it won't
      be `NULL` because the comedi core will have pointed it to one of the
      elements of `dio200_boards[]`, but in the case of a previous call to
      `dio200_attach_pci()` it could be `NULL`, leading to a null pointer
      dereference.
      
      Check that `thisboard` is valid at the top of `dio200_detach()` and
      return early if it is `NULL`.  This is okay because the only other thing
      that could have been allocated is `dev->private` and that is freed by
      the comedi core, not by this function.
      
      Cc: <stable@vger.kernel.org> # 3.6.x
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dfb2540e
    • Ian Abbott's avatar
      staging: comedi: 8255_pci: fix possible NULL deref during detach · f4dd2367
      Ian Abbott authored
      `pci_8255_detach()` will be called by the comedi core if
      `pci_8255_attach_pci()` returns an error.  It currently assumes that
      both `board` (assigned from the return value of `comedi_board(dev)`) and
      `devpriv` (assigned from `dev->private`) are non-null, but they might
      be null, leading to a null pointer dereference.
      
      `pci_8255_detach()` doesn't need to do anything if either `board` or
      `devpriv` are null, so just return early in this case.
      
      Cc: <stable@vger.kernel.org> # 3.6.x
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f4dd2367
    • Fred Brooks's avatar
      staging: comedi: ni_daq_700: fix dio subdevice regression · 6681e633
      Fred Brooks authored
      Here is a small patch to fix a problem caused by a previous patch that
      removed the  callback function.  The callback remove patch:
      http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=1de02225358988e8fd48d1dc3fd12336bbae258a
      
      I finally booted my dev machine on the latest kernel (running Debian
      here so it's still on 3.2 normally) to test the ni_daq_700 driver with
      my test program and noticed this bug.
      
      Shift the DIO_R read result to bits 8..15 Digital direction
      configuration: channels 0-7 output, 8-15 input (8225 device emu as port
      A output, port B input, port C N/A).
      
      Cc: <stable@vger.kernel.org> # 3.6.x
      Signed-off-by: default avatarFred Brooks <nsaspook@nsaspook.com>
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6681e633
  3. 20 Oct, 2012 1 commit
  4. 19 Oct, 2012 12 commits
  5. 14 Oct, 2012 6 commits
    • Linus Torvalds's avatar
      Linux 3.7-rc1 · ddffeb8c
      Linus Torvalds authored
      ddffeb8c
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · a5ef3f7d
      Linus Torvalds authored
      Pull MIPS update from Ralf Baechle:
       "Cleanups and fixes for breakage that occured earlier during this merge
        phase.  Also a few patches that didn't make the first pull request.
        Of those is the Alchemy work that merges code for many of the SOCs and
        evaluation boards thus among other code shrinkage, reduces the number
        of MIPS defconfigs by 5."
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (22 commits)
        MIPS: SNI: Switch RM400 serial to SCCNXP driver
        MIPS: Remove unused empty_bad_pmd_table[] declaration.
        MIPS: MT: Remove kspd.
        MIPS: Malta: Fix section mismatch.
        MIPS: asm-offset.c: Delete unused irq_cpustat_t struct offsets.
        MIPS: Alchemy: Merge PB1100/1500 support into DB1000 code.
        MIPS: Alchemy: merge PB1550 support into DB1550 code
        MIPS: Alchemy: Single kernel for DB1200/1300/1550
        MIPS: Optimize TLB refill for RI/XI configurations.
        MIPS: proc: Cleanup printing of ASEs.
        MIPS: Hardwire detection of DSP ASE Rev 2 for systems, as required.
        MIPS: Add detection of DSP ASE Revision 2.
        MIPS: Optimize pgd_init and pmd_init
        MIPS: perf: Add perf functionality for BMIPS5000
        MIPS: perf: Split the Kconfig option CONFIG_MIPS_MT_SMP
        MIPS: perf: Remove unnecessary #ifdef
        MIPS: perf: Add cpu feature bit for PCI (performance counter interrupt)
        MIPS: perf: Change the "mips_perf_event" table unsupported indicator.
        MIPS: Align swapper_pg_dir to 64K for better TLB Refill code.
        vmlinux.lds.h: Allow architectures to add sections to the front of .bss
        ...
      a5ef3f7d
    • Linus Torvalds's avatar
      Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · d25282d1
      Linus Torvalds authored
      Pull module signing support from Rusty Russell:
       "module signing is the highlight, but it's an all-over David Howells frenzy..."
      
      Hmm "Magrathea: Glacier signing key". Somebody has been reading too much HHGTTG.
      
      * 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (37 commits)
        X.509: Fix indefinite length element skip error handling
        X.509: Convert some printk calls to pr_devel
        asymmetric keys: fix printk format warning
        MODSIGN: Fix 32-bit overflow in X.509 certificate validity date checking
        MODSIGN: Make mrproper should remove generated files.
        MODSIGN: Use utf8 strings in signer's name in autogenerated X.509 certs
        MODSIGN: Use the same digest for the autogen key sig as for the module sig
        MODSIGN: Sign modules during the build process
        MODSIGN: Provide a script for generating a key ID from an X.509 cert
        MODSIGN: Implement module signature checking
        MODSIGN: Provide module signing public keys to the kernel
        MODSIGN: Automatically generate module signing keys if missing
        MODSIGN: Provide Kconfig options
        MODSIGN: Provide gitignore and make clean rules for extra files
        MODSIGN: Add FIPS policy
        module: signature checking hook
        X.509: Add a crypto key parser for binary (DER) X.509 certificates
        MPILIB: Provide a function to read raw data into an MPI
        X.509: Add an ASN.1 decoder
        X.509: Add simple ASN.1 grammar compiler
        ...
      d25282d1
    • Matt Fleming's avatar
      x86, boot: Explicitly include autoconf.h for hostprogs · b6eea87f
      Matt Fleming authored
      The hostprogs need access to the CONFIG_* symbols found in
      include/generated/autoconf.h.  But commit abbf1590 ("UAPI: Partition
      the header include path sets and add uapi/ header directories") replaced
      $(LINUXINCLUDE) with $(USERINCLUDE) which doesn't contain the necessary
      include paths.
      
      This has the undesirable effect of breaking the EFI boot stub because
      the #ifdef CONFIG_EFI_STUB code in arch/x86/boot/tools/build.c is
      never compiled.
      
      It should also be noted that because $(USERINCLUDE) isn't exported by
      the top-level Makefile it's actually empty in arch/x86/boot/Makefile.
      
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b6eea87f
    • Ingo Molnar's avatar
      perf: Fix UAPI fallout · 7d380c8f
      Ingo Molnar authored
      The UAPI commits forgot to test tooling builds such as tools/perf/,
      and this fixes the fallout.
      
      Manual conversion.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7d380c8f
    • Linus Torvalds's avatar
      Merge branch 'late-for-linus' of git://git.linaro.org/people/rmk/linux-arm · 3d6ee36d
      Linus Torvalds authored
      Pull ARM update from Russell King:
       "This is the final round of stuff for ARM, left until the end of the
        merge window to reduce the number of conflicts.  This set contains the
        ARM part of David Howells UAPI changes, and a fix to the ordering of
        'select' statements in ARM Kconfig files (see the appropriate commit
        for why this happened - thanks to Andrew Morton for pointing out the
        problem.)
      
        I've left this as long as I dare for this window to avoid conflicts,
        and I regenerated the config patch yesterday, posting it to our
        mailing list for review and testing.  I have several acks which
        include successful test reports for it.
      
        However, today I notice we've got new conflicts with previously unseen
        code...  though that conflict should be trivial (it's my changes vs a
        one liner.)"
      
      * 'late-for-linus' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: config: make sure that platforms are ordered by option string
        ARM: config: sort select statements alphanumerically
        UAPI: (Scripted) Disintegrate arch/arm/include/asm
      
      Fix up fairly conflict in arch/arm/Kconfig (the select re-organization
      vs recent addition of GENERIC_KERNEL_EXECVE)
      3d6ee36d
  6. 13 Oct, 2012 1 commit
    • Linus Torvalds's avatar
      Merge tag 'disintegrate-main-20121013' of git://git.infradead.org/users/dhowells/linux-headers · 0b381a28
      Linus Torvalds authored
      Pull UAPI disintegration for include/linux/{,byteorder/}*.h from David Howells:
       "The patches contained herein do the following:
      
       (1) Remove kernel-only stuff in linux/ppp-comp.h from the UAPI.  I checked
           this with Paul Mackerras before I created the patch and he suggested some
           extra bits to unexport.
      
       (2) Remove linux/blk_types.h entirely from the UAPI as none of it is userspace
           applicable, and remove from the UAPI that part of linux/fs.h that was the
           reason for linux/blk_types.h being exported in the first place.  I
           discussed this with Jens Axboe before creating the patch.
      
       (3) The big patch of the series to disintegrate include/linux/*.h as a unit.
           This could be split up, though there would be collisions in moving stuff
           between the two Kbuild files when the parts are merged as that file is
           sorted alphabetically rather than being grouped by subsystem.
      
           Of this set of headers, 17 files have changed in the UAPI exported region
           since the 4th and only 8 since the 9th so there isn't much change in this
           area - as one might expect.
      
           It should be pretty obvious and straightforward if it does come to fixing
           up: stuff in __KERNEL__ guards stays where it is and stuff outside moves
           to the same file in the include/uapi/linux/ directory.
      
           If a new file appears then things get a bit more complicated as the
           "headers +=" line has to move to include/uapi/linux/Kbuild.  Only one new
           file has appeared since the 9th and I judge this type of event relatively
           unlikely.
      
       (4) A patch to disintegrate include/linux/byteorder/*.h as a unit.
      
        Signed-off-by: David Howells <dhowells@redhat.com>"
      
      * tag 'disintegrate-main-20121013' of git://git.infradead.org/users/dhowells/linux-headers:
        UAPI: (Scripted) Disintegrate include/linux/byteorder
        UAPI: (Scripted) Disintegrate include/linux
        UAPI: Unexport linux/blk_types.h
        UAPI: Unexport part of linux/ppp-comp.h
      0b381a28