27 Jun, 2010

1 commit

  • Stanse found that lp is dereferenced earlier than checked for being
    NULL in hysdn_rx_netpkt. Move the initialization below the test.

    Signed-off-by: Jiri Slaby
    Cc: Karsten Keil
    Cc: "David S. Miller"
    Cc: Stephen Hemminger
    Cc: Patrick McHardy
    Cc: netdev@vger.kernel.org
    Signed-off-by: David S. Miller

    Jiri Slaby
     

26 Jun, 2010

5 commits

  • CAPI applications can handle several connections in parallel,
    so one connection state per application isn't sufficient.
    Store the connection state in the channel structure instead.

    Impact: bugfix
    Signed-off-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Tilman Schmidt
     
  • Adapt to buggy device firmware which accepts setting HLC only in the
    same command line as BC, by encoding HLC and BC in a single command
    if both are specified, and rejecting HLC without BC.

    Impact: bugfix
    Signed-off-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Tilman Schmidt
     
  • The Gigaset CAPI driver handled all DATA_B3_REQ messages as if the
    Delivery Confirmation flag bit was set, delaying the emission of the
    DATA_B3_CONF reply until the data was actually transmitted. Some
    CAPI applications (notably Asterisk) aren't happy with that
    behaviour. Change it to actually evaluate the Delivery Confirmation
    flag as described the CAPI specification.

    Impact: bugfix
    Signed-off-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Tilman Schmidt
     
  • Make the Gigaset CAPI driver select L2_VOICE (AT^SBPR=2) as the
    layer 2 encoding for transparent connections, like the ISDN4Linux
    variant. L2_BITSYNC (AT^SBPR=0) mutes internal connections and
    distorts external ones.

    Impact: bugfix
    Signed-off-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Tilman Schmidt
     
  • Fix the Gigaset CAPI driver to limit the length of a connection's
    payload data receive buffers to the corresponding CAPI application's
    data buffer size, as some real-life CAPI applications tend to be
    rather unhappy if they receive bigger data blocks than requested.

    Impact: bugfix
    Signed-off-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Tilman Schmidt
     

03 Jun, 2010

1 commit

  • copy_from_user() returns the number of bytes remaining but we should
    return -EFAULT here. The error code gets returned to the user. Both
    old_capi_manufacturer() and capi20_manufacturer() had other places
    that already returned -EFAULT so this won't break anything.

    Signed-off-by: Dan Carpenter
    Signed-off-by: David S. Miller

    Dan Carpenter
     

01 Jun, 2010

1 commit

  • The function inittiger is only called from nj_init_card, where a lock is held.

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

    //
    @gfp exists@
    identifier fn;
    position p;
    @@

    fn(...) {
    ... when != spin_unlock_irqrestore
    when any
    GFP_KERNEL@p
    ... when any
    }

    @locked@
    identifier gfp.fn;
    @@

    spin_lock_irqsave(...)
    ... when != spin_unlock_irqrestore
    fn(...)

    @depends on locked@
    position gfp.p;
    @@

    - GFP_KERNEL@p
    + GFP_ATOMIC
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     

31 May, 2010

1 commit


29 May, 2010

1 commit

  • Add a spin_unlock missing on the error path. The return value of write_reg
    seems to be completely ignored, so it seems that the lock should be
    released in every case.

    The semantic match that finds this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    expression E1;
    @@

    * spin_lock(E1,...);

    * spin_unlock(E1,...);
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     

28 May, 2010

1 commit

  • This test is not doing anything since it is always false if the
    mISDN_read() is called from vfs_read(). Besides that the driver uses
    nonseekable_open() and is not using off or file->f_pos anywhere.

    Signed-off-by: Jan Blunck
    Cc: Frederic Weisbecker
    Cc: Karsten Keil
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     

