28 May, 2010

1 commit

  • At the point of the print, dev is NULL.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @r exists@
    expression E,E1;
    identifier f;
    statement S1,S2,S3;
    @@

    if ((E == NULL && ...) || ...)
    {
    ... when != if (...) S1 else S2
    when != E = E1
    * E->f
    ... when any
    return ...;
    }
    else S3
    //

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

    Julia Lawall
     

14 May, 2010

1 commit

  • This patch removes from drivers/net/ all the unnecessary
    return; statements that precede the last closing brace of
    void functions.

    It does not remove the returns that are immediately
    preceded by a label as gcc doesn't like that.

    It also does not remove null void functions with return.

    Done via:
    $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
    xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'

    with some cleanups by hand.

    Compile tested x86 allmodconfig only.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

12 Apr, 2010

1 commit


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
     

25 Mar, 2010

1 commit


04 Jan, 2010

1 commit

  • This should address the problems in version 1 (lazy) and version 2 (ugly).

    Bump the stats on orig_dev not on the newly assigned NULL dev variable.

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

    Dan Carpenter
     

10 Dec, 2009

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits)
    tree-wide: fix misspelling of "definition" in comments
    reiserfs: fix misspelling of "journaled"
    doc: Fix a typo in slub.txt.
    inotify: remove superfluous return code check
    hdlc: spelling fix in find_pvc() comment
    doc: fix regulator docs cut-and-pasteism
    mtd: Fix comment in Kconfig
    doc: Fix IRQ chip docs
    tree-wide: fix assorted typos all over the place
    drivers/ata/libata-sff.c: comment spelling fixes
    fix typos/grammos in Documentation/edac.txt
    sysctl: add missing comments
    fs/debugfs/inode.c: fix comment typos
    sgivwfb: Make use of ARRAY_SIZE.
    sky2: fix sky2_link_down copy/paste comment error
    tree-wide: fix typos "couter" -> "counter"
    tree-wide: fix typos "offest" -> "offset"
    fix kerneldoc for set_irq_msi()
    spidev: fix double "of of" in comment
    comment typo fix: sybsystem -> subsystem
    ...

    Linus Torvalds
     

04 Dec, 2009

2 commits

  • That is "success", "unknown", "through", "performance", "[re|un]mapping"
    , "access", "default", "reasonable", "[con]currently", "temperature"
    , "channel", "[un]used", "application", "example","hierarchy", "therefore"
    , "[over|under]flow", "contiguous", "threshold", "enough" and others.

    Signed-off-by: André Goddard Rosa
    Signed-off-by: Jiri Kosina

    André Goddard Rosa
     
  • Only files where David Miller is the primary git-signer.
    wireless, wimax, ixgbe, etc are not modified.

    Compile tested x86 allyesconfig only
    Not all files compiled (not x86 compatible)

    Added a few > 80 column lines, which I ignored.
    Existing checkpatch complaints ignored.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

26 Nov, 2009

1 commit

  • Generated with the following semantic patch

    @@
    struct net *n1;
    struct net *n2;
    @@
    - n1 == n2
    + net_eq(n1, n2)

    @@
    struct net *n1;
    struct net *n2;
    @@
    - n1 != n2
    + !net_eq(n1, n2)

    applied over {include,net,drivers/net}.

    Signed-off-by: Octavian Purdila
    Signed-off-by: David S. Miller

    Octavian Purdila
     

19 Nov, 2009

1 commit


16 Nov, 2009

1 commit


07 Nov, 2009

1 commit

  • Slip and a few other drivers use the same ioctl numbers on
    tty devices that are normally meant for sockets. This causes
    problems with our compat_ioctl handling that tries to convert
    the data structures in a different format.

    Fortunately, these five drivers all use 32 bit compatible
    data structures in the ioctl numbers, so we can just add
    a trivial compat_ioctl conversion function to each of them.

    SIOCSIFENCAP and SIOCGIFENCAP do not need to live in
    fs/compat_ioctl.c after this any more, and they are not
    used on any sockets.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: David S. Miller

    Arnd Bergmann
     

