<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/tty, branch v4.4-rc6</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>tty: Fix GPF in flush_to_ldisc()</title>
<updated>2015-12-13T07:05:28+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2015-11-27T19:25:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9ce119f318ba1a07c29149301f1544b6c4bea52a'/>
<id>9ce119f318ba1a07c29149301f1544b6c4bea52a</id>
<content type='text'>
A line discipline which does not define a receive_buf() method can
can cause a GPF if data is ever received [1]. Oddly, this was known
to the author of n_tracesink in 2011, but never fixed.

[1] GPF report
    BUG: unable to handle kernel NULL pointer dereference at           (null)
    IP: [&lt;          (null)&gt;]           (null)
    PGD 3752d067 PUD 37a7b067 PMD 0
    Oops: 0010 [#1] SMP KASAN
    Modules linked in:
    CPU: 2 PID: 148 Comm: kworker/u10:2 Not tainted 4.4.0-rc2+ #51
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
    Workqueue: events_unbound flush_to_ldisc
    task: ffff88006da94440 ti: ffff88006db60000 task.ti: ffff88006db60000
    RIP: 0010:[&lt;0000000000000000&gt;]  [&lt;          (null)&gt;]           (null)
    RSP: 0018:ffff88006db67b50  EFLAGS: 00010246
    RAX: 0000000000000102 RBX: ffff88003ab32f88 RCX: 0000000000000102
    RDX: 0000000000000000 RSI: ffff88003ab330a6 RDI: ffff88003aabd388
    RBP: ffff88006db67c48 R08: ffff88003ab32f9c R09: ffff88003ab31fb0
    R10: ffff88003ab32fa8 R11: 0000000000000000 R12: dffffc0000000000
    R13: ffff88006db67c20 R14: ffffffff863df820 R15: ffff88003ab31fb8
    FS:  0000000000000000(0000) GS:ffff88006dc00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: 0000000000000000 CR3: 0000000037938000 CR4: 00000000000006e0
    Stack:
     ffffffff829f46f1 ffff88006da94bf8 ffff88006da94bf8 0000000000000000
     ffff88003ab31fb0 ffff88003aabd438 ffff88003ab31ff8 ffff88006430fd90
     ffff88003ab32f9c ffffed0007557a87 1ffff1000db6cf78 ffff88003ab32078
    Call Trace:
     [&lt;ffffffff8127cf91&gt;] process_one_work+0x8f1/0x17a0 kernel/workqueue.c:2030
     [&lt;ffffffff8127df14&gt;] worker_thread+0xd4/0x1180 kernel/workqueue.c:2162
     [&lt;ffffffff8128faaf&gt;] kthread+0x1cf/0x270 drivers/block/aoe/aoecmd.c:1302
     [&lt;ffffffff852a7c2f&gt;] ret_from_fork+0x3f/0x70 arch/x86/entry/entry_64.S:468
    Code:  Bad RIP value.
    RIP  [&lt;          (null)&gt;]           (null)
     RSP &lt;ffff88006db67b50&gt;
    CR2: 0000000000000000
    ---[ end trace a587f8947e54d6ea ]---

Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A line discipline which does not define a receive_buf() method can
can cause a GPF if data is ever received [1]. Oddly, this was known
to the author of n_tracesink in 2011, but never fixed.

[1] GPF report
    BUG: unable to handle kernel NULL pointer dereference at           (null)
    IP: [&lt;          (null)&gt;]           (null)
    PGD 3752d067 PUD 37a7b067 PMD 0
    Oops: 0010 [#1] SMP KASAN
    Modules linked in:
    CPU: 2 PID: 148 Comm: kworker/u10:2 Not tainted 4.4.0-rc2+ #51
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
    Workqueue: events_unbound flush_to_ldisc
    task: ffff88006da94440 ti: ffff88006db60000 task.ti: ffff88006db60000
    RIP: 0010:[&lt;0000000000000000&gt;]  [&lt;          (null)&gt;]           (null)
    RSP: 0018:ffff88006db67b50  EFLAGS: 00010246
    RAX: 0000000000000102 RBX: ffff88003ab32f88 RCX: 0000000000000102
    RDX: 0000000000000000 RSI: ffff88003ab330a6 RDI: ffff88003aabd388
    RBP: ffff88006db67c48 R08: ffff88003ab32f9c R09: ffff88003ab31fb0
    R10: ffff88003ab32fa8 R11: 0000000000000000 R12: dffffc0000000000
    R13: ffff88006db67c20 R14: ffffffff863df820 R15: ffff88003ab31fb8
    FS:  0000000000000000(0000) GS:ffff88006dc00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: 0000000000000000 CR3: 0000000037938000 CR4: 00000000000006e0
    Stack:
     ffffffff829f46f1 ffff88006da94bf8 ffff88006da94bf8 0000000000000000
     ffff88003ab31fb0 ffff88003aabd438 ffff88003ab31ff8 ffff88006430fd90
     ffff88003ab32f9c ffffed0007557a87 1ffff1000db6cf78 ffff88003ab32078
    Call Trace:
     [&lt;ffffffff8127cf91&gt;] process_one_work+0x8f1/0x17a0 kernel/workqueue.c:2030
     [&lt;ffffffff8127df14&gt;] worker_thread+0xd4/0x1180 kernel/workqueue.c:2162
     [&lt;ffffffff8128faaf&gt;] kthread+0x1cf/0x270 drivers/block/aoe/aoecmd.c:1302
     [&lt;ffffffff852a7c2f&gt;] ret_from_fork+0x3f/0x70 arch/x86/entry/entry_64.S:468
    Code:  Bad RIP value.
    RIP  [&lt;          (null)&gt;]           (null)
     RSP &lt;ffff88006db67b50&gt;
    CR2: 0000000000000000
    ---[ end trace a587f8947e54d6ea ]---

Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: earlycon: Add missing spinlock initialization</title>
<updated>2015-12-13T07:05:28+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2015-11-27T10:13:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e1dd3bef6d03c908b173259229b96074d57fccc8'/>
<id>e1dd3bef6d03c908b173259229b96074d57fccc8</id>
<content type='text'>
If an earlycon console driver needs to acquire the uart_port.lock
spinlock for serial console output, and CONFIG_DEBUG_SPINLOCK=y:

    BUG: spinlock bad magic on CPU#0, swapper/0
     lock: sci_ports+0x0/0x3480, .magic: 00000000, .owner: &lt;none&gt;/-1, .owner_cpu: 0
    CPU: 0 PID: 0 Comm: swapper Not tainted 4.4.0-rc2-koelsch-g62ea5edf143bb1d0-dirty #2083
    Hardware name: Generic R8A7791 (Flattened Device Tree)
    [&lt;c00173a0&gt;] (unwind_backtrace) from [&lt;c0013094&gt;] (show_stack+0x10/0x14)
    [&lt;c0013094&gt;] (show_stack) from [&lt;c01f2338&gt;] (dump_stack+0x70/0x8c)
    [&lt;c01f2338&gt;] (dump_stack) from [&lt;c00702d8&gt;] (do_raw_spin_lock+0x20/0x190)
    [&lt;c00702d8&gt;] (do_raw_spin_lock) from [&lt;c0267590&gt;] (serial_console_write+0x4c/0x130)
    [&lt;c0267590&gt;] (serial_console_write) from [&lt;c00734c4&gt;] (call_console_drivers.constprop.13+0xc8/0xec)
    [&lt;c00734c4&gt;] (call_console_drivers.constprop.13) from [&lt;c0074ef0&gt;] (console_unlock+0x354/0x440)
    [&lt;c0074ef0&gt;] (console_unlock) from [&lt;c0075bb4&gt;] (register_console+0x2a0/0x394)
    [&lt;c0075bb4&gt;] (register_console) from [&lt;c06cb750&gt;] (of_setup_earlycon+0x90/0xa4)
    [&lt;c06cb750&gt;] (of_setup_earlycon) from [&lt;c06cfb60&gt;] (setup_of_earlycon+0x118/0x13c)
    [&lt;c06cfb60&gt;] (setup_of_earlycon) from [&lt;c06b34ac&gt;] (do_early_param+0x64/0xb4)
    [&lt;c06b34ac&gt;] (do_early_param) from [&lt;c00472c0&gt;] (parse_args+0x254/0x350)
    [&lt;c00472c0&gt;] (parse_args) from [&lt;c06b3860&gt;] (parse_early_options+0x2c/0x3c)
    [&lt;c06b3860&gt;] (parse_early_options) from [&lt;c06b389c&gt;] (parse_early_param+0x2c/0x40)
    [&lt;c06b389c&gt;] (parse_early_param) from [&lt;c06b5b08&gt;] (setup_arch+0x520/0xaf0)
    [&lt;c06b5b08&gt;] (setup_arch) from [&lt;c06b3948&gt;] (start_kernel+0x94/0x370)
    [&lt;c06b3948&gt;] (start_kernel) from [&lt;40008090&gt;] (0x40008090)

Initialize the spinlock in of_setup_earlycon() and register_earlycon(),
to fix this for both DT-based and legacy earlycon.  If the driver would
reinitialize the spinlock again, this is harmless, as it's allowed to
reinitialize an unlocked spinlock.

Alternatives are:
  - Drivers having an early_serial_console_write() that only performs
    the core functionality of serial_console_write(), without acquiring
    the lock (which may be unsafe, depending on the hardware),
  - Drivers initializing the spinlock in their private earlycon setup
    functions.

As uart_port is owned by generic serial_core, and uart_port.lock is
initialized by uart_add_one_port() for the normal case, this can better
be handled in the earlycon core.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Reported-by: Bjorn Andersson &lt;bjorn.andersson@sonymobile.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If an earlycon console driver needs to acquire the uart_port.lock
spinlock for serial console output, and CONFIG_DEBUG_SPINLOCK=y:

    BUG: spinlock bad magic on CPU#0, swapper/0
     lock: sci_ports+0x0/0x3480, .magic: 00000000, .owner: &lt;none&gt;/-1, .owner_cpu: 0
    CPU: 0 PID: 0 Comm: swapper Not tainted 4.4.0-rc2-koelsch-g62ea5edf143bb1d0-dirty #2083
    Hardware name: Generic R8A7791 (Flattened Device Tree)
    [&lt;c00173a0&gt;] (unwind_backtrace) from [&lt;c0013094&gt;] (show_stack+0x10/0x14)
    [&lt;c0013094&gt;] (show_stack) from [&lt;c01f2338&gt;] (dump_stack+0x70/0x8c)
    [&lt;c01f2338&gt;] (dump_stack) from [&lt;c00702d8&gt;] (do_raw_spin_lock+0x20/0x190)
    [&lt;c00702d8&gt;] (do_raw_spin_lock) from [&lt;c0267590&gt;] (serial_console_write+0x4c/0x130)
    [&lt;c0267590&gt;] (serial_console_write) from [&lt;c00734c4&gt;] (call_console_drivers.constprop.13+0xc8/0xec)
    [&lt;c00734c4&gt;] (call_console_drivers.constprop.13) from [&lt;c0074ef0&gt;] (console_unlock+0x354/0x440)
    [&lt;c0074ef0&gt;] (console_unlock) from [&lt;c0075bb4&gt;] (register_console+0x2a0/0x394)
    [&lt;c0075bb4&gt;] (register_console) from [&lt;c06cb750&gt;] (of_setup_earlycon+0x90/0xa4)
    [&lt;c06cb750&gt;] (of_setup_earlycon) from [&lt;c06cfb60&gt;] (setup_of_earlycon+0x118/0x13c)
    [&lt;c06cfb60&gt;] (setup_of_earlycon) from [&lt;c06b34ac&gt;] (do_early_param+0x64/0xb4)
    [&lt;c06b34ac&gt;] (do_early_param) from [&lt;c00472c0&gt;] (parse_args+0x254/0x350)
    [&lt;c00472c0&gt;] (parse_args) from [&lt;c06b3860&gt;] (parse_early_options+0x2c/0x3c)
    [&lt;c06b3860&gt;] (parse_early_options) from [&lt;c06b389c&gt;] (parse_early_param+0x2c/0x40)
    [&lt;c06b389c&gt;] (parse_early_param) from [&lt;c06b5b08&gt;] (setup_arch+0x520/0xaf0)
    [&lt;c06b5b08&gt;] (setup_arch) from [&lt;c06b3948&gt;] (start_kernel+0x94/0x370)
    [&lt;c06b3948&gt;] (start_kernel) from [&lt;40008090&gt;] (0x40008090)

Initialize the spinlock in of_setup_earlycon() and register_earlycon(),
to fix this for both DT-based and legacy earlycon.  If the driver would
reinitialize the spinlock again, this is harmless, as it's allowed to
reinitialize an unlocked spinlock.

Alternatives are:
  - Drivers having an early_serial_console_write() that only performs
    the core functionality of serial_console_write(), without acquiring
    the lock (which may be unsafe, depending on the hardware),
  - Drivers initializing the spinlock in their private earlycon setup
    functions.

As uart_port is owned by generic serial_core, and uart_port.lock is
initialized by uart_add_one_port() for the normal case, this can better
be handled in the earlycon core.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Reported-by: Bjorn Andersson &lt;bjorn.andersson@sonymobile.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: sh-sci: Fix length of scatterlist</title>
<updated>2015-12-13T05:42:31+00:00</updated>
<author>
<name>Yoshihiro Shimoda</name>
<email>yoshihiro.shimoda.uh@renesas.com</email>
</author>
<published>2015-12-04T14:21:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d09959e7529451a1c302197fb1396ed5b835f6d3'/>
<id>d09959e7529451a1c302197fb1396ed5b835f6d3</id>
<content type='text'>
This patch fixes an issue that the "length" of scatterlist should be
set using sg_dma_len(). Otherwise, a dmaengine driver cannot work
correctly if CONFIG_NEED_SG_DMA_LENGTH=y.

Fixes: 7b39d90184 (serial: sh-sci: Fix NULL pointer dereference if HIGHMEM is enabled)
Signed-off-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Acked-by: Simon Horman &lt;horms+renesas@verge.net.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes an issue that the "length" of scatterlist should be
set using sg_dma_len(). Otherwise, a dmaengine driver cannot work
correctly if CONFIG_NEED_SG_DMA_LENGTH=y.

Fixes: 7b39d90184 (serial: sh-sci: Fix NULL pointer dereference if HIGHMEM is enabled)
Signed-off-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Acked-by: Simon Horman &lt;horms+renesas@verge.net.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>n_tty: Fix poll() after buffer-limited eof push read</title>
<updated>2015-12-13T05:42:31+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2015-11-27T18:59:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ac8f3bf8832a405cc6e4dccb1d26d5cb2994d234'/>
<id>ac8f3bf8832a405cc6e4dccb1d26d5cb2994d234</id>
<content type='text'>
commit 40d5e0905a03 ("n_tty: Fix EOF push handling") fixed EOF push
for reads. However, that approach still allows a condition mismatch
between poll() and read(), where poll() returns POLLIN but read()
blocks. This state can happen when a previous read() returned because
the user buffer was full and the next character was an EOF not at the
beginning of the line. While the next read() will properly identify
the condition and advance the read buffer tail without improperly
indicating an EOF file condition (ie., read() will not mistakenly
return 0), poll() will mistakenly indicate POLLIN.

Although a possible solution would be to peek at the input buffer
in n_tty_poll(), the better solution in this patch is to eat the
EOF during the previous read() (ie., fix the problem by eliminating
the condition).

The current canon line buffer copy limits the scan for next end-of-line
to the smaller of either,
   a. the remaining user buffer size
   b. completed lines in the input buffer
When the remaining user buffer size is exactly one less than the
end-of-line marked by EOF push, the EOF is not scanned nor skipped
but left for subsequent reads. In the example below, the scan
index 'eol' has stopped at the EOF because it is past the scan
limit of 5 (not because it has found the next set bit in read_flags)

   user buffer [*nr = 5]    _ _ _ _ _

   read_flags               0 0 0 0 0   1
   input buffer             h e l l o [EOF]
                            ^           ^
                           /           /
                         tail        eol

   result: found = 0, tail += 5, *nr += 5

Instead, allow the scan to peek ahead 1 byte (while still limiting the
scan to completed lines in the input buffer). For the example above,

   result: found = 1, tail += 6, *nr += 5

Because the scan limit is now bumped +1 byte, when the scan is
completed, the tail advance and the user buffer copy limit is
re-clamped to *nr when EOF is _not_ found.

Fixes: 40d5e0905a03 ("n_tty: Fix EOF push handling")
Cc: &lt;stable@vger.kernel.org&gt; # 3.12+
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 40d5e0905a03 ("n_tty: Fix EOF push handling") fixed EOF push
for reads. However, that approach still allows a condition mismatch
between poll() and read(), where poll() returns POLLIN but read()
blocks. This state can happen when a previous read() returned because
the user buffer was full and the next character was an EOF not at the
beginning of the line. While the next read() will properly identify
the condition and advance the read buffer tail without improperly
indicating an EOF file condition (ie., read() will not mistakenly
return 0), poll() will mistakenly indicate POLLIN.

Although a possible solution would be to peek at the input buffer
in n_tty_poll(), the better solution in this patch is to eat the
EOF during the previous read() (ie., fix the problem by eliminating
the condition).

The current canon line buffer copy limits the scan for next end-of-line
to the smaller of either,
   a. the remaining user buffer size
   b. completed lines in the input buffer
When the remaining user buffer size is exactly one less than the
end-of-line marked by EOF push, the EOF is not scanned nor skipped
but left for subsequent reads. In the example below, the scan
index 'eol' has stopped at the EOF because it is past the scan
limit of 5 (not because it has found the next set bit in read_flags)

   user buffer [*nr = 5]    _ _ _ _ _

   read_flags               0 0 0 0 0   1
   input buffer             h e l l o [EOF]
                            ^           ^
                           /           /
                         tail        eol

   result: found = 0, tail += 5, *nr += 5

Instead, allow the scan to peek ahead 1 byte (while still limiting the
scan to completed lines in the input buffer). For the example above,

   result: found = 1, tail += 6, *nr += 5

Because the scan limit is now bumped +1 byte, when the scan is
completed, the tail advance and the user buffer copy limit is
re-clamped to *nr when EOF is _not_ found.

Fixes: 40d5e0905a03 ("n_tty: Fix EOF push handling")
Cc: &lt;stable@vger.kernel.org&gt; # 3.12+
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: 8250_uniphier: fix dl_read and dl_write functions</title>
<updated>2015-12-13T05:42:31+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2015-10-19T04:37:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7be047e035dc4fb1536f1694cbb932f881533ab2'/>
<id>7be047e035dc4fb1536f1694cbb932f881533ab2</id>
<content type='text'>
The register offset must be shifted by regshift, otherwise the
baudrate is not set.  I missed the issue probably because the
divisor register was already set by the boot loader.

Fixes: 1a8d2903cb6a ("serial: 8250_uniphier: add UniPhier serial driver")
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The register offset must be shifted by regshift, otherwise the
baudrate is not set.  I missed the issue probably because the
divisor register was already set by the boot loader.

Fixes: 1a8d2903cb6a ("serial: 8250_uniphier: add UniPhier serial driver")
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: export fsl8250_handle_irq</title>
<updated>2015-11-21T00:19:54+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2015-11-16T15:48:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bd63acf9e9a6b48e9c6c15f0f413f85a481cb5ef'/>
<id>bd63acf9e9a6b48e9c6c15f0f413f85a481cb5ef</id>
<content type='text'>
fsl8250_handle_irq is now used by the of_serial driver, and that fails
if it is a loadable module:

ERROR: "fsl8250_handle_irq" [drivers/tty/serial/of_serial.ko] undefined!

This exports the symbol to avoid randconfig errors.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Fixes: d43b54d269d2 ("serial: Enable Freescale 16550 workaround on arm")
Cc: Scott Wood &lt;scottwood@freescale.com&gt;
Signed-off-by: Jeff Mahoney &lt;jeffm@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fsl8250_handle_irq is now used by the of_serial driver, and that fails
if it is a loadable module:

ERROR: "fsl8250_handle_irq" [drivers/tty/serial/of_serial.ko] undefined!

This exports the symbol to avoid randconfig errors.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Fixes: d43b54d269d2 ("serial: Enable Freescale 16550 workaround on arm")
Cc: Scott Wood &lt;scottwood@freescale.com&gt;
Signed-off-by: Jeff Mahoney &lt;jeffm@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: 8250_mid: Add missing dependency</title>
<updated>2015-11-21T00:19:54+00:00</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2015-11-12T13:21:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fa70045e9df47d2e7a698e5f7a0d21423a58cdaa'/>
<id>fa70045e9df47d2e7a698e5f7a0d21423a58cdaa</id>
<content type='text'>
8250_mid uses rational_best_approximation() function, so the
driver needs to select CONFIG_RATIONAL option.

This fixes build error when CONFIG_RATIONAL is not enabled:

drivers/built-in.o: In function `mid8250_set_termios':
8250_mid.c:(.text+0x10169a): undefined reference to `rational_best_approximation'

Reported-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Acked-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
8250_mid uses rational_best_approximation() function, so the
driver needs to select CONFIG_RATIONAL option.

This fixes build error when CONFIG_RATIONAL is not enabled:

drivers/built-in.o: In function `mid8250_set_termios':
8250_mid.c:(.text+0x10169a): undefined reference to `rational_best_approximation'

Reported-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Acked-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tty: audit: Fix audit source</title>
<updated>2015-11-21T00:19:54+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2015-11-08T13:52:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6b2a3d628aa752f0ab825fc6d4d07b09e274d1c1'/>
<id>6b2a3d628aa752f0ab825fc6d4d07b09e274d1c1</id>
<content type='text'>
The data to audit/record is in the 'from' buffer (ie., the input
read buffer).

Fixes: 72586c6061ab ("n_tty: Fix auditing support for cannonical mode")
Cc: stable &lt;stable@vger.kernel.org&gt; # 4.1+
Cc: Miloslav Trmač &lt;mitr@redhat.com&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Acked-by: Laura Abbott &lt;labbott@fedoraproject.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The data to audit/record is in the 'from' buffer (ie., the input
read buffer).

Fixes: 72586c6061ab ("n_tty: Fix auditing support for cannonical mode")
Cc: stable &lt;stable@vger.kernel.org&gt; # 4.1+
Cc: Miloslav Trmač &lt;mitr@redhat.com&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Acked-by: Laura Abbott &lt;labbott@fedoraproject.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: etraxfs-uart: Fix crash</title>
<updated>2015-11-21T00:19:54+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2015-11-02T02:32:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f356d7a7ddb5ea545e81c84eecfdf1b5ab4647fc'/>
<id>f356d7a7ddb5ea545e81c84eecfdf1b5ab4647fc</id>
<content type='text'>
Since commit 7d8c70d8048c ("serial: mctrl-gpio: rename init function"),
crisv32 either do not build or crash as follows.

Unable to handle kernel NULL pointer dereference
Linux 4.3.0-rc7-next-20151101 #1 Sun Nov 1 11:41:28 PST 2015
...
Call Trace: [&lt;c0004a0e&gt;] show_stack+0x0/0x9e
[&lt;c004c0c0&gt;] printk+0x0/0x2c
[&lt;c00059d4&gt;] show_registers+0x14a/0x1c2
[&lt;c004c0c0&gt;] printk+0x0/0x2c
[&lt;c0004b52&gt;] die_if_kernel+0x7c/0x9e
[&lt;c0005346&gt;] do_page_fault+0x32e/0x3e6
[&lt;c01dc59c&gt;] of_get_property+0x0/0x2c
[&lt;c01e0558&gt;] of_irq_parse_raw+0x12a/0x376
[&lt;c01dc59c&gt;] of_get_property+0x0/0x2c
[&lt;c0053aca&gt;] get_page_from_freelist+0x73e/0x856
[&lt;c01dc59c&gt;] of_get_property+0x0/0x2c
[&lt;c0008912&gt;] d_mmu_refill+0x10a/0x112
[&lt;c01b488c&gt;] devm_kmalloc+0x40/0x56
[&lt;c01b47d0&gt;] add_dr+0xc/0x1c
[&lt;c01b4800&gt;] devm_add_action+0x2/0x4e
[&lt;c01abdbc&gt;] mctrl_gpio_init_noauto+0x1c/0x76
[&lt;c01abf9e&gt;] mctrl_gpio_init+0x22/0x110

The function call in the etraxfs-uart driver was not renamed,
possibly due to interference with commit 7b9c5162c182 ("serial:
etraxfs-uart: use mctrl_gpio helpers for handling modem signals").

Fixes: 7d8c70d8048c ("serial: mctrl-gpio: rename init function")
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Niklas Cassel &lt;nks@flawful.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit 7d8c70d8048c ("serial: mctrl-gpio: rename init function"),
crisv32 either do not build or crash as follows.

Unable to handle kernel NULL pointer dereference
Linux 4.3.0-rc7-next-20151101 #1 Sun Nov 1 11:41:28 PST 2015
...
Call Trace: [&lt;c0004a0e&gt;] show_stack+0x0/0x9e
[&lt;c004c0c0&gt;] printk+0x0/0x2c
[&lt;c00059d4&gt;] show_registers+0x14a/0x1c2
[&lt;c004c0c0&gt;] printk+0x0/0x2c
[&lt;c0004b52&gt;] die_if_kernel+0x7c/0x9e
[&lt;c0005346&gt;] do_page_fault+0x32e/0x3e6
[&lt;c01dc59c&gt;] of_get_property+0x0/0x2c
[&lt;c01e0558&gt;] of_irq_parse_raw+0x12a/0x376
[&lt;c01dc59c&gt;] of_get_property+0x0/0x2c
[&lt;c0053aca&gt;] get_page_from_freelist+0x73e/0x856
[&lt;c01dc59c&gt;] of_get_property+0x0/0x2c
[&lt;c0008912&gt;] d_mmu_refill+0x10a/0x112
[&lt;c01b488c&gt;] devm_kmalloc+0x40/0x56
[&lt;c01b47d0&gt;] add_dr+0xc/0x1c
[&lt;c01b4800&gt;] devm_add_action+0x2/0x4e
[&lt;c01abdbc&gt;] mctrl_gpio_init_noauto+0x1c/0x76
[&lt;c01abf9e&gt;] mctrl_gpio_init+0x22/0x110

The function call in the etraxfs-uart driver was not renamed,
possibly due to interference with commit 7b9c5162c182 ("serial:
etraxfs-uart: use mctrl_gpio helpers for handling modem signals").

Fixes: 7d8c70d8048c ("serial: mctrl-gpio: rename init function")
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Niklas Cassel &lt;nks@flawful.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: fsl_lpuart: Fix earlycon support</title>
<updated>2015-11-21T00:19:54+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2015-10-20T13:55:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bec8bf61dc911ebe04a7997db2c44ed51d8ade9d'/>
<id>bec8bf61dc911ebe04a7997db2c44ed51d8ade9d</id>
<content type='text'>
Earlycon support for Freescale lpuart should only be enabled when
console support is enabled.

Fixes: 1d59b382f1c4 ("serial: fsl_lpuart: add earlycon support")
Acked-by: Stefan Agner &lt;stefan@agner.ch&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Earlycon support for Freescale lpuart should only be enabled when
console support is enabled.

Fixes: 1d59b382f1c4 ("serial: fsl_lpuart: add earlycon support")
Acked-by: Stefan Agner &lt;stefan@agner.ch&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
