1. 16 Nov, 2011 4 commits
    • 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
  2. 13 Nov, 2011 1 commit
  3. 11 Nov, 2011 2 commits
    • Matthew Garrett's avatar
      The Windows driver .inf disables ASPM on all cciss devices. Do the same. · 19373358
      Matthew Garrett authored
      Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
      Cc: iss_storagedev@hp.com
      Acked-by: default avatarMike Miller <mike.miller@hp.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      19373358
    • Rabin Vincent's avatar
      backing-dev: ensure wakeup_timer is deleted · 7a401a97
      Rabin Vincent authored
      bdi_prune_sb() in bdi_unregister() attempts to removes the bdi links
      from all super_blocks and then del_timer_sync() the writeback timer.
      
      However, this can race with __mark_inode_dirty(), leading to
      bdi_wakeup_thread_delayed() rearming the writeback timer on the bdi
      we're unregistering, after we've called del_timer_sync().
      
      This can end up with the bdi being freed with an active timer inside it,
      as in the case of the following dump after the removal of an SD card.
      
      Fix this by redoing the del_timer_sync() in bdi_destory().
      
       ------------[ cut here ]------------
       WARNING: at /home/rabin/kernel/arm/lib/debugobjects.c:262 debug_print_object+0x9c/0xc8()
       ODEBUG: free active (active state 0) object type: timer_list hint: wakeup_timer_fn+0x0/0x180
       Modules linked in:
       Backtrace:
       [<c00109dc>] (dump_backtrace+0x0/0x110) from [<c0236e4c>] (dump_stack+0x18/0x1c)
        r6:c02bc638 r5:00000106 r4:c79f5d18 r3:00000000
       [<c0236e34>] (dump_stack+0x0/0x1c) from [<c0025e6c>] (warn_slowpath_common+0x54/0x6c)
       [<c0025e18>] (warn_slowpath_common+0x0/0x6c) from [<c0025f28>] (warn_slowpath_fmt+0x38/0x40)
        r8:20000013 r7:c780c6f0 r6:c031613c r5:c780c6f0 r4:c02b1b29
       r3:00000009
       [<c0025ef0>] (warn_slowpath_fmt+0x0/0x40) from [<c015eb4c>] (debug_print_object+0x9c/0xc8)
        r3:c02b1b29 r2:c02bc662
       [<c015eab0>] (debug_print_object+0x0/0xc8) from [<c015f574>] (debug_check_no_obj_freed+0xac/0x1dc)
        r6:c7964000 r5:00000001 r4:c7964000
       [<c015f4c8>] (debug_check_no_obj_freed+0x0/0x1dc) from [<c00a9e38>] (kmem_cache_free+0x88/0x1f8)
       [<c00a9db0>] (kmem_cache_free+0x0/0x1f8) from [<c014286c>] (blk_release_queue+0x70/0x78)
       [<c01427fc>] (blk_release_queue+0x0/0x78) from [<c015290c>] (kobject_release+0x70/0x84)
        r5:c79641f0 r4:c796420c
       [<c015289c>] (kobject_release+0x0/0x84) from [<c0153ce4>] (kref_put+0x68/0x80)
        r7:00000083 r6:c74083d0 r5:c015289c r4:c796420c
       [<c0153c7c>] (kref_put+0x0/0x80) from [<c01527d0>] (kobject_put+0x48/0x5c)
        r5:c79643b4 r4:c79641f0
       [<c0152788>] (kobject_put+0x0/0x5c) from [<c013ddd8>] (blk_cleanup_queue+0x68/0x74)
        r4:c7964000
       [<c013dd70>] (blk_cleanup_queue+0x0/0x74) from [<c01a6370>] (mmc_blk_put+0x78/0xe8)
        r5:00000000 r4:c794c400
       [<c01a62f8>] (mmc_blk_put+0x0/0xe8) from [<c01a64b4>] (mmc_blk_release+0x24/0x38)
        r5:c794c400 r4:c0322824
       [<c01a6490>] (mmc_blk_release+0x0/0x38) from [<c00de11c>] (__blkdev_put+0xe8/0x170)
        r5:c78d5e00 r4:c74083c0
       [<c00de034>] (__blkdev_put+0x0/0x170) from [<c00de2c0>] (blkdev_put+0x11c/0x12c)
        r8:c79f5f70 r7:00000001 r6:c74083d0 r5:00000083 r4:c74083c0
       r3:00000000
       [<c00de1a4>] (blkdev_put+0x0/0x12c) from [<c00b0724>] (kill_block_super+0x60/0x6c)
        r7:c7942300 r6:c79f4000 r5:00000083 r4:c74083c0
       [<c00b06c4>] (kill_block_super+0x0/0x6c) from [<c00b0a94>] (deactivate_locked_super+0x44/0x70)
        r6:c79f4000 r5:c031af64 r4:c794dc00 r3:c00b06c4
       [<c00b0a50>] (deactivate_locked_super+0x0/0x70) from [<c00b1358>] (deactivate_super+0x6c/0x70)
        r5:c794dc00 r4:c794dc00
       [<c00b12ec>] (deactivate_super+0x0/0x70) from [<c00c88b0>] (mntput_no_expire+0x188/0x194)
        r5:c794dc00 r4:c7942300
       [<c00c8728>] (mntput_no_expire+0x0/0x194) from [<c00c95e0>] (sys_umount+0x2e4/0x310)
        r6:c7942300 r5:00000000 r4:00000000 r3:00000000
       [<c00c92fc>] (sys_umount+0x0/0x310) from [<c000d940>] (ret_fast_syscall+0x0/0x30)
       ---[ end trace e5c83c92ada51c76 ]---
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarRabin Vincent <rabin.vincent@stericsson.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      7a401a97
  4. 10 Nov, 2011 1 commit
  5. 08 Nov, 2011 2 commits
    • Linus Torvalds's avatar
      Linux 3.2-rc1 · 1ea6b8f4
      Linus Torvalds authored
      .. with new name.  Because nothing says "really solid kernel release"
      like naming it after an extinct animal that just happened to be in the
      news lately.
      1ea6b8f4
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap · 075cb105
      Linus Torvalds authored
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (31 commits)
        ARM: OMAP: Fix export.h or module.h includes
        ARM: OMAP: omap_device: Include linux/export.h
        ARM: OMAP2: Fix H4 matrix keyboard warning
        ARM: OMAP1: Remove unused omap-alsa.h
        ARM: OMAP1: Fix warnings about enabling 32 KiHz timer
        ARM: OMAP2+: timer: Remove omap_device_pm_latency
        ARM: OMAP2+: clock data: Remove redundant timer clkdev
        ARM: OMAP: Devkit8000: Remove double omap_mux_init_gpio
        ARM: OMAP: usb: musb: OMAP: Delete unused function
        MAINTAINERS: Update linux-omap git repository
        ARM: OMAP: change get_context_loss_count ret value to int
        ARM: OMAP4: hsmmc: configure SDMMC1_DR0 properly
        ARM: OMAP4: hsmmc: Fix Pbias configuration on regulator OFF
        ARM: OMAP3: hwmod: fix variant registration and remove SmartReflex from common list
        ARM: OMAP: I2C: Fix omap_register_i2c_bus() return value on success
        ARM: OMAP: dmtimer: Include linux/module.h
        ARM: OMAP2+: l3-noc: Include linux/module.h
        ARM: OMAP2+: devices: Fixes for McPDM
        ARM: OMAP: Fix errors and warnings when building for one board
        ARM: OMAP3: PM: restrict erratum i443 handling to OMAP3430 only
        ...
      075cb105
  6. 07 Nov, 2011 30 commits