28 Nov, 2011

1 commit


01 Nov, 2011

2 commits


27 Jul, 2011

1 commit

  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     

18 Jun, 2011

1 commit

  • if_open() calls try_module_get(), and after an attempt to lock a mutex
    the if_open() function may return -ERESTARTSYS without
    putting the module. Then, when if_open() is executed again,
    try_module_get() is called making the reference counter of THIS_MODULE
    greater than one at successful exit from if_open(). The if_close()
    function puts the module only once, and as a result it can't be
    unloaded.

    This patch adds module_put call before the return from if_open().

    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Pavel Shved
    Signed-off-by: David S. Miller

    Pavel Shved
     

04 Jun, 2011

1 commit

  • This reverts commit b1c43f82c5aa265442f82dba31ce985ebb7aa71c.

    It was broken in so many ways, and results in random odd pty issues.

    It re-introduced the buggy schedule_work() in flush_to_ldisc() that can
    cause endless work-loops (see commit a5660b41af6a: "tty: fix endless
    work loop when the buffer fills up").

    It also used an "unsigned int" return value fo the ->receive_buf()
    function, but then made multiple functions return a negative error code,
    and didn't actually check for the error in the caller.

    And it didn't actually work at all. BenH bisected down odd tty behavior
    to it:
    "It looks like the patch is causing some major malfunctions of the X
    server for me, possibly related to PTYs. For example, cat'ing a
    large file in a gnome terminal hangs the kernel for -minutes- in a
    loop of what looks like flush_to_ldisc/workqueue code, (some ftrace
    data in the quoted bits further down).

    ...

    Some more data: It -looks- like what happens is that the
    flush_to_ldisc work queue entry constantly re-queues itself (because
    the PTY is full ?) and the workqueue thread will basically loop
    forver calling it without ever scheduling, thus starving the consumer
    process that could have emptied the PTY."

    which is pretty much exactly the problem we fixed in a5660b41af6a.

    Milton Miller pointed out the 'unsigned int' issue.

    Reported-by: Benjamin Herrenschmidt
    Reported-by: Milton Miller
    Cc: Stefan Bigler
    Cc: Toby Gray
    Cc: Felipe Balbi
    Cc: Greg Kroah-Hartman
    Cc: Alan Cox
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

24 May, 2011

1 commit

  • * 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (48 commits)
    serial: 8250_pci: add support for Cronyx Omega PCI multiserial board.
    tty/serial: Fix break handling for PORT_TEGRA
    tty/serial: Add explicit PORT_TEGRA type
    n_tracerouter and n_tracesink ldisc additions.
    Intel PTI implementaiton of MIPI 1149.7.
    Kernel documentation for the PTI feature.
    export kernel call get_task_comm().
    tty: Remove to support serial for S5P6442
    pch_phub: Support new device ML7223
    8250_pci: Add support for the Digi/IBM PCIe 2-port Adapter
    ASoC: Update cx20442 for TTY API change
    pch_uart: Support new device ML7223 IOH
    parport: Use request_muxed_region for IT87 probe and lock
    tty/serial: add support for Xilinx PS UART
    n_gsm: Use print_hex_dump_bytes
    drivers/tty/moxa.c: Put correct tty value
    TTY: tty_io, annotate locking functions
    TTY: serial_core, remove superfluous set_task_state
    TTY: serial_core, remove invalid test
    Char: moxa, fix locking in moxa_write
    ...

    Fix up trivial conflicts in drivers/bluetooth/hci_ldisc.c and
    drivers/tty/serial/Makefile.

    I did the hci_ldisc thing as an evil merge, cleaning things up.

    Linus Torvalds
     

23 Apr, 2011

1 commit

  • it makes it simpler to keep track of the amount of
    bytes received and simplifies how flush_to_ldisc counts
    the remaining bytes. It also fixes a bug of lost bytes
    on n_tty when flushing too many bytes via the USB
    serial gadget driver.

    Tested-by: Stefan Bigler
    Tested-by: Toby Gray
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Felipe Balbi
     

18 Apr, 2011

1 commit


31 Mar, 2011

1 commit


18 Feb, 2011

3 commits


14 Jan, 2011

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
    Documentation/trace/events.txt: Remove obsolete sched_signal_send.
    writeback: fix global_dirty_limits comment runtime -> real-time
    ppc: fix comment typo singal -> signal
    drivers: fix comment typo diable -> disable.
    m68k: fix comment typo diable -> disable.
    wireless: comment typo fix diable -> disable.
    media: comment typo fix diable -> disable.
    remove doc for obsolete dynamic-printk kernel-parameter
    remove extraneous 'is' from Documentation/iostats.txt
    Fix spelling milisec -> ms in snd_ps3 module parameter description
    Fix spelling mistakes in comments
    Revert conflicting V4L changes
    i7core_edac: fix typos in comments
    mm/rmap.c: fix comment
    sound, ca0106: Fix assignment to 'channel'.
    hrtimer: fix a typo in comment
    init/Kconfig: fix typo
    anon_inodes: fix wrong function name in comment
    fix comment typos concerning "consistent"
    poll: fix a typo in comment
    ...

    Fix up trivial conflicts in:
    - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c)
    - fs/ext4/ext4.h

    Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.

    Linus Torvalds
     

01 Jan, 2011

1 commit

  • Hi,

    In drivers/isdn/gigaset/capi.c::do_disconnect_req() we will leak the
    memory allocated (with kmalloc) to 'b3cmsg' if the call to alloc_skb()
    fails.

    ...
    b3cmsg = kmalloc(sizeof(*b3cmsg), GFP_KERNEL);
    allocation here ------^
    if (!b3cmsg) {
    dev_err(cs->dev, "%s: out of memory\n", __func__);
    send_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR);
    return;
    }
    capi_cmsg_header(b3cmsg, ap->id, CAPI_DISCONNECT_B3, CAPI_IND,
    ap->nextMessageNumber++,
    cmsg->adr.adrPLCI | (1 << 16));
    b3cmsg->Reason_B3 = CapiProtocolErrorLayer1;
    b3skb = alloc_skb(CAPI_DISCONNECT_B3_IND_BASELEN, GFP_KERNEL);
    if (b3skb == NULL) {
    dev_err(cs->dev, "%s: out of memory\n", __func__);
    send_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR);
    return;
    leak here ------^
    ...

    This leak is easily fixed by just kfree()'ing the memory allocated to
    'b3cmsg' right before we return. The following patch does that.

    Signed-off-by: Jesper Juhl
    Acked-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Jesper Juhl
     

02 Nov, 2010

1 commit

  • "gadget", "through", "command", "maintain", "maintain", "controller", "address",
    "between", "initiali[zs]e", "instead", "function", "select", "already",
    "equal", "access", "management", "hierarchy", "registration", "interest",
    "relative", "memory", "offset", "already",

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Jiri Kosina

    Uwe Kleine-König
     

01 Oct, 2010

9 commits


08 Aug, 2010

2 commits


16 Jul, 2010

1 commit

  • There were two methods isdn_gethex() and isdn_getnum() which are custom
    implementations of strtoul(). Get rid of them in regard to
    strict_strtoul() kernel's function.

    Signed-off-by: Andy Shevchenko
    Cc: Hansjoerg Lipp
    Cc: Tilman Schmidt
    Cc: Karsten Keil
    Cc: gigaset307x-common@lists.sourceforge.net
    Cc: netdev@vger.kernel.org
    Signed-off-by: David S. Miller

    Andy Shevchenko
     

08 Jul, 2010

10 commits


26 Jun, 2010

2 commits