15 Oct, 2009

1 commit


13 Oct, 2009

1 commit


12 Oct, 2009

1 commit


02 Oct, 2009

1 commit

  • This typo was introduced by 5793f4be23f0171b4999ca68a39a9157b44139f3 on
    October 14, 2005 ...

    Reported-by: Matti Aarnio
    Signed-off-by: Ralf Baechle
    Signed-off-by: David S. Miller

    Ralf Baechle
     

03 Sep, 2009

1 commit

  • The bpq ether driver is modifying the data art of the skb by first
    dropping the KISS byte (a command byte for the radio) then prepending the
    length + 4 of the remaining AX.25 packet to be transmitted as a little
    endian 16-bit number. If the high byte of the length has a different
    value than the dropped KISS byte users of clones of the skb may observe
    this as corruption. This was observed with by running listen(8) -a which
    uses a packet socket which clones transmit packets. The corruption will
    then typically be displayed for as a KISS "TX Delay" command for AX.25
    packets in the range of 252..508 bytes or any other KISS command for
    yet larger packets.

    Fixed by using skb_cow to create a private copy should the skb be cloned.
    Using skb_cow also allows us to cleanup the old logic to ensure sufficient
    headroom in the skb.

    While at it, replace a return of 0 from bpq_xmit with the proper constant
    NETDEV_TX_OK which is now being used everywhere else in this function.

    Affected: all 2.2, 2.4 and 2.6 kernels.

    Signed-off-by: Ralf Baechle
    Reported-by: Jann Traschewski
    Signed-off-by: David S. Miller

    Ralf Baechle
     

01 Sep, 2009

1 commit


13 Aug, 2009

1 commit


24 Jul, 2009

1 commit


23 Jul, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (37 commits)
    sky2: Avoid races in sky2_down
    drivers/net/mlx4: Adjust constant
    drivers/net: Move a dereference below a NULL test
    drivers/net: Move a dereference below a NULL test
    connector: maintainer/mail update.
    USB host CDC Phonet network interface driver
    macsonic, jazzsonic: fix oops on module unload
    macsonic: move probe function to .devinit.text
    can: switch carrier on if device was stopped while in bus-off state
    can: restart device even if dev_alloc_skb() fails
    can: sja1000: remove duplicated includes
    New device ID for sc92031 [1088:2031]
    3c589_cs: re-initialize the multicast in the tc589_reset
    Fix error return for setsockopt(SO_TIMESTAMPING)
    netxen: fix thermal check and shutdown
    netxen: fix deadlock on dev close
    netxen: fix context deletion sequence
    net: Micrel KS8851 SPI network driver
    tcp: Use correct peer adr when copying MD5 keys
    tcp: Fix MD5 signature checking on IPv4 mapped sockets
    ...

    Linus Torvalds
     

18 Jul, 2009

1 commit


15 Jul, 2009

1 commit


13 Jul, 2009

