1. 18 Nov, 2011 6 commits
  2. 17 Nov, 2011 12 commits
  3. 16 Nov, 2011 22 commits
    • Mimi Zohar's avatar
      encrypted-keys: module build fixes · 9c698987
      Mimi Zohar authored
      Encrypted keys are encrypted/decrypted using either a trusted or
      user-defined key type, which is referred to as the 'master' key.
      The master key may be of type trusted iff the trusted key is
      builtin or both the trusted key and encrypted keys are built as
      modules.  This patch resolves the build dependency problem.
      
      - Use "masterkey-$(CONFIG_TRUSTED_KEYS)-$(CONFIG_ENCRYPTED_KEYS)" construct
      to encapsulate the above logic. (Suggested by Dimtry Kasatkin.)
      - Fixing the encrypted-keys Makefile, results in a module name change
      from encrypted.ko to encrypted-keys.ko.
      - Add module dependency for request_trusted_key() definition
      Signed-off-by: default avatarMimi Zohar <zohar@us.ibm.com>
      9c698987
    • Mimi Zohar's avatar
      encrypted-keys: fix error return code · f4a0d5ab
      Mimi Zohar authored
      Fix request_master_key() error return code.
      Signed-off-by: default avatarMimi Zohar <zohar@us.ibm.com>
      f4a0d5ab
    • Takashi Iwai's avatar
      ALSA: hda - Fix the connection selection of ADCs on Cirrus codecs · 05ee7964
      Takashi Iwai authored
      spec->cur_adc isn't set until cs_capture_pcm_prepare() is called although
      the driver tries to select the connection at init time and at auto-mic
      switch.  This results in the access to the widget NID 0, which is
      obviously invalid, also a wrong capture source.
      
      This patch fixes the issue by issuing the connect-select verb conditionally
      at appropriate places.
      Reported-and-tested-by: default avatarDylan Reid <dgreid@chromium.org>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      05ee7964
    • Takashi Iwai's avatar
      ALSA: hda - Update URLs in document · 25d7d59d
      Takashi Iwai authored
      Some stuff was moved from kernel.org to other places.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      25d7d59d
    • Wu Fengguang's avatar
      ALSA: hda - move eld->spk_alloc fixup to hdmi_update_eld() · 2d1b439b
      Wu Fengguang authored
      It looks more natural and saves two lines of code.
      Signed-off-by: default avatarWu Fengguang <fengguang.wu@intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      2d1b439b
    • Wu Fengguang's avatar
      ALSA: hda - delayed ELD repoll · 744626da
      Wu Fengguang authored
      The Intel HDMI chips (ironlake at least) are found to have ~250ms delay
      between the ELD_Valid=1 hotplug event is send and the ELD buffer becomes
      actually readable. During the time the ELD buffer is mysteriously all 0.
      
      Fix it by scheduling a delayed work to re-read ELD buffer after 300ms.
      Signed-off-by: default avatarWu Fengguang <fengguang.wu@intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      744626da
    • Wu Fengguang's avatar
      ALSA: hda - fix ELD memory leak · b95d68b8
      Wu Fengguang authored
      memset(eld) clears eld->proc_entry which will leak the struct
      snd_info_entry when unloading module.
      
      Fix it by
      - memset only the fields before eld->eld_buffer
      - set eld->eld_valid to true _after_ all eld fields have been filled
      
      Cc: <stable@kernel.org>
      Cc: Pierre-louis Bossart <pierre-louis.bossart@intel.com>
      Acked-by: default avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarWu Fengguang <fengguang.wu@intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b95d68b8
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 · 6aaf05f4
      Linus Torvalds authored
      * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
        [S390] topology: fix topology on z10 machines
        [S390] crypto: avoid MSA3 and MSA4 instructions in ESA mode
        [S390] avoid STCKF if running in ESA mode
        [S390] zfcpdump: Do not initialize zfcpdump in kdump mode
        [S390] ap: Setup processing for messages in request queue.
        [S390] Kconfig: Select CONFIG_KEXEC for CONFIG_CRASH_DUMP
        [S390] incorrect note program header
        [S390] pfault: ignore leftover completion interrupts
        [S390] fix pgste update logic
        [S390] wire up process_vm syscalls
      6aaf05f4
    • Shaohua Li's avatar
      block: add missed trace_block_plug · 019ceb7d
      Shaohua Li authored
      After flush plug list, the list has no request, so we need to add a
      trace_block_plug().
      Signed-off-by: default avatarShaohua Li <shaohua.li@intel.com>
      Reviewed-by: default avatarNamhyung Kim <namhyung@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      019ceb7d
    • Dan Carpenter's avatar
      paride: fix potential information leak in pg_read() · a2c2a0e6
      Dan Carpenter authored
      Smatch has a new check for Rosenberg type information leaks where structs
      are copied to the user with uninitialized stack data in them.  i In this
      case, the pg_write_hdr struct has a hole in it.
      
      struct pg_write_hdr {
              char                       magic;                /*     0     1 */
              char                       func;                 /*     1     1 */
              /* XXX 2 bytes hole, try to pack */
              int                        dlen;                 /*     4     4 */
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Cc: Tim Waugh <tim@cyberelk.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      a2c2a0e6
    • Dan Carpenter's avatar
      bio: change some signed vars to unsigned · 121f0994
      Dan Carpenter authored
      This is just a cleanup patch to silence a static checker warning.
      
      The problem is that we cap "nr_iovecs" so it can't be larger than
      "UIO_MAXIOV" but we don't check for negative values.  It turns out this is
      prevented at other layers, but logically it doesn't make sense to have
      negative nr_iovecs so making it unsigned is nicer.
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      121f0994
    • Shaohua Li's avatar
      block: avoid unnecessary plug list flush · 3540d5e8
      Shaohua Li authored
      get_request_wait() could sleep and flush the plug list.  If the list is
      already flushed, don't flush again.
      Signed-off-by: default avatarShaohua Li <shaohua.li@intel.com>
      Reviewed-by: default avatarNamhyung Kim <namhyung@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      3540d5e8
    • Stephen M. Cameron's avatar
      cciss: auto engage SCSI mid layer at driver load time · 0007a4c9
      Stephen M. Cameron authored
      A long time ago, probably in 2002, one of the distros, or maybe more than
      one, loaded block drivers prior to loading the SCSI mid layer.  This meant
      that the cciss driver, being a block driver, could not engage the SCSI mid
      layer at init time without panicking, and relied on being poked by a
      userland program after the system was up (and the SCSI mid layer was
      therefore present) to engage the SCSI mid layer.
      
      This is no longer the case, and cciss can safely rely on the SCSI mid
      layer being present at init time and engage the SCSI mid layer straight
      away.  This means that users will see their tape drives and medium
      changers at driver load time without need for a script in /etc/rc.d that
      does this:
      
      for x in /proc/driver/cciss/cciss*
      do
      	echo "engage scsi" > $x
      done
      
      However, if no tape drives or medium changers are detected, the SCSI mid
      layer will not be engaged.  If a tape drive or medium change is later
      hot-added to the system it will then be necessary to use the above script
      or similar for the device(s) to be acceesible.
      Signed-off-by: default avatarStephen M. Cameron <scameron@beardog.cce.hp.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      0007a4c9
    • Dmitry Monakhov's avatar
      loop: cleanup set_status interface · 7035b5df
      Dmitry Monakhov authored
      1) Anyone who has read access to loopdev has permission to call set_status
         and may change important parameters such as lo_offset, lo_sizelimit and
         so on, which contradicts to read access pattern and definitely equals
         to write access pattern.
      2) Add lo_offset over i_size check to prevent blkdev_size overflow.
         ##Testcase_bagin
         #dd if=/dev/zero of=./file bs=1k count=1
         #losetup /dev/loop0 ./file
         /* userspace_application */
         struct loop_info64 loinf;
         fd = open("/dev/loop0", O_RDONLY);
         ioctl(fd, LOOP_GET_STATUS64, &loinf);
         /* Set offset to any value which is bigger than i_size, and sizelimit
          * to nonzero value*/
         loinf.lo_offset = 4096*1024;
         loinf.lo_sizelimit = 1024;
         ioctl(fd, LOOP_SET_STATUS64, &loinf);
         /* After this loop device will have size similar to 0x7fffffffffxxxx */
         #blockdev --getsz /dev/loop0
         ##OUTPUT: 36028797018955968
         ##Testcase_end
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: default avatarDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      7035b5df
    • Stephen Rothwell's avatar
      include/linux/bio.h: use a static inline function for bio_integrity_clone() · 0c614e2d
      Stephen Rothwell authored
      When CONFIG_BLK_DEV_INTEGRITY is not set, we get these warnings:
      
      drivers/md/dm.c: In function 'split_bvec':
      drivers/md/dm.c:1061:3: warning: statement with no effect
      drivers/md/dm.c: In function 'clone_bio':
      drivers/md/dm.c:1088:3: warning: statement with no effect
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      0c614e2d
    • Dmitry Monakhov's avatar
      loop: prevent information leak after failed read · 3bb90682
      Dmitry Monakhov authored
      If read was not fully successful we have to fail whole bio to prevent
      information leak of old pages
      
      ##Testcase_begin
      dd if=/dev/zero of=./file bs=1M count=1
      losetup /dev/loop0 ./file -o 4096
      truncate -s 0 ./file
      # OOps loop offset is now beyond i_size, so read will silently fail.
      # So bio's pages would not be cleared, may which result in information leak.
      hexdump -C /dev/loop0
      ##testcase_end
      Signed-off-by: default avatarDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      3bb90682
    • Geoff Levand's avatar
      powerpc/ps3: Fix SMP lockdep boot warning · 7eaf09ee
      Geoff Levand authored
      Move the PS3 IPI message setup from ps3_smp_setup_cpu() to ps3_smp_probe().
      
      Fixes startup warnings like these:
      
        ------------[ cut here ]------------
        WARNING: at kernel/lockdep.c:2649
        Modules linked in:
        ...
        ---[ end trace 31fd0ba7d8756001 ]---
      Signed-off-by: default avatarGeoff Levand <geoff@infradead.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      7eaf09ee
    • Geoff Levand's avatar
      powerpc/ps3: Fix lost SMP IPIs · 72f3bea0
      Geoff Levand authored
      Fixes the PS3 bootup hang introduced in 3.0-rc1 by:
      
        commit 317f3941
        sched: Move the second half of ttwu() to the remote cpu
      
      Move the PS3's LV1 EOI call lv1_end_of_interrupt_ext() from ps3_chip_eoi()
      to ps3_get_irq() for IPI messages.
      
      If lv1_send_event_locally() is called between a previous call to
      lv1_send_event_locally() and the coresponding call to
      lv1_end_of_interrupt_ext() the second event will not be delivered to the
      target cpu.
      
      The PS3's SMP IPIs are implemented using lv1_send_event_locally(), so if two
      IPI messages of the same type are sent to the same target in a relatively
      short period of time the second IPI event can become lost when
      lv1_end_of_interrupt_ext() is called from ps3_chip_eoi().
      
      CC: stable@kernel.org
      Signed-off-by: default avatarGeoff Levand <geoff@infradead.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      72f3bea0
    • Michael Neuling's avatar
      powerpc: Add hvcall.h include to book3s_hv.c · de1d9248
      Michael Neuling authored
      If you build with KVM and UP it fails with the following due to a
      missing include.
      
      /arch/powerpc/kvm/book3s_hv.c: In function 'do_h_register_vpa':
      arch/powerpc/kvm/book3s_hv.c:156:10: error: 'H_PARAMETER' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_hv.c:156:10: note: each undeclared identifier is reported only once for each function it appears in
      arch/powerpc/kvm/book3s_hv.c:192:12: error: 'H_RESOURCE' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_hv.c:222:9: error: 'H_SUCCESS' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_hv.c: In function 'kvmppc_pseries_do_hcall':
      arch/powerpc/kvm/book3s_hv.c:228:30: error: 'H_SUCCESS' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_hv.c:232:7: error: 'H_CEDE' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_hv.c:234:7: error: 'H_PROD' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_hv.c:238:10: error: 'H_PARAMETER' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_hv.c:250:7: error: 'H_CONFER' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_hv.c:252:7: error: 'H_REGISTER_VPA' undeclared (first use in this function)
      make[2]: *** [arch/powerpc/kvm/book3s_hv.o] Error 1
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      cc: stable@kernel.org (3.1 only)
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      de1d9248
    • Kevin Hao's avatar
      powerpc/trace: Add a dummy stack frame for trace_hardirqs_off · 2cd76629
      Kevin Hao authored
      The trace_hardirqs_off will use CALLER_ADDR0 and CALLER_ADDR1.
      If an exception occurs in user mode, there is only one stack frame
      on the stack and accessing the CALLER_ADDR1 will causes the following
      call trace. So we create a dummy stack frame to make
      trace_hardirqs_off happy.
      
      WARNING: at kernel/smp.c:459
      Modules linked in:
      NIP: c0093280 LR: c00930a0 CTR: c0010780
      REGS: edb87ae0 TRAP: 0700   Not tainted  (3.1.0)
      MSR: 00021002 <ME,CE>  CR: 28002888  XER: 00000000
      TASK = edce2ac0[17658] 'mthread-lock-on' THREAD: edb86000 CPU: 5
      GPR00: 00000001 edb87b90 edce2ac0 00000005 c0019594 edb87bd8 00000001 00000fe3
      GPR08: 00041000 c084138c 4e20120d edb87b90 48002888 1001aa7c 00000000 00000000
      GPR16: 48830000 10012a8c 00000000 10000af4 00000001 c0810000 00000000 00000000
      GPR24: ee9aa920 c0816a18 00000000 00000005 c0019594 edb87bd8 ee20178c edb87b90
      NIP [c0093280] smp_call_function_many+0x214/0x2b4
      LR [c00930a0] smp_call_function_many+0x34/0x2b4
      Call Trace:
      [edb87b90] [c00930a0] smp_call_function_many+0x34/0x2b4 (unreliable)
      [edb87bd0] [c00194ec] __flush_tlb_page+0xac/0x100
      [edb87c00] [c001957c] flush_tlb_page+0x3c/0x54
      [edb87c10] [c00180ac] ptep_set_access_flags+0x74/0x12c
      [edb87c40] [c0128068] handle_pte_fault+0x2f0/0x9ac
      [edb87cb0] [c0128c3c] handle_mm_fault+0x104/0x1dc
      [edb87ce0] [c05f40f4] do_page_fault+0x2dc/0x630
      [edb87e50] [c001078c] handle_page_fault+0xc/0x80
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      2cd76629
    • Anton Blanchard's avatar
      powerpc: Copy down exception vectors after feature fixups · d715e433
      Anton Blanchard authored
      kdump fails because we try to execute an HV only instruction. Feature
      fixups are being applied after we copy the exception vectors down to 0
      so they miss out on any updates.
      
      We have always had this issue but it only became critical in v3.0
      when we added CFAR support (breaks POWER5) and v3.1 when we added
      POWERNV (breaks everyone).
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Cc: <stable@kernel.org> [v3.0+]
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d715e433
    • Anton Blanchard's avatar
      powerpc: panic if we can't instantiate RTAS · 6d1e2c6c
      Anton Blanchard authored
      I had to debug a strange situation where all manner of things were
      failing. SMT threads, storage and network were all completely broken.
      
      The root cause was we couldn't find enough memory to instantiate RTAS -
      this was a network install so the initrd was huge.
      
      Instead of limping along and failing in mysterious ways we should just
      panic up front if RTAS exists and we can't allocate space for it.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6d1e2c6c