26 May, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (63 commits)
    drivers/net/usb/asix.c: Fix pointer cast.
    be2net: Bug fix to avoid disabling bottom half during firmware upgrade.
    proc_dointvec: write a single value
    hso: add support for new products
    Phonet: fix potential use-after-free in pep_sock_close()
    ath9k: remove VEOL support for ad-hoc
    ath9k: change beacon allocation to prefer the first beacon slot
    sock.h: fix kernel-doc warning
    cls_cgroup: Fix build error when built-in
    macvlan: do proper cleanup in macvlan_common_newlink() V2
    be2net: Bug fix in init code in probe
    net/dccp: expansion of error code size
    ath9k: Fix rx of mcast/bcast frames in PS mode with auto sleep
    wireless: fix sta_info.h kernel-doc warnings
    wireless: fix mac80211.h kernel-doc warnings
    iwlwifi: testing the wrong variable in iwl_add_bssid_station()
    ath9k_htc: rare leak in ath9k_hif_usb_alloc_tx_urbs()
    ath9k_htc: dereferencing before check in hif_usb_tx_cb()
    rt2x00: Fix rt2800usb TX descriptor writing.
    rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
    ...

    Linus Torvalds
     

25 May, 2010

1 commit


24 May, 2010

3 commits

  • * 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
    uml: Pushdown the bkl from harddog_kern ioctl
    sunrpc: Pushdown the bkl from sunrpc cache ioctl
    sunrpc: Pushdown the bkl from ioctl
    autofs4: Pushdown the bkl from ioctl
    uml: Convert to unlocked_ioctls to remove implicit BKL
    ncpfs: BKL ioctl pushdown
    coda: Clean-up whitespace problems in pioctl.c
    coda: BKL ioctl pushdown
    drivers: Push down BKL into various drivers
    isdn: Push down BKL into ioctl functions
    scsi: Push down BKL into ioctl functions
    dvb: Push down BKL into ioctl functions
    smbfs: Push down BKL into ioctl function
    coda/psdev: Remove BKL from ioctl function
    um/mmapper: Remove BKL usage
    sn_hwperf: Kill BKL usage
    hfsplus: Push down BKL into ioctl function

    Linus Torvalds
     
  • Dummy implementations for the optional CAPI controller operations
    load_firmware and reset_ctr can cause userspace callers to hang
    indefinitely. It's better not to implement them at all.

    Signed-off-by: Tilman Schmidt
    Acked-by: Karsten Keil
    Signed-off-by: David S. Miller

    Tilman Schmidt
     
  • The CAPI controller operation reset_ctr is marked as optional, and
    not all drivers do implement it. Add a check to the kernel CAPI
    whether it exists before trying to call it.

    Signed-off-by: Tilman Schmidt
    Acked-by: Karsten Keil
    Signed-off-by: David S. Miller

    Tilman Schmidt
     

22 May, 2010

1 commit


21 May, 2010

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1674 commits)
    qlcnic: adding co maintainer
    ixgbe: add support for active DA cables
    ixgbe: dcb, do not tag tc_prio_control frames
    ixgbe: fix ixgbe_tx_is_paused logic
    ixgbe: always enable vlan strip/insert when DCB is enabled
    ixgbe: remove some redundant code in setting FCoE FIP filter
    ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp
    ixgbe: fix header len when unsplit packet overflows to data buffer
    ipv6: Never schedule DAD timer on dead address
    ipv6: Use POSTDAD state
    ipv6: Use state_lock to protect ifa state
    ipv6: Replace inet6_ifaddr->dead with state
    cxgb4: notify upper drivers if the device is already up when they load
    cxgb4: keep interrupts available when the ports are brought down
    cxgb4: fix initial addition of MAC address
    cnic: Return SPQ credit to bnx2x after ring setup and shutdown.
    cnic: Convert cnic_local_flags to atomic ops.
    can: Fix SJA1000 command register writes on SMP systems
    bridge: fix build for CONFIG_SYSFS disabled
    ARCNET: Limit com20020 PCI ID matches for SOHARD cards
    ...

    Fix up various conflicts with pcmcia tree drivers/net/
    {pcmcia/3c589_cs.c, wireless/orinoco/orinoco_cs.c and
    wireless/orinoco/spectrum_cs.c} and feature removal
    (Documentation/feature-removal-schedule.txt).

    Also fix a non-content conflict due to pm_qos_requirement getting
    renamed in the PM tree (now pm_qos_request) in net/mac80211/scan.c

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (44 commits)
    vlynq: make whole Kconfig-menu dependant on architecture
    add descriptive comment for TIF_MEMDIE task flag declaration.
    EEPROM: max6875: Header file cleanup
    EEPROM: 93cx6: Header file cleanup
    EEPROM: Header file cleanup
    agp: use NULL instead of 0 when pointer is needed
    rtc-v3020: make bitfield unsigned
    PCI: make bitfield unsigned
    jbd2: use NULL instead of 0 when pointer is needed
    cciss: fix shadows sparse warning
    doc: inode uses a mutex instead of a semaphore.
    uml: i386: Avoid redefinition of NR_syscalls
    fix "seperate" typos in comments
    cocbalt_lcdfb: correct sections
    doc: Change urls for sparse
    Powerpc: wii: Fix typo in comment
    i2o: cleanup some exit paths
    Documentation/: it's -> its where appropriate
    UML: Fix compiler warning due to missing task_struct declaration
    UML: add kernel.h include to signal.c
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (29 commits)
    pcmcia: disable PCMCIA ioctl also for ARM
    drivers/staging/comedi: dev_node removal (quatech_daqp_cs)
    drivers/staging/comedi: dev_node removal (ni_mio_cs)
    drivers/staging/comedi: dev_node removal (ni_labpc_cs)
    drivers/staging/comedi: dev_node removal (ni_daq_dio24)
    drivers/staging/comedi: dev_node removal (ni_daq_700)
    drivers/staging/comedi: dev_node removal (das08_cs)
    drivers/staging/comedi: dev_node removal (cb_das16_cs)
    pata_pcmcia: get rid of extra indirection
    pcmcia: remove suspend-related comment from yenta_socket.c
    pcmcia: call pcmcia_{read,write}_cis_mem with ops_mutex held
    pcmcia: remove pcmcia_add_device_lock
    pcmcia: update gfp/slab.h includes
    pcmcia: remove unused mem_op.h
    pcmcia: do not autoadd root PCI bus resources
    pcmcia: clarify alloc_io_space, move it to resource handlers
    pcmcia: move all pcmcia_resource_ops providers into one module
    pcmcia: move high level CIS access code to separate file
    pcmcia: dev_node removal (core)
    pcmcia: dev_node removal (remaining drivers)
    ...

    Linus Torvalds
     

