28 May, 2010

1 commit

  • Use memdup_user when user data is immediately copied into the
    allocated region.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    expression from,to,size,flag;
    position p;
    identifier l1,l2;
    @@

    - to = \(kmalloc@p\|kzalloc@p\)(size,flag);
    + to = memdup_user(from,size);
    if (
    - to==NULL
    + IS_ERR(to)
    || ...) {

    }
    - if (copy_from_user(to, from, size) != 0) {
    -
    - }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Julia Lawall
     

24 May, 2010

1 commit


21 May, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (182 commits)
    [SCSI] aacraid: add an ifdef'd device delete case instead of taking the device offline
    [SCSI] aacraid: prohibit access to array container space
    [SCSI] aacraid: add support for handling ATA pass-through commands.
    [SCSI] aacraid: expose physical devices for models with newer firmware
    [SCSI] aacraid: respond automatically to volumes added by config tool
    [SCSI] fcoe: fix fcoe module ref counting
    [SCSI] libfcoe: FIP Keep-Alive messages for VPorts are sent with incorrect port_id and wwn
    [SCSI] libfcoe: Fix incorrect MAC address clearing
    [SCSI] fcoe: fix a circular locking issue with rtnl and sysfs mutex
    [SCSI] libfc: Move the port_id into lport
    [SCSI] fcoe: move link speed checking into its own routine
    [SCSI] libfc: Remove extra pointer check
    [SCSI] libfc: Remove unused fc_get_host_port_type
    [SCSI] fcoe: fixes wrong error exit in fcoe_create
    [SCSI] libfc: set seq_id for incoming sequence
    [SCSI] qla2xxx: Updates to ISP82xx support.
    [SCSI] qla2xxx: Optionally disable target reset.
    [SCSI] qla2xxx: ensure flash operation and host reset via sg_reset are mutually exclusive
    [SCSI] qla2xxx: Silence bogus warning by gcc for wrap and did.
    [SCSI] qla2xxx: T10 DIF support added.
    ...

    Linus Torvalds
     

26 Apr, 2010

1 commit

  • This is just a cleanup and doesn't change how the code works.

    The original code had a mix of returns and gotos so I changed everything
    to just return directly.

    Signed-off-by: Dan Carpenter
    Reviewed-by: Christoph Lameter
    Signed-off-by: Jiri Kosina

    Dan Carpenter
     

11 Apr, 2010

13 commits


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

08 Mar, 2010

1 commit


02 Mar, 2010

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1341 commits)
    virtio_net: remove forgotten assignment
    be2net: fix tx completion polling
    sis190: fix cable detect via link status poll
    net: fix protocol sk_buff field
    bridge: Fix build error when IGMP_SNOOPING is not enabled
    bnx2x: Tx barriers and locks
    scm: Only support SCM_RIGHTS on unix domain sockets.
    vhost-net: restart tx poll on sk_sndbuf full
    vhost: fix get_user_pages_fast error handling
    vhost: initialize log eventfd context pointer
    vhost: logging thinko fix
    wireless: convert to use netdev_for_each_mc_addr
    ethtool: do not set some flags, if others failed
    ipoib: returned back addrlen check for mc addresses
    netlink: Adding inode field to /proc/net/netlink
    axnet_cs: add new id
    bridge: Make IGMP snooping depend upon BRIDGE.
    bridge: Add multicast count/interval sysfs entries
    bridge: Add hash elasticity/max sysfs entries
    bridge: Add multicast_snooping sysfs toggle
    ...

    Trivial conflicts in Documentation/feature-removal-schedule.txt

    Linus Torvalds
     
  • * 'for-2.6.34' of git://git.kernel.dk/linux-2.6-block: (38 commits)
    block: don't access jiffies when initialising io_context
    cfq: remove 8 bytes of padding from cfq_rb_root on 64 bit builds
    block: fix for "Consolidate phys_segment and hw_segment limits"
    cfq-iosched: quantum check tweak
    blktrace: perform cleanup after setup error
    blkdev: fix merge_bvec_fn return value checks
    cfq-iosched: requests "in flight" vs "in driver" clarification
    cciss: Fix problem with scatter gather elements in the scsi half of the driver
    cciss: eliminate unnecessary pointer use in cciss scsi code
    cciss: do not use void pointer for scsi hba data
    cciss: factor out scatter gather chain block mapping code
    cciss: fix scatter gather chain block dma direction kludge
    cciss: simplify scatter gather code
    cciss: factor out scatter gather chain block allocation and freeing
    cciss: detect bad alignment of scsi commands at build time
    cciss: clarify command list padding calculation
    cfq-iosched: rethink seeky detection for SSDs
    cfq-iosched: rework seeky detection
    block: remove padding from io_context on 64bit builds
    block: Consolidate phys_segment and hw_segment limits
    ...

    Linus Torvalds
     

