10 Jun, 2009

1 commit


17 Apr, 2009

1 commit

  • Since commit ead2ceb0ec9f85cff19c43b5cdb2f8a054484431 ("Network Drop
    Monitor: Adding kfree_skb_clean for non-drops and modifying
    end-of-line points for skbs") so called end-of-line points for skb's
    should use consume_skb() to free the socket buffer.

    In opposite to consume_skb() the function kfree_skb() is intended to
    be used for unexpected skb drops e.g. in error conditions that now can
    trigger the network drop monitor if enabled.

    This patch moves the skb end-of-line point in af_can.c to use
    consume_skb().

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

31 Mar, 2009

1 commit

  • Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
    as correctly noted at bug #12454. Someone can lookup entry with NULL
    ->owner, thus not pinning enything, and release it later resulting
    in module refcount underflow.

    We can keep ->owner and supply it at registration time like ->proc_fops
    and ->data.

    But this leaves ->owner as easy-manipulative field (just one C assignment)
    and somebody will forget to unpin previous/pin current module when
    switching ->owner. ->proc_fops is declared as "const" which should give
    some thoughts.

    ->read_proc/->write_proc were just fixed to not require ->owner for
    protection.

    rmmod'ed directories will be empty and return "." and ".." -- no harm.
    And directories with tricky enough readdir and lookup shouldn't be modular.
    We definitely don't want such modular code.

    Removing ->owner will also make PDE smaller.

    So, let's nuke it.

    Kudos to Jeff Layton for reminding about this, let's say, oversight.

    http://bugzilla.kernel.org/show_bug.cgi?id=12454

    Signed-off-by: Alexey Dobriyan

    Alexey Dobriyan
     

27 Feb, 2009

1 commit


16 Feb, 2009

1 commit


01 Feb, 2009

1 commit


15 Jan, 2009

1 commit

  • Due to the loopback functionality in can_send() we can not invoke it
    from hardirq context which was done inside the
    bcm_tx_timeout_handler() hrtimer callback:

    [ 700.361154] [] warn_slowpath+0x80/0xb6
    [ 700.361163] [] valid_state+0x125/0x136
    [ 700.361171] [] mark_lock+0x18e/0x332
    [ 700.361180] [] __lock_acquire+0x12e/0xb1e
    [ 700.361189] [] bcm_tx_timeout_handler+0x0/0xbc [can_bcm]
    [ 700.361198] [] dev_queue_xmit+0x191/0x479
    [ 700.361206] [] __local_bh_disable+0x2b/0x64
    [ 700.361213] [] dev_queue_xmit+0x191/0x479
    [ 700.361225] [] can_send+0xd7/0x11a [can]
    [ 700.361235] [] bcm_can_tx+0x9d/0xd9 [can_bcm]
    [ 700.361245] [] bcm_tx_timeout_handler+0x6a/0xbc [can_bcm]
    [ 700.361255] [] bcm_tx_timeout_handler+0x0/0xbc [can_bcm]
    [ 700.361263] [] __run_hrtimer+0x5a/0x86
    [ 700.361273] [] bcm_tx_timeout_handler+0x0/0xbc [can_bcm]
    [ 700.361282] [] hrtimer_interrupt+0xb9/0x110

    This patch moves the rest of the functionality from the hrtimer
    callback to the already existing tasklet to fix this slowpath problem.

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

07 Jan, 2009

1 commit

  • The AF_CAN core delivered always cloned sk_buffs to the AF_CAN
    protocols, although this was _only_ needed by the can-raw protocol.
    With this (additionally documented) change, the AF_CAN core calls the
    callback functions of the registered AF_CAN protocols with the original
    (uncloned) sk_buff pointer and let's the can-raw protocol do the
    skb_clone() itself which omits all unneeded skb_clone() calls for other
    AF_CAN protocols.

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: Urs Thuermann
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

05 Jan, 2009

1 commit

  • Since commit ca109491f612aab5c8152207631c0444f63da97f ("hrtimer:
    removing all ur callback modes") the hrtimer callbacks are processed
    only in hardirq context.

    This patch moves some functionality into tasklets to run in softirq
    context.

    Additionally some duplicated code was removed in bcm_rx_thr_flush()
    and an avoidable memcpy was removed from bcm_rx_handler().

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

15 Dec, 2008

1 commit


05 Dec, 2008

1 commit


04 Dec, 2008

1 commit

  • Due to a wrong safety check in af_can.c it was not possible to filter
    for SFF frames with a specific CAN identifier without getting the
    same selected CAN identifier from a received EFF frame also.

    This fix has a minimum (but user visible) impact on the CAN filter
    API and therefore the CAN version is set to a new date.

    Indeed the 'old' API is still working as-is. But when now setting
    CAN_(EFF|RTR)_FLAG in can_filter.can_mask you might get less traffic
    than before - but still the stuff that you expected to get for your
    defined filter ...

    Thanks to Kurt Van Dijck for pointing at this issue and for the review.

    Signed-off-by: Oliver Hartkopp
    Acked-by: Kurt Van Dijck
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

17 Oct, 2008

1 commit


20 Jul, 2008

1 commit


06 Jul, 2008

1 commit

  • Even though the CAN netlayer only deals with CAN netdevices, the
    netlayer interface to the userspace and to the device layer should
    perform some sanity checks.

    This patch adds several sanity checks that mainly prevent userspace apps
    to send broken content into the system that may be misinterpreted by
    some other userspace application.

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: Urs Thuermann
    Acked-by: Andre Naujoks
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

09 May, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (32 commits)
    net: Added ASSERT_RTNL() to dev_open() and dev_close().
    can: Fix can_send() handling on dev_queue_xmit() failures
    netns: Fix arbitrary net_device-s corruptions on net_ns stop.
    netfilter: Kconfig: default DCCP/SCTP conntrack support to the protocol config values
    netfilter: nf_conntrack_sip: restrict RTP expect flushing on error to last request
    macvlan: Fix memleak on device removal/crash on module removal
    net/ipv4: correct RFC 1122 section reference in comment
    tcp FRTO: SACK variant is errorneously used with NewReno
    e1000e: don't return half-read eeprom on error
    ucc_geth: Don't use RX clock as TX clock.
    cxgb3: Use CAP_SYS_RAWIO for firmware
    pcnet32: delete non NAPI code from driver.
    fs_enet: Fix a memory leak in fs_enet_mdio_probe
    [netdrvr] eexpress: IPv6 fails - multicast problems
    3c59x: use netstats in net_device structure
    3c980-TX needs EXTRA_PREAMBLE
    fix warning in drivers/net/appletalk/cops.c
    e1000e: Add support for BM PHYs on ICH9
    uli526x: fix endianness issues in the setup frame
    uli526x: initialize the hardware prior to requesting interrupts
    ...

    Linus Torvalds
     

08 May, 2008

1 commit


04 May, 2008

1 commit

  • The helper function hrtimer_callback_running() is used in
    kernel/hrtimer.c as well as in the updated net/can/bcm.c which now
    supports hrtimers. Moving the helper function to hrtimer.h removes the
    duplicate definition in the C-files.

    Signed-off-by: Oliver Hartkopp
    Cc: David Miller
    Signed-off-by: Thomas Gleixner

    Oliver Hartkopp
     

28 Apr, 2008

1 commit


25 Apr, 2008

1 commit


16 Apr, 2008

1 commit

  • Make use of hrtimers to support high resolution capabilities, when
    provided by the system clocksource.

    The conversion to hrtimers additionally discovered and solved an
    unlikely race condition that has been reproduced under (unrealistic)
    massive receive load, which can only be produced on vcan software devices.

    [ Fix printf format warnings on 64-bit -DaveM ]

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

26 Mar, 2008

1 commit


08 Feb, 2008

3 commits


29 Jan, 2008

4 commits