20 May, 2010

1 commit


19 May, 2010

1 commit


17 May, 2010

2 commits

  • Push down bkl into isdn ioctl functions

    [fweisbec: dropped drivers/isdn/divert/divert_procfs.c
    as it has been pushed down in procfs branch already]

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Frederic Weisbecker

    Arnd Bergmann
     
  • Push down the bkl from procfs's ioctl main handler to its users.
    Only three procfs users implement an ioctl (non unlocked) handler.
    Turn them into unlocked_ioctl and push down the Devil inside.

    v2: PDE(inode)->data doesn't need to be under bkl
    v3: And don't forget to git-add the result
    v4: Use wrappers to pushdown instead of an invasive and error prone
    handlers surgery.

    Signed-off-by: Frederic Weisbecker
    Acked-by: Arnd Bergmann
    Cc: Thomas Gleixner
    Cc: Andrew Morton
    Cc: Ingo Molnar
    Cc: John Kacur
    Cc: KAMEZAWA Hiroyuki
    Cc: Al Viro
    Cc: Alexey Dobriyan

    Frederic Weisbecker
     

10 May, 2010

4 commits

  • Implicit slab.h inclusion via percpu.h is about to go away. Make sure
    gfp.h or slab.h is included as necessary.

    Signed-off-by: Tejun Heo
    Cc: Stephen Rothwell
    Signed-off-by: Dominik Brodowski

    Tejun Heo
     
  • As a fourth step, remove any remaining usages of
    dev_node_t from drivers:

    - ipwireless can be simplified a bit, as we do not need
    to pass around the (write-only) dev_node_t around.

    - avma1_cs can be simplified as well, if we only keep the
    minor number around as "priv" data, not a full-fledged
    struct.

    Acked-by: Jiri Kosina
    Acked-by: Karsten Keil
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • As a second step, remove any usage of dev_node_t from drivers which
    only wrote to this typedef/struct, except one printk() which can
    easily be replaced by a dev_info()/dev_warn() call.

    CC: Harald Welte
    CC: linux-ide@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: netdev@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    Acked-by: Karsten Keil
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Instead of the old pcmcia_request_irq() interface, drivers may now
    choose between:

    - calling request_irq/free_irq directly. Use the IRQ from *p_dev->irq.

    - use pcmcia_request_irq(p_dev, handler_t); the PCMCIA core will
    clean up automatically on calls to pcmcia_disable_device() or
    device ejection.

    - drivers still not capable of IRQF_SHARED (or not telling us so) may
    use the deprecated pcmcia_request_exclusive_irq() for the time
    being; they might receive a shared IRQ nonetheless.

    CC: linux-bluetooth@vger.kernel.org
    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-serial@vger.kernel.org
    CC: alsa-devel@alsa-project.org
    CC: linux-usb@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

