<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/vt_kern.h, branch v4.19-rc5</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>License cleanup: add SPDX GPL-2.0 license identifier to files with no license</title>
<updated>2017-11-02T10:10:55+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-01T14:07:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b24413180f5600bcb3bb70fbed5cf186b60864bd'/>
<id>b24413180f5600bcb3bb70fbed5cf186b60864bd</id>
<content type='text'>
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier.  The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
 - file had no licensing information it it.
 - file was a */uapi/* one with no licensing information in it,
 - file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode &amp; Windriver) producing SPDX
tag:value files created by Philippe Ombredanne.  Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed.  Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
 - Files considered eligible had to be source code files.
 - Make and config files were included as candidates if they contained &gt;5
   lines of source
 - File already had some variant of a license header in it (even if &lt;5
   lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

 - when both scanners couldn't find any license traces, file was
   considered to have no license information in it, and the top level
   COPYING file license applied.

   For non */uapi/* files that summary was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0                                              11139

   and resulted in the first patch in this series.

   If that file was a */uapi/* path one, it was "GPL-2.0 WITH
   Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0 WITH Linux-syscall-note                        930

   and resulted in the second patch in this series.

 - if a file had some form of licensing information in it, and was one
   of the */uapi/* ones, it was denoted with the Linux-syscall-note if
   any GPL family license was found in the file or had no licensing in
   it (per prior point).  Results summary:

   SPDX license identifier                            # files
   ---------------------------------------------------|------
   GPL-2.0 WITH Linux-syscall-note                       270
   GPL-2.0+ WITH Linux-syscall-note                      169
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
   LGPL-2.1+ WITH Linux-syscall-note                      15
   GPL-1.0+ WITH Linux-syscall-note                       14
   ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
   LGPL-2.0+ WITH Linux-syscall-note                       4
   LGPL-2.1 WITH Linux-syscall-note                        3
   ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
   ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1

   and that resulted in the third patch in this series.

 - when the two scanners agreed on the detected license(s), that became
   the concluded license(s).

 - when there was disagreement between the two scanners (one detected a
   license but the other didn't, or they both detected different
   licenses) a manual inspection of the file occurred.

 - In most cases a manual inspection of the information in the file
   resulted in a clear resolution of the license that should apply (and
   which scanner probably needed to revisit its heuristics).

 - When it was not immediately clear, the license identifier was
   confirmed with lawyers working with the Linux Foundation.

 - If there was any question as to the appropriate license identifier,
   the file was flagged for further research and to be revisited later
   in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights.  The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
 - a full scancode scan run, collecting the matched texts, detected
   license ids and scores
 - reviewing anything where there was a license detected (about 500+
   files) to ensure that the applied SPDX license was correct
 - reviewing anything where there was no detection but the patch license
   was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
   SPDX license was correct

This produced a worksheet with 20 files needing minor correction.  This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg.  Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected.  This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.)  Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Reviewed-by: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.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>
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier.  The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
 - file had no licensing information it it.
 - file was a */uapi/* one with no licensing information in it,
 - file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode &amp; Windriver) producing SPDX
tag:value files created by Philippe Ombredanne.  Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed.  Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
 - Files considered eligible had to be source code files.
 - Make and config files were included as candidates if they contained &gt;5
   lines of source
 - File already had some variant of a license header in it (even if &lt;5
   lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

 - when both scanners couldn't find any license traces, file was
   considered to have no license information in it, and the top level
   COPYING file license applied.

   For non */uapi/* files that summary was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0                                              11139

   and resulted in the first patch in this series.

   If that file was a */uapi/* path one, it was "GPL-2.0 WITH
   Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0 WITH Linux-syscall-note                        930

   and resulted in the second patch in this series.

 - if a file had some form of licensing information in it, and was one
   of the */uapi/* ones, it was denoted with the Linux-syscall-note if
   any GPL family license was found in the file or had no licensing in
   it (per prior point).  Results summary:

   SPDX license identifier                            # files
   ---------------------------------------------------|------
   GPL-2.0 WITH Linux-syscall-note                       270
   GPL-2.0+ WITH Linux-syscall-note                      169
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
   LGPL-2.1+ WITH Linux-syscall-note                      15
   GPL-1.0+ WITH Linux-syscall-note                       14
   ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
   LGPL-2.0+ WITH Linux-syscall-note                       4
   LGPL-2.1 WITH Linux-syscall-note                        3
   ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
   ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1

   and that resulted in the third patch in this series.

 - when the two scanners agreed on the detected license(s), that became
   the concluded license(s).

 - when there was disagreement between the two scanners (one detected a
   license but the other didn't, or they both detected different
   licenses) a manual inspection of the file occurred.

 - In most cases a manual inspection of the information in the file
   resulted in a clear resolution of the license that should apply (and
   which scanner probably needed to revisit its heuristics).

 - When it was not immediately clear, the license identifier was
   confirmed with lawyers working with the Linux Foundation.

 - If there was any question as to the appropriate license identifier,
   the file was flagged for further research and to be revisited later
   in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights.  The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
 - a full scancode scan run, collecting the matched texts, detected
   license ids and scores
 - reviewing anything where there was a license detected (about 500+
   files) to ensure that the applied SPDX license was correct
 - reviewing anything where there was no detection but the patch license
   was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
   SPDX license was correct

This produced a worksheet with 20 files needing minor correction.  This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg.  Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected.  This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.)  Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Reviewed-by: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tty: vgacon+sisusb, move scrolldelta to a common helper</title>
<updated>2016-10-27T14:37:44+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2016-10-03T09:18:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=35cc56f9a30480c8a0cca809cf341614a2144758'/>
<id>35cc56f9a30480c8a0cca809cf341614a2144758</id>
<content type='text'>
The code is mirrorred in scrolldelta implementations of both vgacon
and sisusb. Let's move the code to a separate helper where we will
perform a common cleanup and further changes.

While we are moving the code, make it linear and save one indentation
level. This is done by returning from the "!lines" then-branch
immediatelly. This allows flushing the else-branch 1 level to the
left, obviously.

Few more new lines and comments were added too.

And do not forget to export the helper function given sisusb can be
built as module.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Thomas Winischhofer &lt;thomas@winischhofer.net&gt;
Cc: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Cc: &lt;linux-fbdev@vger.kernel.org&gt;
Cc: &lt;linux-usb@vger.kernel.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 code is mirrorred in scrolldelta implementations of both vgacon
and sisusb. Let's move the code to a separate helper where we will
perform a common cleanup and further changes.

While we are moving the code, make it linear and save one indentation
level. This is done by returning from the "!lines" then-branch
immediatelly. This allows flushing the else-branch 1 level to the
left, obviously.

Few more new lines and comments were added too.

And do not forget to export the helper function given sisusb can be
built as module.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Thomas Winischhofer &lt;thomas@winischhofer.net&gt;
Cc: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Cc: &lt;linux-fbdev@vger.kernel.org&gt;
Cc: &lt;linux-usb@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tty: vt, ignore PIO_UNIMAPCLR param</title>
<updated>2016-06-25T16:04:48+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2016-06-23T11:34:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f8b0c2e688f086d22157afc734755ed370e288dc'/>
<id>f8b0c2e688f086d22157afc734755ed370e288dc</id>
<content type='text'>
We do not do hashtables for unicode fonts since 1995 (1.3.28). So it
is time to remove the second parameter of con_clear_unimap and ignore
the advice from userspace completely.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&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>
We do not do hashtables for unicode fonts since 1995 (1.3.28). So it
is time to remove the second parameter of con_clear_unimap and ignore
the advice from userspace completely.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: remove lines parameter from scrollback</title>
<updated>2016-06-25T16:04:48+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2016-06-23T11:34:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1b0ec88ac1cb0413a717bc3cefea72d6f2533672'/>
<id>1b0ec88ac1cb0413a717bc3cefea72d6f2533672</id>
<content type='text'>
It is always called with 0, so remove the parameter and pass the
default down to scrolldelta without checking.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&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>
It is always called with 0, so remove the parameter and pass the
default down to scrolldelta without checking.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge 3.10-rc3 into tty-next</title>
<updated>2013-05-27T01:57:53+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-05-27T01:57:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8095e4e81b4bc38eef7e0be99f9ecc744eaa1683'/>
<id>8095e4e81b4bc38eef7e0be99f9ecc744eaa1683</id>
<content type='text'>
We want these fixes.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We want these fixes.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vt: delete unneeded function unbind_con_driver</title>
<updated>2013-05-20T19:27:59+00:00</updated>
<author>
<name>Wang YanQing</name>
<email>udknight@gmail.com</email>
</author>
<published>2013-05-08T18:14:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c1f5e38a5d3583b877619f95a922b607966dfc2e'/>
<id>c1f5e38a5d3583b877619f95a922b607966dfc2e</id>
<content type='text'>
Now there is no place use unbind_con_driver,
and we can achieve unbind_con_driver's function
with do_unbind_con_driver easily, so just delete
it to reduce code size and duplication.

Signed-off-by: Wang YanQing &lt;udknight@gmail.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>
Now there is no place use unbind_con_driver,
and we can achieve unbind_con_driver's function
with do_unbind_con_driver easily, so just delete
it to reduce code size and duplication.

Signed-off-by: Wang YanQing &lt;udknight@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tty/vt: Fix vc_deallocate() lock order</title>
<updated>2013-05-20T19:15:59+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-05-17T16:41:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=421b40a6286ee343d77d5e51f5ee6d04d7a2a90f'/>
<id>421b40a6286ee343d77d5e51f5ee6d04d7a2a90f</id>
<content type='text'>
Now that the tty port owns the flip buffers and i/o is allowed
from the driver even when no tty is attached, the destruction
of the tty port (and the flip buffers) must ensure that no
outstanding work is pending.

Unfortunately, this creates a lock order problem with the
console_lock (see attached lockdep report [1] below).

For single console deallocation, drop the console_lock prior
to port destruction. When multiple console deallocation,
defer port destruction until the consoles have been
deallocated.

tty_port_destroy() is not required if the port has not
been used; remove from vc_allocate() failure path.

[1] lockdep report from Dave Jones &lt;davej@redhat.com&gt;

 ======================================================
 [ INFO: possible circular locking dependency detected ]
 3.9.0+ #16 Not tainted
 -------------------------------------------------------
 (agetty)/26163 is trying to acquire lock:
 blocked:  ((&amp;buf-&gt;work)){+.+...}, instance: ffff88011c8b0020, at: [&lt;ffffffff81062065&gt;] flush_work+0x5/0x2e0

 but task is already holding lock:
 blocked:  (console_lock){+.+.+.}, instance: ffffffff81c2fde0, at: [&lt;ffffffff813bc201&gt;] vt_ioctl+0xb61/0x1230

 which lock already depends on the new lock.

 the existing dependency chain (in reverse order) is:

 -&gt; #1 (console_lock){+.+.+.}:
        [&lt;ffffffff810b3f74&gt;] lock_acquire+0xa4/0x210
        [&lt;ffffffff810416c7&gt;] console_lock+0x77/0x80
        [&lt;ffffffff813c3dcd&gt;] con_flush_chars+0x2d/0x50
        [&lt;ffffffff813b32b2&gt;] n_tty_receive_buf+0x122/0x14d0
        [&lt;ffffffff813b7709&gt;] flush_to_ldisc+0x119/0x170
        [&lt;ffffffff81064381&gt;] process_one_work+0x211/0x700
        [&lt;ffffffff8106498b&gt;] worker_thread+0x11b/0x3a0
        [&lt;ffffffff8106ce5d&gt;] kthread+0xed/0x100
        [&lt;ffffffff81601cac&gt;] ret_from_fork+0x7c/0xb0

 -&gt; #0 ((&amp;buf-&gt;work)){+.+...}:
        [&lt;ffffffff810b349a&gt;] __lock_acquire+0x193a/0x1c00
        [&lt;ffffffff810b3f74&gt;] lock_acquire+0xa4/0x210
        [&lt;ffffffff810620ae&gt;] flush_work+0x4e/0x2e0
        [&lt;ffffffff81065305&gt;] __cancel_work_timer+0x95/0x130
        [&lt;ffffffff810653b0&gt;] cancel_work_sync+0x10/0x20
        [&lt;ffffffff813b8212&gt;] tty_port_destroy+0x12/0x20
        [&lt;ffffffff813c65e8&gt;] vc_deallocate+0xf8/0x110
        [&lt;ffffffff813bc20c&gt;] vt_ioctl+0xb6c/0x1230
        [&lt;ffffffff813b01a5&gt;] tty_ioctl+0x285/0xd50
        [&lt;ffffffff811ba825&gt;] do_vfs_ioctl+0x305/0x530
        [&lt;ffffffff811baad1&gt;] sys_ioctl+0x81/0xa0
        [&lt;ffffffff81601d59&gt;] system_call_fastpath+0x16/0x1b

 other info that might help us debug this:

 [ 6760.076175]  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(console_lock);
                                lock((&amp;buf-&gt;work));
                                lock(console_lock);
   lock((&amp;buf-&gt;work));

  *** DEADLOCK ***

 1 lock on stack by (agetty)/26163:
  #0: blocked:  (console_lock){+.+.+.}, instance: ffffffff81c2fde0, at: [&lt;ffffffff813bc201&gt;] vt_ioctl+0xb61/0x1230
 stack backtrace:
 Pid: 26163, comm: (agetty) Not tainted 3.9.0+ #16
 Call Trace:
  [&lt;ffffffff815edb14&gt;] print_circular_bug+0x200/0x20e
  [&lt;ffffffff810b349a&gt;] __lock_acquire+0x193a/0x1c00
  [&lt;ffffffff8100a269&gt;] ? sched_clock+0x9/0x10
  [&lt;ffffffff8100a269&gt;] ? sched_clock+0x9/0x10
  [&lt;ffffffff8100a200&gt;] ? native_sched_clock+0x20/0x80
  [&lt;ffffffff810b3f74&gt;] lock_acquire+0xa4/0x210
  [&lt;ffffffff81062065&gt;] ? flush_work+0x5/0x2e0
  [&lt;ffffffff810620ae&gt;] flush_work+0x4e/0x2e0
  [&lt;ffffffff81062065&gt;] ? flush_work+0x5/0x2e0
  [&lt;ffffffff810b15db&gt;] ? mark_held_locks+0xbb/0x140
  [&lt;ffffffff8113c8a3&gt;] ? __free_pages_ok.part.57+0x93/0xc0
  [&lt;ffffffff810b15db&gt;] ? mark_held_locks+0xbb/0x140
  [&lt;ffffffff810652f2&gt;] ? __cancel_work_timer+0x82/0x130
  [&lt;ffffffff81065305&gt;] __cancel_work_timer+0x95/0x130
  [&lt;ffffffff810653b0&gt;] cancel_work_sync+0x10/0x20
  [&lt;ffffffff813b8212&gt;] tty_port_destroy+0x12/0x20
  [&lt;ffffffff813c65e8&gt;] vc_deallocate+0xf8/0x110
  [&lt;ffffffff813bc20c&gt;] vt_ioctl+0xb6c/0x1230
  [&lt;ffffffff810aec41&gt;] ? lock_release_holdtime.part.30+0xa1/0x170
  [&lt;ffffffff813b01a5&gt;] tty_ioctl+0x285/0xd50
  [&lt;ffffffff812b00f6&gt;] ? inode_has_perm.isra.46.constprop.61+0x56/0x80
  [&lt;ffffffff811ba825&gt;] do_vfs_ioctl+0x305/0x530
  [&lt;ffffffff812b04db&gt;] ? selinux_file_ioctl+0x5b/0x110
  [&lt;ffffffff811baad1&gt;] sys_ioctl+0x81/0xa0
  [&lt;ffffffff81601d59&gt;] system_call_fastpath+0x16/0x1b

Cc: Dave Jones &lt;davej@redhat.com&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>
Now that the tty port owns the flip buffers and i/o is allowed
from the driver even when no tty is attached, the destruction
of the tty port (and the flip buffers) must ensure that no
outstanding work is pending.

Unfortunately, this creates a lock order problem with the
console_lock (see attached lockdep report [1] below).

For single console deallocation, drop the console_lock prior
to port destruction. When multiple console deallocation,
defer port destruction until the consoles have been
deallocated.

tty_port_destroy() is not required if the port has not
been used; remove from vc_allocate() failure path.

[1] lockdep report from Dave Jones &lt;davej@redhat.com&gt;

 ======================================================
 [ INFO: possible circular locking dependency detected ]
 3.9.0+ #16 Not tainted
 -------------------------------------------------------
 (agetty)/26163 is trying to acquire lock:
 blocked:  ((&amp;buf-&gt;work)){+.+...}, instance: ffff88011c8b0020, at: [&lt;ffffffff81062065&gt;] flush_work+0x5/0x2e0

 but task is already holding lock:
 blocked:  (console_lock){+.+.+.}, instance: ffffffff81c2fde0, at: [&lt;ffffffff813bc201&gt;] vt_ioctl+0xb61/0x1230

 which lock already depends on the new lock.

 the existing dependency chain (in reverse order) is:

 -&gt; #1 (console_lock){+.+.+.}:
        [&lt;ffffffff810b3f74&gt;] lock_acquire+0xa4/0x210
        [&lt;ffffffff810416c7&gt;] console_lock+0x77/0x80
        [&lt;ffffffff813c3dcd&gt;] con_flush_chars+0x2d/0x50
        [&lt;ffffffff813b32b2&gt;] n_tty_receive_buf+0x122/0x14d0
        [&lt;ffffffff813b7709&gt;] flush_to_ldisc+0x119/0x170
        [&lt;ffffffff81064381&gt;] process_one_work+0x211/0x700
        [&lt;ffffffff8106498b&gt;] worker_thread+0x11b/0x3a0
        [&lt;ffffffff8106ce5d&gt;] kthread+0xed/0x100
        [&lt;ffffffff81601cac&gt;] ret_from_fork+0x7c/0xb0

 -&gt; #0 ((&amp;buf-&gt;work)){+.+...}:
        [&lt;ffffffff810b349a&gt;] __lock_acquire+0x193a/0x1c00
        [&lt;ffffffff810b3f74&gt;] lock_acquire+0xa4/0x210
        [&lt;ffffffff810620ae&gt;] flush_work+0x4e/0x2e0
        [&lt;ffffffff81065305&gt;] __cancel_work_timer+0x95/0x130
        [&lt;ffffffff810653b0&gt;] cancel_work_sync+0x10/0x20
        [&lt;ffffffff813b8212&gt;] tty_port_destroy+0x12/0x20
        [&lt;ffffffff813c65e8&gt;] vc_deallocate+0xf8/0x110
        [&lt;ffffffff813bc20c&gt;] vt_ioctl+0xb6c/0x1230
        [&lt;ffffffff813b01a5&gt;] tty_ioctl+0x285/0xd50
        [&lt;ffffffff811ba825&gt;] do_vfs_ioctl+0x305/0x530
        [&lt;ffffffff811baad1&gt;] sys_ioctl+0x81/0xa0
        [&lt;ffffffff81601d59&gt;] system_call_fastpath+0x16/0x1b

 other info that might help us debug this:

 [ 6760.076175]  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(console_lock);
                                lock((&amp;buf-&gt;work));
                                lock(console_lock);
   lock((&amp;buf-&gt;work));

  *** DEADLOCK ***

 1 lock on stack by (agetty)/26163:
  #0: blocked:  (console_lock){+.+.+.}, instance: ffffffff81c2fde0, at: [&lt;ffffffff813bc201&gt;] vt_ioctl+0xb61/0x1230
 stack backtrace:
 Pid: 26163, comm: (agetty) Not tainted 3.9.0+ #16
 Call Trace:
  [&lt;ffffffff815edb14&gt;] print_circular_bug+0x200/0x20e
  [&lt;ffffffff810b349a&gt;] __lock_acquire+0x193a/0x1c00
  [&lt;ffffffff8100a269&gt;] ? sched_clock+0x9/0x10
  [&lt;ffffffff8100a269&gt;] ? sched_clock+0x9/0x10
  [&lt;ffffffff8100a200&gt;] ? native_sched_clock+0x20/0x80
  [&lt;ffffffff810b3f74&gt;] lock_acquire+0xa4/0x210
  [&lt;ffffffff81062065&gt;] ? flush_work+0x5/0x2e0
  [&lt;ffffffff810620ae&gt;] flush_work+0x4e/0x2e0
  [&lt;ffffffff81062065&gt;] ? flush_work+0x5/0x2e0
  [&lt;ffffffff810b15db&gt;] ? mark_held_locks+0xbb/0x140
  [&lt;ffffffff8113c8a3&gt;] ? __free_pages_ok.part.57+0x93/0xc0
  [&lt;ffffffff810b15db&gt;] ? mark_held_locks+0xbb/0x140
  [&lt;ffffffff810652f2&gt;] ? __cancel_work_timer+0x82/0x130
  [&lt;ffffffff81065305&gt;] __cancel_work_timer+0x95/0x130
  [&lt;ffffffff810653b0&gt;] cancel_work_sync+0x10/0x20
  [&lt;ffffffff813b8212&gt;] tty_port_destroy+0x12/0x20
  [&lt;ffffffff813c65e8&gt;] vc_deallocate+0xf8/0x110
  [&lt;ffffffff813bc20c&gt;] vt_ioctl+0xb6c/0x1230
  [&lt;ffffffff810aec41&gt;] ? lock_release_holdtime.part.30+0xa1/0x170
  [&lt;ffffffff813b01a5&gt;] tty_ioctl+0x285/0xd50
  [&lt;ffffffff812b00f6&gt;] ? inode_has_perm.isra.46.constprop.61+0x56/0x80
  [&lt;ffffffff811ba825&gt;] do_vfs_ioctl+0x305/0x530
  [&lt;ffffffff812b04db&gt;] ? selinux_file_ioctl+0x5b/0x110
  [&lt;ffffffff811baad1&gt;] sys_ioctl+0x81/0xa0
  [&lt;ffffffff81601d59&gt;] system_call_fastpath+0x16/0x1b

Cc: Dave Jones &lt;davej@redhat.com&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>Merge branch 'console-fixes' into drm-next</title>
<updated>2013-02-08T02:13:43+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2013-02-08T02:13:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=62cd2fa82a38cb3d653517822c62a39cdbb5f365'/>
<id>62cd2fa82a38cb3d653517822c62a39cdbb5f365</id>
<content type='text'>
(not the fbcon maintainer pull 2)

fix bug in vgacon on bootup and fbcon losing fonts on startup.

* console-fixes: (50 commits)
  fbcon: don't lose the console font across generic-&gt;chip driver switch
  vgacon/vt: clear buffer attributes when we load a 512 character font (v2)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(not the fbcon maintainer pull 2)

fix bug in vgacon on bootup and fbcon losing fonts on startup.

* console-fixes: (50 commits)
  fbcon: don't lose the console font across generic-&gt;chip driver switch
  vgacon/vt: clear buffer attributes when we load a 512 character font (v2)
</pre>
</div>
</content>
</entry>
<entry>
<title>fb: Yet another band-aid for fixing lockdep mess</title>
<updated>2013-02-08T02:02:41+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2013-01-25T00:28:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e93a9a868792ad71cdd09d75e5a02d8067473c4e'/>
<id>e93a9a868792ad71cdd09d75e5a02d8067473c4e</id>
<content type='text'>
I've still got lockdep warnings even after Alan's patch, and it seems that
yet more band aids are required to paper over similar paths for
unbind_con_driver() and unregister_con_driver().  After this hack, lockdep
warnings are finally gone.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Cc: Alan Cox &lt;alan@linux.intel.com&gt;
Cc: Florian Tobias Schandinat &lt;FlorianSchandinat@gmx.de&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Tested-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I've still got lockdep warnings even after Alan's patch, and it seems that
yet more band aids are required to paper over similar paths for
unbind_con_driver() and unregister_con_driver().  After this hack, lockdep
warnings are finally gone.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Cc: Alan Cox &lt;alan@linux.intel.com&gt;
Cc: Florian Tobias Schandinat &lt;FlorianSchandinat@gmx.de&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Tested-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vgacon/vt: clear buffer attributes when we load a 512 character font (v2)</title>
<updated>2013-02-07T02:37:03+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2013-01-24T04:14:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2a2483072393b27f4336ab068a1f48ca19ff1c1e'/>
<id>2a2483072393b27f4336ab068a1f48ca19ff1c1e</id>
<content type='text'>
When we switch from 256-&gt;512 byte font rendering mode, it means the
current contents of the screen is being reinterpreted. The bit that holds
the high bit of the 9-bit font, may have been previously set, and thus
the new font misrenders.

The problem case we see is grub2 writes spaces with the bit set, so it
ends up with data like 0x820, which gets reinterpreted into 0x120 char
which the font translates into G with a circumflex. This flashes up on
screen at boot and is quite ugly.

A current side effect of this patch though is that any rendering on the
screen changes color to a slightly darker color, but at least the screen
no longer corrupts.

v2: as suggested by hpa, always clear the attribute space, whether we
are are going to or from 512 chars.

Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we switch from 256-&gt;512 byte font rendering mode, it means the
current contents of the screen is being reinterpreted. The bit that holds
the high bit of the 9-bit font, may have been previously set, and thus
the new font misrenders.

The problem case we see is grub2 writes spaces with the bit set, so it
ends up with data like 0x820, which gets reinterpreted into 0x120 char
which the font translates into G with a circumflex. This flashes up on
screen at boot and is quite ugly.

A current side effect of this patch though is that any rendering on the
screen changes color to a slightly darker color, but at least the screen
no longer corrupts.

v2: as suggested by hpa, always clear the attribute space, whether we
are are going to or from 512 chars.

Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
