15 Jan, 2012

1 commit

  • Introduce a wrapper around scsi_cmd_ioctl that takes a block device.

    The function will then be enhanced to detect partition block devices
    and, in that case, subject the ioctls to whitelisting.

    Cc: linux-scsi@vger.kernel.org
    Cc: Jens Axboe
    Cc: James Bottomley
    Signed-off-by: Paolo Bonzini
    Signed-off-by: Linus Torvalds

    Paolo Bonzini
     

05 Oct, 2010

1 commit

  • The block device drivers have all gained new lock_kernel
    calls from a recent pushdown, and some of the drivers
    were already using the BKL before.

    This turns the BKL into a set of per-driver mutexes.
    Still need to check whether this is safe to do.

    file=$1
    name=$2
    if grep -q lock_kernel ${file} ; then
    if grep -q 'include.*linux.mutex.h' ${file} ; then
    sed -i '/include.*/d' ${file}
    else
    sed -i 's/include.*.*$/include /g' ${file}
    fi
    sed -i ${file} \
    -e "/^#include.*linux.mutex.h/,$ {
    1,/^\(static\|int\|long\)/ {
    /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);

    } }" \
    -e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
    -e '/[ ]*cycle_kernel_lock();/d'
    else
    sed -i -e '/include.*\/d' ${file} \
    -e '/cycle_kernel_lock()/d'
    fi

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

08 Aug, 2010

1 commit

  • As a preparation for the removal of the big kernel
    lock in the block layer, this removes the BKL
    from the common ioctl handling code, moving it
    into every single driver still using it.

    Signed-off-by: Arnd Bergmann
    Acked-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Arnd Bergmann
     

15 May, 2009

6 commits


01 Apr, 2009

1 commit


02 Jan, 2009

1 commit

  • This makes the top-level function just allocate a single pc entry, and then
    pass it down as a pointer to all the helper functions that also need one
    of those "struct ide_atapi_pc" things. As far as I can tell, the use of
    these things never overlaps each other, BUT I DID NOT CHECK VERY CLOSELY!

    So I'm not guaranteeing this is correct, and I don't have the hardware. It
    would be good for somebody who knows the code more, and has the hardware,
    could please test this?

    With this, ide-floppy still has fairly big stack usage, but instead of

    idefloppy_ioctl [vmlinux]: 1208
    ide_floppy_get_capacity [vmlinux]: 872
    idefloppy_release [vmlinux]: 408
    idefloppy_open [vmlinux]: 408

    where those two first ones are at the very top of the list of stack users
    for me, it's now

    ide_floppy_get_capacity [vmlinux]: 404
    ide_floppy_ioctl [vmlinux]: 364

    ie they are still high, but they are no longer at the top.

    Borislav: Since ide_floppy_get_capacity is passed as a function pointer to other
    parts of the kernel (e.g., block layer) we need that ide_atapi_pc to be created
    on stack. Also, redid stack users numbers above. The two functions missing from
    Linus' original 'make stackusage' output are due to ide being
    rewritten/reorganized atm.

    Signed-off-by: Linus Torvalds
    Signed-off-by: Borislav Petkov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Linus Torvalds
     

21 Oct, 2008

4 commits


18 Oct, 2008

3 commits


14 Oct, 2008

2 commits


11 Oct, 2008

1 commit

  • While at it:

    - idefloppy_create_read_capacity_cmd() -> ide_floppy_create_read_capacity_cmd()
    - idefloppy_create_mode_sense_cmd() -> ide_floppy_create_mode_sense_cmd()
    - idefloppy_create_request_sense_cmd() -> ide_floppy_create_request_sense_cmd()
    - idefloppy_create_format_unit_cmd() -> ide_floppy_create_format_unit_cmd()
    - idefloppy_get_sfrp_bit() -> ide_floppy_get_sfrp_bit()

    Acked-by: Borislav Petkov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz