<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers, branch v3.4.91</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers?h=v3.4.91</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers?h=v3.4.91'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-05-18T12:25:57Z</updated>
<entry>
<title>tgafb: fix mode setting with fbset</title>
<updated>2014-05-18T12:25:57Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2014-01-23T19:42:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3ddd37aaf5db2fbcd0f8a485a9a3390d22574371'/>
<id>urn:sha1:3ddd37aaf5db2fbcd0f8a485a9a3390d22574371</id>
<content type='text'>
commit 624966589041deb32a2626ee2e176e8274581101 upstream.

Mode setting in the TGA driver is broken for these reasons:

- info-&gt;fix.line_length is set just once in tgafb_init_fix function. If
  we change videomode, info-&gt;fix.line_length is not recalculated - so
  the video mode is changed but the screen is corrupted because of wrong
  info-&gt;fix.line_length.

- info-&gt;fix.smem_len is set in tgafb_init_fix to the size of the default
  video mode (640x480). If we set a higher resolution,
  info-&gt;fix.smem_len is smaller than the current screen size, preventing
  the userspace program from mapping the framebuffer.

This patch fixes it:

- info-&gt;fix.line_length initialization is moved to tgafb_set_par so that
  it is recalculated with each mode change.

- info-&gt;fix.smem_len is set to a fixed value representing the real
  amount of video ram (the values are taken from xfree86 driver).

- add a check to tgafb_check_var to prevent us from setting a videomode
  that doesn't fit into videoram.

- in tgafb_register, tgafb_init_fix is moved upwards, to be called
  before fb_find_mode (because fb_find_mode already needs the videoram
  size set in tgafb_init_fix).

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;


</content>
</entry>
<entry>
<title>n_tty: Fix n_tty_write crash when echoing in raw mode</title>
<updated>2014-05-18T12:25:55Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2014-05-03T12:04:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=664c0fc651b6ca2ab43ddbb73bbda2acdb2c9915'/>
<id>urn:sha1:664c0fc651b6ca2ab43ddbb73bbda2acdb2c9915</id>
<content type='text'>
commit 4291086b1f081b869c6d79e5b7441633dc3ace00 upstream.

The tty atomic_write_lock does not provide an exclusion guarantee for
the tty driver if the termios settings are LECHO &amp; !OPOST.  And since
it is unexpected and not allowed to call TTY buffer helpers like
tty_insert_flip_string concurrently, this may lead to crashes when
concurrect writers call pty_write. In that case the following two
writers:
* the ECHOing from a workqueue and
* pty_write from the process
race and can overflow the corresponding TTY buffer like follows.

If we look into tty_insert_flip_string_fixed_flag, there is:
  int space = __tty_buffer_request_room(port, goal, flags);
  struct tty_buffer *tb = port-&gt;buf.tail;
  ...
  memcpy(char_buf_ptr(tb, tb-&gt;used), chars, space);
  ...
  tb-&gt;used += space;

so the race of the two can result in something like this:
              A                                B
__tty_buffer_request_room
                                  __tty_buffer_request_room
memcpy(buf(tb-&gt;used), ...)
tb-&gt;used += space;
                                  memcpy(buf(tb-&gt;used), ...) -&gt;BOOM

B's memcpy is past the tty_buffer due to the previous A's tb-&gt;used
increment.

Since the N_TTY line discipline input processing can output
concurrently with a tty write, obtain the N_TTY ldisc output_lock to
serialize echo output with normal tty writes.  This ensures the tty
buffer helper tty_insert_flip_string is not called concurrently and
everything is fine.

Note that this is nicely reproducible by an ordinary user using
forkpty and some setup around that (raw termios + ECHO). And it is
present in kernels at least after commit
d945cb9cce20ac7143c2de8d88b187f62db99bdc (pty: Rework the pty layer to
use the normal buffering logic) in 2.6.31-rc3.

js: add more info to the commit log
js: switch to bool
js: lock unconditionally
js: lock only the tty-&gt;ops-&gt;write call

References: CVE-2014-0196
Reported-and-tested-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
[bwh: Backported to 3.2: output_lock is a member of struct tty_struct]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>SCSI: megaraid: missing bounds check in mimd_to_kioc()</title>
<updated>2014-05-18T12:25:54Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2013-10-30T17:13:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3307c63bcea0f3a2d912bec9f460335fe051aaa8'/>
<id>urn:sha1:3307c63bcea0f3a2d912bec9f460335fe051aaa8</id>
<content type='text'>
commit 3de2260140417759c669d391613d583baf03b0cf upstream.

pthru32-&gt;dataxferlen comes from the user so we need to check that it's
not too large so we don't overflow the buffer.