01 Mar, 2010

1 commit


27 Feb, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (158 commits)
    [SCSI] Fix printing of failed 32-byte commands
    [SCSI] Fix printing of variable length commands
    [SCSI] libsrp: fix bug in ADDITIONAL CDB LENGTH interpretation
    [SCSI] scsi_dh_alua: Add IBM Power Virtual SCSI ALUA device to dev list
    [SCSI] scsi_dh_alua: add netapp to dev list
    [SCSI] qla2xxx: Update version number to 8.03.02-k1.
    [SCSI] qla2xxx: EEH: Restore PCI saved state during pci slot reset.
    [SCSI] qla2xxx: Add firmware ETS burst support.
    [SCSI] qla2xxx: Correct loop-resync issues during SNS scans.
    [SCSI] qla2xxx: Correct use-after-free issue in terminate_rport_io callback.
    [SCSI] qla2xxx: Correct EH bus-reset handling.
    [SCSI] qla2xxx: Proper clean-up of BSG requests when request times out.
    [SCSI] qla2xxx: Initialize payload receive length in failure path of vendor commands
    [SCSI] fix duplicate removal on error path in scsi_sysfs_add_sdev
    [SCSI] fix refcounting bug in scsi_get_host_dev
    [SCSI] fix memory leak in scsi_report_lun_scan
    [SCSI] lpfc: correct PPC build failure
    [SCSI] raid_class: add raid1e
    [SCSI] mpt2sas: Do not call sas_is_tlr_enabled for RAID volumes.
    [SCSI] zfcp: Introduce header file for qdio structs and inline functions
    ...

    Linus Torvalds
     

26 Feb, 2010

2 commits


18 Feb, 2010

1 commit

  • After discussing this patch with LSI, I resubmitting with a recommended
    40 second wait for the alternate ioc's initialization to complete.
    --
    Fusion FC chips are two function with some shared resources. During
    initialization of one function its driver inhibits the ability of the
    other function's driver to allocate message frames by clearing its
    "active" flag. Should mid-layer error recovery be initiated for a
    scsi command during this initialization (which can take up to 40 seconds)
    error recovery will escalate to the level of host reset. This host
    reset might fail (as the other function is resetting) resulting in
    all connected targets being taken offline.

    This patch holds off mid-layer error recovery for up to 40 seconds
    to permit initialization of the other function to complete.

    Signed-off-by: Michael Reed
    Acked-by: "Desai, Kashyap"
    Signed-off-by: James Bottomley

    Michael Reed
     

17 Feb, 2010

1 commit


09 Feb, 2010

1 commit


05 Feb, 2010

1 commit


23 Jan, 2010

1 commit


19 Jan, 2010

6 commits


18 Jan, 2010

1 commit

  • Since commit 9d2e9d66a3f032667934144cd61c396ba49f090d
    mptsas driver fails to allocate memory for the MPT chain buffers
    for second LSI adapter on PPC440SPe Katmai platform:
    ...
    ioc1: LSISAS1068E B3: Capabilities={Initiator}
    mptbase: ioc1: ERROR - Unable to allocate Reply, Request, Chain Buffers!
    mptbase: ioc1: ERROR - didn't initialize properly! (-3)
    mptsas: probe of 0002:31:00.0 failed with error -3

    This commit increased MPT_FC_CAN_QUEUE value but initChainBuffers()
    doesn't differentiate between SAS and FC causing increased allocation
    for SAS case, too. Later pci_alloc_consistent() fails to allocate
    increased chain buffer pool size for SAS case.

    Provide a fix by looking at the bus type and using appropriate
    MPT_SAS_CAN_QUEUE value while calculation of the number of chain
    buffers.

    Signed-off-by: Anatolij Gustschin
    Acked-by: Kashyap Desai
    Cc: Stable Tree
    Signed-off-by: James Bottomley

    Anatolij Gustschin
     

07 Jan, 2010

1 commit


05 Jan, 2010

1 commit


10 Dec, 2009

1 commit

  • Powerpc 44x uses 36 bit real address while the real address defined in
    MPT Fusion driver is of type 32 bit. This causes ioremap to fail and
    driver fails to initialize. This fix changes the data types
    representing the real address from unsigned long 32-bit types to
    resource_size_t which is 64-bit. The driver has been tested, the disks
    get discovered correctly and can do IO.

    [jejb: added printk fix for resource_size_t object]
    Signed-off-by: Pravin Bathija
    Acked-by: "Desai, Kashyap"
    Signed-off-by: James Bottomley

    Pravin Bathija