1 commit

  • Guido Trentalancia reports:

    I am trying to use the kiss driver in the Linux kernel that is being
    shipped with Fedora 10 but unfortunately I get the following oops:

    mkiss: AX.25 Multikiss, Hans Albas PE1AYX
    mkiss: ax0: crc mode is auto.
    ADDRCONF(NETDEV_CHANGE): ax0: link becomes ready
    ------------[ cut here ]------------
    WARNING: at kernel/softirq.c:77 __local_bh_disable+0x2f/0x83() (Not
    tainted)
    [...]
    unloaded: microcode]
    Pid: 0, comm: swapper Not tainted 2.6.27.25-170.2.72.fc10.i686 #1
    [] warn_on_slowpath+0x65/0x8b
    [] ? _spin_unlock_irqrestore+0x22/0x38
    [] ? __enqueue_entity+0xe3/0xeb
    [] ? enqueue_entity+0x203/0x20b
    [] ? enqueue_task_fair+0x3b/0x3f
    [] ? resched_task+0x3a/0x6e
    [] ? _spin_unlock_irqrestore+0x22/0x38
    [] ? _spin_lock_bh+0xb/0x16
    [] __local_bh_disable+0x2f/0x83
    [] local_bh_disable+0xb/0xd
    [] _spin_lock_bh+0xb/0x16
    [] mkiss_receive_buf+0x2fb/0x3a6 [mkiss]
    [] flush_to_ldisc+0xf7/0x198
    [] tty_flip_buffer_push+0x41/0x51
    [] ftdi_process_read+0x375/0x4ad [ftdi_sio]
    [] ftdi_read_bulk_callback+0x130/0x138 [ftdi_sio]
    [] usb_hcd_giveback_urb+0x63/0x93
    [] uhci_giveback_urb+0xe5/0x15f
    [] uhci_scan_schedule+0x52e/0x767
    [] ? psmouse_handle_byte+0xc/0xe5
    [] ? acpi_ev_gpe_detect+0xd6/0xe1
    [] uhci_irq+0x110/0x125
    [] usb_hcd_irq+0x40/0xa3
    [] handle_IRQ_event+0x2f/0x64
    [] handle_level_irq+0x74/0xbe
    [] ? handle_level_irq+0x0/0xbe
    [] do_IRQ+0xc7/0xfe
    [] common_interrupt+0x28/0x30
    [] ? acpi_idle_enter_simple+0x162/0x19d
    [] cpuidle_idle_call+0x60/0x92
    [] cpu_idle+0x101/0x134
    [] rest_init+0x4e/0x50
    =======================
    ---[ end trace b7cc8076093467ad ]---
    ------------[ cut here ]------------
    WARNING: at kernel/softirq.c:136 _local_bh_enable_ip+0x3d/0xc4()
    [...]
    Pid: 0, comm: swapper Tainted: G W 2.6.27.25-170.2.72.fc10.i686
    [] warn_on_slowpath+0x65/0x8b
    [] ? _spin_unlock_irqrestore+0x22/0x38
    [] ? __enqueue_entity+0xe3/0xeb
    [] ? enqueue_entity+0x203/0x20b
    [] ? enqueue_task_fair+0x3b/0x3f
    [] ? resched_task+0x3a/0x6e
    [] ? _spin_unlock_irqrestore+0x22/0x38
    [] ? _spin_lock_bh+0xb/0x16
    [] ? mkiss_receive_buf+0x33d/0x3a6 [mkiss]
    [] _local_bh_enable_ip+0x3d/0xc4
    [] local_bh_enable_ip+0x8/0xa
    [] _spin_unlock_bh+0x11/0x13
    [] mkiss_receive_buf+0x33d/0x3a6 [mkiss]
    [] flush_to_ldisc+0xf7/0x198
    [] tty_flip_buffer_push+0x41/0x51
    [] ftdi_process_read+0x375/0x4ad [ftdi_sio]
    [] ftdi_read_bulk_callback+0x130/0x138 [ftdi_sio]
    [] usb_hcd_giveback_urb+0x63/0x93
    [] uhci_giveback_urb+0xe5/0x15f
    [] uhci_scan_schedule+0x52e/0x767
    [] ? psmouse_handle_byte+0xc/0xe5
    [] ? acpi_ev_gpe_detect+0xd6/0xe1
    [] uhci_irq+0x110/0x125
    [] usb_hcd_irq+0x40/0xa3
    [] handle_IRQ_event+0x2f/0x64
    [] handle_level_irq+0x74/0xbe
    [] ? handle_level_irq+0x0/0xbe
    [] do_IRQ+0xc7/0xfe
    [] common_interrupt+0x28/0x30
    [] ? acpi_idle_enter_simple+0x162/0x19d
    [] cpuidle_idle_call+0x60/0x92
    [] cpu_idle+0x101/0x134
    [] rest_init+0x4e/0x50
    =======================
    ---[ end trace b7cc8076093467ad ]---
    mkiss: ax0: Trying crc-smack
    mkiss: ax0: Trying crc-flexnet

    The issue was, that the locking code in mkiss was assuming it was only
    ever being called in process or bh context. Fixed by converting the
    involved locking code to use irq-safe locks.

    Review of other networking line disciplines shows that 6pack, both sync
    and async PPP and STRIP have similar issues. The ppp_async one is the
    most interesting one as it sorts out half of the issue as far back as
    2004 in commit http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commitdiff;h=2996d8deaeddd01820691a872550dc0cfba0c37d

    Signed-off-by: Ralf Baechle
    Reported-by: Guido Trentalancia
    Signed-off-by: David S. Miller

    Ralf Baechle
     