Reported-by: Nico Golde &lt;nico@ngolde.de&gt;
Reported-by: Fabian Yamaguchi &lt;fabs@goesec.de&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Sumit Saxena &lt;sumit.saxena@lsi.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dm thin: fix dangling bio in process_deferred_bios error path</title>
<updated>2014-05-13T12:11:32Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2014-03-28T06:15:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=53b67ae8d3d01efbdfd7ae431d8d46cba70084b9'/>
<id>urn:sha1:53b67ae8d3d01efbdfd7ae431d8d46cba70084b9</id>
<content type='text'>
commit fe76cd88e654124d1431bb662a0fc6e99ca811a5 upstream.

If unable to ensure_next_mapping() we must add the current bio, which
was removed from the @bios list via bio_list_pop, back to the
deferred_bios list before all the remaining @bios.

Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Acked-by: Joe Thornber &lt;ejt@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Skip intel_crt_init for Dell XPS 8700</title>
<updated>2014-05-13T12:11:32Z</updated>
<author>
<name>Giacomo Comes</name>
<email>comes@naic.edu</email>
</author>
<published>2014-04-03T18:13:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b4e472edda0a5993ede690aca9a3fa3d8750c5f2'/>
<id>urn:sha1:b4e472edda0a5993ede690aca9a3fa3d8750c5f2</id>
<content type='text'>
commit 10b6ee4a87811a110cb01eaca01eb04da6801baf upstream.

The Dell XPS 8700 has a onboard Display port and HDMI port and no VGA port.
The call intel_crt_init freeze the machine, so skip such call.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73559
Signed-off-by: Giacomo Comes &lt;comes at naic.edu&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mtd: sm_ftl: heap corruption in sm_create_sysfs_attributes()</title>
<updated>2014-05-13T12:11:32Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2013-12-05T14:53:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9a9269138723e71e87f4adb00c0c2bbdc7bdcd0b'/>
<id>urn:sha1:9a9269138723e71e87f4adb00c0c2bbdc7bdcd0b</id>
<content type='text'>
commit b4c233057771581698a13694ab6f33b48ce837dc upstream.

We always put a NUL terminator one space past the end of the "vendor"
buffer.  Walter Harms also pointed out that this should just use
kstrndup().

Fixes: 7d17c02a01a1 ('mtd: Add new SmartMedia/xD FTL')

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mtd: nuc900_nand: NULL dereference in nuc900_nand_enable()</title>
<updated>2014-05-13T12:11:31Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2014-02-17T20:03:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c3a47361053bdd9059eec78510de21684f4112c5'/>
<id>urn:sha1:c3a47361053bdd9059eec78510de21684f4112c5</id>
<content type='text'>
commit c69dbbf3335a21aae74376d7e5db50a486d52439 upstream.

Instead of writing to "nand-&gt;reg + REG_FMICSR" we write to "REG_FMICSR"
which is NULL and not a valid register.

Fixes: 8bff82cbc308 ('mtd: add nand support for w90p910 (v2)')
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tgafb: fix data copying</title>
<updated>2014-05-13T12:11:31Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2014-01-23T19:43:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fd9a5e6cd4d5f923eff026dd288764cf65c001a7'/>
<id>urn:sha1:fd9a5e6cd4d5f923eff026dd288764cf65c001a7</id>
<content type='text'>
commit 6b0df6827bb6fcacb158dff29ad0a62d6418b534 upstream.

The functions for data copying copyarea_foreward_8bpp and
copyarea_backward_8bpp are buggy, they produce screen corruption.

This patch fixes the functions and moves the logic to one function
"copyarea_8bpp". For simplicity, the function only handles copying that
is aligned on 8 pixes. If we copy an unaligned area, generic function
cfb_copyarea is used.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>gpio: mxs: Allow for recursive enable_irq_wake() call</title>
<updated>2014-05-13T12:11:31Z</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2014-03-24T02:38:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0e0dc73524d0e17a6dce2d3cd7ec3d6a785eb6df'/>
<id>urn:sha1:0e0dc73524d0e17a6dce2d3cd7ec3d6a785eb6df</id>
<content type='text'>
commit a585f87c863e4e1d496459d382b802bf5ebe3717 upstream.

The scenario here is that someone calls enable_irq_wake() from somewhere
in the code. This will result in the lockdep producing a backtrace as can
be seen below. In my case, this problem is triggered when using the wl1271
(TI WlCore) driver found in drivers/net/wireless/ti/ .

The problem cause is rather obvious from the backtrace, but let's outline
the dependency. enable_irq_wake() grabs the IRQ buslock in irq_set_irq_wake(),
which in turns calls mxs_gpio_set_wake_irq() . But mxs_gpio_set_wake_irq()
calls enable_irq_wake() again on the one-level-higher IRQ , thus it tries to
grab the IRQ buslock again in irq_set_irq_wake() . Because the spinlock in
irq_set_irq_wake()-&gt;irq_get_desc_buslock()-&gt;__irq_get_desc_lock() is not
marked as recursive, lockdep will spew the stuff below.