23 Apr, 2010

2 commits


20 Apr, 2010

1 commit

  • Commit b91ecb00 ("gigaset: include cleanup cleanup") removed an implicit
    sched.h inclusion that came in via slab.h, and caused various compile
    problems as a result.

    This should fix it.

    Reported-by: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

18 Apr, 2010

1 commit

  • Commit 5a0e3ad causes slab.h to be included twice in many of the
    Gigaset driver's source files, first via the common include file
    gigaset.h and then a second time directly. Drop the spares, and
    use the opportunity to clean up a few more similar cases.

    Impact: cleanup, no functional change
    Signed-off-by: Tilman Schmidt
    CC: Tejun Heo
    Acked-by: Tejun Heo
    Signed-off-by: David S. Miller

    Tilman Schmidt
     

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
     

29 Mar, 2010

1 commit


26 Mar, 2010

4 commits

  • Compiling this driver gave a section mismatch,
    so I reviewed the init/exit paths of the driver
    and made the correct changes.

    WARNING: drivers/isdn/hisax/built-in.o(.text+0x55e37): Section mismatch
    in reference from the function elsa_cs_config() to the function
    .devinit.text:hisax_init_pcmcia()
    The function elsa_cs_config() references
    the function __devinit hisax_init_pcmcia().
    This is often because elsa_cs_config lacks a __devinit
    annotation or the annotation of hisax_init_pcmcia is wrong.

    Signed-off-by: Henrik Kretzschmar
    Acked-by: Karsten Keil
    Signed-off-by: David S. Miller

    Henne
     
  • Compiling this driver gave a section mismatch,
    so I reviewed the init/exit paths of the driver
    and made the correct changes.

    WARNING: drivers/isdn/hisax/built-in.o(.text+0x56512): Section mismatch
    in reference from the function avma1cs_config() to the function
    .devinit.text:hisax_init_pcmcia()
    The function avma1cs_config() references
    the function __devinit hisax_init_pcmcia().
    This is often because avma1cs_config lacks a __devinit
    annotation or the annotation of hisax_init_pcmcia is wrong.

    Signed-off-by: Henrik Kretzschmar
    Acked-by: Karsten Keil
    Signed-off-by: David S. Miller

    Henne
     
  • Compiling this driver gave a section mismatch,
    so I reviewed the init/exit paths of the driver
    and made the correct changes.

    WARNING: drivers/isdn/hisax/built-in.o(.text+0x56bfb): Section mismatch
    in reference from the function teles_cs_config() to the function
    .devinit.text:hisax_init_pcmcia()
    The function teles_cs_config() references
    the function __devinit hisax_init_pcmcia().
    This is often because teles_cs_config lacks a __devinit
    annotation or the annotation of hisax_init_pcmcia is wrong.

    Signed-off-by: Henrik Kretzschmar
    Acked-by: Karsten Keil
    Signed-off-by: David S. Miller

    Henne
     
  • Compiling this driver gave a section mismatch,
    so I reviewed the init/exit paths of the driver
    and made the correct changes.

    WARNING: drivers/isdn/hisax/built-in.o(.text+0x558d6): Section mismatch
    in reference from the function sedlbauer_config() to the function
    .devinit.text:hisax_init_pcmcia()
    The function sedlbauer_config() references
    the function __devinit hisax_init_pcmcia().
    This is often because sedlbauer_config lacks a __devinit
    annotation or the annotation of hisax_init_pcmcia is wrong.

    Signed-off-by: Henrik Kretzschmar
    Acked-by: Karsten Keil
    Signed-off-by: David S. Miller

    Henne
     

18 Mar, 2010

1 commit

  • Update the dummy LL interface to the LL interface change
    introduced by commit daab433c03c15fd642c71c94eb51bdd3f32602c8.
    This fixes the build failure occurring after that commit when
    enabling ISDN_DRV_GIGASET but neither ISDN_I4L nor ISDN_CAPI.

    Impact: bugfix
    Signed-off-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Tilman Schmidt
     

17 Mar, 2010

1 commit