09 Jul, 2009

1 commit

  • Commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f ("printk: clean up
    handling of log-levels and newlines") changed printk semantics. printk
    lines with multiple KERN_ prefixes are no longer emitted as
    before the patch.

    is now included in the output on each additional use.

    Remove all uses of multiple KERN_s in formats.

    Signed-off-by: Joe Perches
    Signed-off-by: Linus Torvalds

    Joe Perches
     

06 Jul, 2009

1 commit


17 Jun, 2009

1 commit

  • Fix up remaining drivers returning a magic or an errno value from their
    ndo_start_xmit() functions that were missed in the first pass:

    - isdn_net: missed conversion
    - bpqether: missed conversion: skb is freed, so return NETDEV_TX_OK
    - hp100: intention appears to be to resubmit skb once resources are
    available, but due to no queue handling it is dropped for now.
    - lapbether: skb is freed, so return NETDEV_TX_OK

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     

13 Jun, 2009

2 commits


01 Apr, 2009

1 commit


30 Mar, 2009

1 commit


29 Mar, 2009

1 commit


10 Mar, 2009

1 commit


18 Feb, 2009

3 commits

  • Impact: Rename inner scrope variable.

    Fix this sparse warning:
    drivers/net/hamradio/yam.c:856:35: warning: symbol 'dev' shadows an earlier one

    Signed-off-by: Hannes Eder
    Signed-off-by: David S. Miller

    Hannes Eder
     
  • Impact: Attribute functions with __acquires(...) resp. __releases(...).

    Fix this sparse warnings:
    drivers/net/hamradio/bpqether.c:387:13: warning: context imbalance in 'bpq_seq_start' - wrong count at exit
    drivers/net/hamradio/bpqether.c:419:13: warning: context imbalance in 'bpq_seq_stop' - unexpected unlock

    Signed-off-by: Hannes Eder
    Signed-off-by: David S. Miller

    Hannes Eder
     
  • Impact: Use 'static const char[]' instead of 'static char[]' and while
    being at it fix an issue in 'mkiss_init_driver', where in case of an
    error the status code was not passed to printk.

    Fix this warnings:
    drivers/net/hamradio/6pack.c: In function 'sixpack_init_driver':
    drivers/net/hamradio/6pack.c:802: warning: format not a string literal and no format arguments
    drivers/net/hamradio/bpqether.c: In function 'bpq_init_driver':
    drivers/net/hamradio/bpqether.c:609: warning: format not a string literal and no format arguments
    drivers/net/hamradio/mkiss.c: In function 'mkiss_init_driver':
    drivers/net/hamradio/mkiss.c:988: warning: format not a string literal and no format arguments
    drivers/net/hamradio/mkiss.c:991: warning: format not a string literal and no format arguments
    drivers/net/hamradio/scc.c: In function 'scc_init_driver':
    drivers/net/hamradio/scc.c:2109: warning: format not a string literal and no format arguments
    drivers/net/hamradio/yam.c: In function 'yam_init_driver':
    drivers/net/hamradio/yam.c:1094: warning: format not a string literal and no format arguments

    Signed-off-by: Hannes Eder
    Signed-off-by: David S. Miller

    Hannes Eder
     

01 Feb, 2009

1 commit


22 Jan, 2009

2 commits