We know we can safely re-enter the lock, so use IRQ_GC_INIT_NESTED_LOCK to
fix the spew.

 =============================================
 [ INFO: possible recursive locking detected ]
 3.10.33-00012-gf06b763-dirty #61 Not tainted
 ---------------------------------------------
 kworker/0:1/18 is trying to acquire lock:
  (&amp;irq_desc_lock_class){-.-...}, at: [&lt;c00685f0&gt;] __irq_get_desc_lock+0x48/0x88

 but task is already holding lock:
  (&amp;irq_desc_lock_class){-.-...}, at: [&lt;c00685f0&gt;] __irq_get_desc_lock+0x48/0x88

 other info that might help us debug this:
  Possible unsafe locking scenario:

        CPU0
        ----
   lock(&amp;irq_desc_lock_class);
   lock(&amp;irq_desc_lock_class);

  *** DEADLOCK ***

  May be due to missing lock nesting notation

 3 locks held by kworker/0:1/18:
  #0:  (events){.+.+.+}, at: [&lt;c0036308&gt;] process_one_work+0x134/0x4a4
  #1:  ((&amp;fw_work-&gt;work)){+.+.+.}, at: [&lt;c0036308&gt;] process_one_work+0x134/0x4a4
  #2:  (&amp;irq_desc_lock_class){-.-...}, at: [&lt;c00685f0&gt;] __irq_get_desc_lock+0x48/0x88

 stack backtrace:
 CPU: 0 PID: 18 Comm: kworker/0:1 Not tainted 3.10.33-00012-gf06b763-dirty #61
 Workqueue: events request_firmware_work_func
 [&lt;c0013eb4&gt;] (unwind_backtrace+0x0/0xf0) from [&lt;c0011c74&gt;] (show_stack+0x10/0x14)
 [&lt;c0011c74&gt;] (show_stack+0x10/0x14) from [&lt;c005bb08&gt;] (__lock_acquire+0x140c/0x1a64)
 [&lt;c005bb08&gt;] (__lock_acquire+0x140c/0x1a64) from [&lt;c005c6a8&gt;] (lock_acquire+0x9c/0x104)
 [&lt;c005c6a8&gt;] (lock_acquire+0x9c/0x104) from [&lt;c051d5a4&gt;] (_raw_spin_lock_irqsave+0x44/0x58)
 [&lt;c051d5a4&gt;] (_raw_spin_lock_irqsave+0x44/0x58) from [&lt;c00685f0&gt;] (__irq_get_desc_lock+0x48/0x88)
 [&lt;c00685f0&gt;] (__irq_get_desc_lock+0x48/0x88) from [&lt;c0068e78&gt;] (irq_set_irq_wake+0x20/0xf4)
 [&lt;c0068e78&gt;] (irq_set_irq_wake+0x20/0xf4) from [&lt;c027260c&gt;] (mxs_gpio_set_wake_irq+0x1c/0x24)
 [&lt;c027260c&gt;] (mxs_gpio_set_wake_irq+0x1c/0x24) from [&lt;c0068cf4&gt;] (set_irq_wake_real+0x30/0x44)
 [&lt;c0068cf4&gt;] (set_irq_wake_real+0x30/0x44) from [&lt;c0068ee4&gt;] (irq_set_irq_wake+0x8c/0xf4)
 [&lt;c0068ee4&gt;] (irq_set_irq_wake+0x8c/0xf4) from [&lt;c0310748&gt;] (wlcore_nvs_cb+0x10c/0x97c)
 [&lt;c0310748&gt;] (wlcore_nvs_cb+0x10c/0x97c) from [&lt;c02be5e8&gt;] (request_firmware_work_func+0x38/0x58)
 [&lt;c02be5e8&gt;] (request_firmware_work_func+0x38/0x58) from [&lt;c0036394&gt;] (process_one_work+0x1c0/0x4a4)
 [&lt;c0036394&gt;] (process_one_work+0x1c0/0x4a4) from [&lt;c0036a4c&gt;] (worker_thread+0x138/0x394)
 [&lt;c0036a4c&gt;] (worker_thread+0x138/0x394) from [&lt;c003cb74&gt;] (kthread+0xa4/0xb0)
 [&lt;c003cb74&gt;] (kthread+0xa4/0xb0) from [&lt;c000ee00&gt;] (ret_from_fork+0x14/0x34)
 wlcore: loaded

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Acked-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>rtlwifi: rtl8192se: Fix too long disable of IRQs</title>
<updated>2014-05-13T12:11:31Z</updated>
<author>
<name>Larry Finger</name>
<email>Larry.Finger@lwfinger.net</email>
</author>
<published>2014-03-04T22:53:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f8f3dc1af7bfe87bafce271fd3f7b65078cd8778'/>
<id>urn:sha1:f8f3dc1af7bfe87bafce271fd3f7b65078cd8778</id>
<content type='text'>
commit 2610decdd0b3808ba20471a999835cfee5275f98 upstream.

In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi:
rtl8192ce: Fix too long disable of IRQs", Olivier Langlois
&lt;olivier@trillion01.com&gt; fixed a problem caused by an extra long disabling
of interrupts. This patch makes the same fix for rtl8192se.

Signed-off-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
