<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers, branch v3.14.29</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>mmc: sdhci: Fix sleep in atomic after inserting SD card</title>
<updated>2015-01-16T14:59:34+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>k.kozlowski@samsung.com</email>
</author>
<published>2015-01-05T09:50:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=b36cd20d358da24c18a1110b20e23b31b15b1419'/>
<id>b36cd20d358da24c18a1110b20e23b31b15b1419</id>
<content type='text'>
commit 2836766a9d0bd02c66073f8dd44796e6cc23848d upstream.

Sleep in atomic context happened on Trats2 board after inserting or
removing SD card because mmc_gpio_get_cd() was called under spin lock.

Fix this by moving card detection earlier, before acquiring spin lock.
The mmc_gpio_get_cd() call does not have to be protected by spin lock
because it does not access any sdhci internal data.
The sdhci_do_get_cd() call access host flags (SDHCI_DEVICE_DEAD). After
moving it out side of spin lock it could theoretically race with driver
removal but still there is no actual protection against manual card
eject.

Dmesg after inserting SD card:
[   41.663414] BUG: sleeping function called from invalid context at drivers/gpio/gpiolib.c:1511
[   41.670469] in_atomic(): 1, irqs_disabled(): 128, pid: 30, name: kworker/u8:1
[   41.677580] INFO: lockdep is turned off.
[   41.681486] irq event stamp: 61972
[   41.684872] hardirqs last  enabled at (61971): [&lt;c0490ee0&gt;] _raw_spin_unlock_irq+0x24/0x5c
[   41.693118] hardirqs last disabled at (61972): [&lt;c04907ac&gt;] _raw_spin_lock_irq+0x18/0x54
[   41.701190] softirqs last  enabled at (61648): [&lt;c0026fd4&gt;] __do_softirq+0x234/0x2c8
[   41.708914] softirqs last disabled at (61631): [&lt;c00273a0&gt;] irq_exit+0xd0/0x114
[   41.716206] Preemption disabled at:[&lt;  (null)&gt;]   (null)
[   41.721500]
[   41.722985] CPU: 3 PID: 30 Comm: kworker/u8:1 Tainted: G        W      3.18.0-rc5-next-20141121 #883
[   41.732111] Workqueue: kmmcd mmc_rescan
[   41.735945] [&lt;c0014d2c&gt;] (unwind_backtrace) from [&lt;c0011c80&gt;] (show_stack+0x10/0x14)
[   41.743661] [&lt;c0011c80&gt;] (show_stack) from [&lt;c0489d14&gt;] (dump_stack+0x70/0xbc)
[   41.750867] [&lt;c0489d14&gt;] (dump_stack) from [&lt;c0228b74&gt;] (gpiod_get_raw_value_cansleep+0x18/0x30)
[   41.759628] [&lt;c0228b74&gt;] (gpiod_get_raw_value_cansleep) from [&lt;c03646e8&gt;] (mmc_gpio_get_cd+0x38/0x58)
[   41.768821] [&lt;c03646e8&gt;] (mmc_gpio_get_cd) from [&lt;c036d378&gt;] (sdhci_request+0x50/0x1a4)
[   41.776808] [&lt;c036d378&gt;] (sdhci_request) from [&lt;c0357934&gt;] (mmc_start_request+0x138/0x268)
[   41.785051] [&lt;c0357934&gt;] (mmc_start_request) from [&lt;c0357cc8&gt;] (mmc_wait_for_req+0x58/0x1a0)
[   41.793469] [&lt;c0357cc8&gt;] (mmc_wait_for_req) from [&lt;c0357e68&gt;] (mmc_wait_for_cmd+0x58/0x78)
[   41.801714] [&lt;c0357e68&gt;] (mmc_wait_for_cmd) from [&lt;c0361c00&gt;] (mmc_io_rw_direct_host+0x98/0x124)
[   41.810480] [&lt;c0361c00&gt;] (mmc_io_rw_direct_host) from [&lt;c03620f8&gt;] (sdio_reset+0x2c/0x64)
[   41.818641] [&lt;c03620f8&gt;] (sdio_reset) from [&lt;c035a3d8&gt;] (mmc_rescan+0x254/0x2e4)
[   41.826028] [&lt;c035a3d8&gt;] (mmc_rescan) from [&lt;c003a0e0&gt;] (process_one_work+0x180/0x3f4)
[   41.833920] [&lt;c003a0e0&gt;] (process_one_work) from [&lt;c003a3bc&gt;] (worker_thread+0x34/0x4b0)
[   41.841991] [&lt;c003a3bc&gt;] (worker_thread) from [&lt;c003fed8&gt;] (kthread+0xe4/0x104)
[   41.849285] [&lt;c003fed8&gt;] (kthread) from [&lt;c000f268&gt;] (ret_from_fork+0x14/0x2c)
[   42.038276] mmc0: new high speed SDHC card at address 1234

Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Fixes: 94144a465dd0 ("mmc: sdhci: add get_cd() implementation")
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.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>
commit 2836766a9d0bd02c66073f8dd44796e6cc23848d upstream.

Sleep in atomic context happened on Trats2 board after inserting or
removing SD card because mmc_gpio_get_cd() was called under spin lock.

Fix this by moving card detection earlier, before acquiring spin lock.
The mmc_gpio_get_cd() call does not have to be protected by spin lock
because it does not access any sdhci internal data.
The sdhci_do_get_cd() call access host flags (SDHCI_DEVICE_DEAD). After
moving it out side of spin lock it could theoretically race with driver
removal but still there is no actual protection against manual card
eject.

Dmesg after inserting SD card:
[   41.663414] BUG: sleeping function called from invalid context at drivers/gpio/gpiolib.c:1511
[   41.670469] in_atomic(): 1, irqs_disabled(): 128, pid: 30, name: kworker/u8:1
[   41.677580] INFO: lockdep is turned off.
[   41.681486] irq event stamp: 61972
[   41.684872] hardirqs last  enabled at (61971): [&lt;c0490ee0&gt;] _raw_spin_unlock_irq+0x24/0x5c
[   41.693118] hardirqs last disabled at (61972): [&lt;c04907ac&gt;] _raw_spin_lock_irq+0x18/0x54
[   41.701190] softirqs last  enabled at (61648): [&lt;c0026fd4&gt;] __do_softirq+0x234/0x2c8
[   41.708914] softirqs last disabled at (61631): [&lt;c00273a0&gt;] irq_exit+0xd0/0x114
[   41.716206] Preemption disabled at:[&lt;  (null)&gt;]   (null)
[   41.721500]
[   41.722985] CPU: 3 PID: 30 Comm: kworker/u8:1 Tainted: G        W      3.18.0-rc5-next-20141121 #883
[   41.732111] Workqueue: kmmcd mmc_rescan
[   41.735945] [&lt;c0014d2c&gt;] (unwind_backtrace) from [&lt;c0011c80&gt;] (show_stack+0x10/0x14)
[   41.743661] [&lt;c0011c80&gt;] (show_stack) from [&lt;c0489d14&gt;] (dump_stack+0x70/0xbc)
[   41.750867] [&lt;c0489d14&gt;] (dump_stack) from [&lt;c0228b74&gt;] (gpiod_get_raw_value_cansleep+0x18/0x30)
[   41.759628] [&lt;c0228b74&gt;] (gpiod_get_raw_value_cansleep) from [&lt;c03646e8&gt;] (mmc_gpio_get_cd+0x38/0x58)
[   41.768821] [&lt;c03646e8&gt;] (mmc_gpio_get_cd) from [&lt;c036d378&gt;] (sdhci_request+0x50/0x1a4)
[   41.776808] [&lt;c036d378&gt;] (sdhci_request) from [&lt;c0357934&gt;] (mmc_start_request+0x138/0x268)
[   41.785051] [&lt;c0357934&gt;] (mmc_start_request) from [&lt;c0357cc8&gt;] (mmc_wait_for_req+0x58/0x1a0)
[   41.793469] [&lt;c0357cc8&gt;] (mmc_wait_for_req) from [&lt;c0357e68&gt;] (mmc_wait_for_cmd+0x58/0x78)
[   41.801714] [&lt;c0357e68&gt;] (mmc_wait_for_cmd) from [&lt;c0361c00&gt;] (mmc_io_rw_direct_host+0x98/0x124)
[   41.810480] [&lt;c0361c00&gt;] (mmc_io_rw_direct_host) from [&lt;c03620f8&gt;] (sdio_reset+0x2c/0x64)
[   41.818641] [&lt;c03620f8&gt;] (sdio_reset) from [&lt;c035a3d8&gt;] (mmc_rescan+0x254/0x2e4)
[   41.826028] [&lt;c035a3d8&gt;] (mmc_rescan) from [&lt;c003a0e0&gt;] (process_one_work+0x180/0x3f4)
[   41.833920] [&lt;c003a0e0&gt;] (process_one_work) from [&lt;c003a3bc&gt;] (worker_thread+0x34/0x4b0)
[   41.841991] [&lt;c003a3bc&gt;] (worker_thread) from [&lt;c003fed8&gt;] (kthread+0xe4/0x104)
[   41.849285] [&lt;c003fed8&gt;] (kthread) from [&lt;c000f268&gt;] (ret_from_fork+0x14/0x2c)
[   42.038276] mmc0: new high speed SDHC card at address 1234

Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Fixes: 94144a465dd0 ("mmc: sdhci: add get_cd() implementation")
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>spi: fsl: Fix problem with multi message transfers</title>
<updated>2015-01-16T14:59:34+00:00</updated>
<author>
<name>Stefan Roese</name>
<email>sr@denx.de</email>
</author>
<published>2014-01-31T12:44:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=2937d5ac11c421a02f276295f388994027bbe607'/>
<id>2937d5ac11c421a02f276295f388994027bbe607</id>
<content type='text'>
commit 4302a59629f7a0bd70fd1605d2b558597517372a upstream.

When used via spidev with more than one messages to tranfer via
SPI_IOC_MESSAGE the current implementation would return with
-EINVAL, since bits_per_word and speed_hz are set in all
transfer structs. And in the 2nd loop status will stay at
-EINVAL as its not overwritten again via fsl_spi_setup_transfer().

This patch changes this behavious by first checking if one of
the messages uses different settings. If this is the case
the function will return with -EINVAL. If not, the messages
are transferred correctly.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Cc: Esben Haabendal &lt;esbenhaabendal@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>
commit 4302a59629f7a0bd70fd1605d2b558597517372a upstream.

When used via spidev with more than one messages to tranfer via
SPI_IOC_MESSAGE the current implementation would return with
-EINVAL, since bits_per_word and speed_hz are set in all
transfer structs. And in the 2nd loop status will stay at
-EINVAL as its not overwritten again via fsl_spi_setup_transfer().

This patch changes this behavious by first checking if one of
the messages uses different settings. If this is the case
the function will return with -EINVAL. If not, the messages
are transferred correctly.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Signed-off-by: Mark Brown &lt;broonie@linaro.org&gt;
Cc: Esben Haabendal &lt;esbenhaabendal@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI / PM: Fix PM initialization for devices that are not present</title>
<updated>2015-01-16T14:59:34+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2015-01-01T22:38:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=47abb28e7183cea1402564f5cbccd5a863f30432'/>
<id>47abb28e7183cea1402564f5cbccd5a863f30432</id>
<content type='text'>
commit 1b1f3e1699a9886f1070f94171097ab4ccdbfc95 upstream.

If an ACPI device object whose _STA returns 0 (not present and not
functional) has _PR0 or _PS0, its power_manageable flag will be set
and acpi_bus_init_power() will return 0 for it.  Consequently, if
such a device object is passed to the ACPI device PM functions, they
will attempt to carry out the requested operation on the device,
although they should not do that for devices that are not present.

To fix that problem make acpi_bus_init_power() return an error code
for devices that are not present which will cause power_manageable to
be cleared for them as appropriate in acpi_bus_get_power_flags().
However, the lists of power resources should not be freed for the
device in that case, so modify acpi_bus_get_power_flags() to keep
those lists even if acpi_bus_init_power() returns an error.
Accordingly, when deciding whether or not the lists of power
resources need to be freed, acpi_free_power_resources_lists()
should check the power.flags.power_resources flag instead of
flags.power_manageable, so make that change too.

Furthermore, if acpi_bus_attach() sees that flags.initialized is
unset for the given device, it should reset the power management
settings of the device and re-initialize them from scratch instead
of relying on the previous settings (the device may have appeared
after being not present previously, for example), so make it use
the 'valid' flag of the D0 power state as the initial value of
flags.power_manageable for it and call acpi_bus_init_power() to
discover its current power state.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.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 1b1f3e1699a9886f1070f94171097ab4ccdbfc95 upstream.

If an ACPI device object whose _STA returns 0 (not present and not
functional) has _PR0 or _PS0, its power_manageable flag will be set
and acpi_bus_init_power() will return 0 for it.  Consequently, if
such a device object is passed to the ACPI device PM functions, they
will attempt to carry out the requested operation on the device,
although they should not do that for devices that are not present.

To fix that problem make acpi_bus_init_power() return an error code
for devices that are not present which will cause power_manageable to
be cleared for them as appropriate in acpi_bus_get_power_flags().
However, the lists of power resources should not be freed for the
device in that case, so modify acpi_bus_get_power_flags() to keep
those lists even if acpi_bus_init_power() returns an error.
Accordingly, when deciding whether or not the lists of power
resources need to be freed, acpi_free_power_resources_lists()
should check the power.flags.power_resources flag instead of
flags.power_manageable, so make that change too.

Furthermore, if acpi_bus_attach() sees that flags.initialized is
unset for the given device, it should reset the power management
settings of the device and re-initialize them from scratch instead
of relying on the previous settings (the device may have appeared
after being not present previously, for example), so make it use
the 'valid' flag of the D0 power state as the initial value of
flags.power_manageable for it and call acpi_bus_init_power() to
discover its current power state.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: tests: abort torturetest on erase errors</title>
<updated>2015-01-16T14:59:33+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2014-11-21T18:24:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=b9c2571e0db86a7eae3e11bd4b02117a74a3688f'/>
<id>b9c2571e0db86a7eae3e11bd4b02117a74a3688f</id>
<content type='text'>
commit 68f29815034e9dc9ed53cad85946c32b07adc8cc upstream.

The torture test should quit once it actually induces an error in the
flash. This step was accidentally removed during refactoring.

Without this fix, the torturetest just continues infinitely, or until
the maximum cycle count is reached. e.g.:

   ...
   [ 7619.218171] mtd_test: error -5 while erasing EB 100
   [ 7619.297981] mtd_test: error -5 while erasing EB 100
   [ 7619.377953] mtd_test: error -5 while erasing EB 100
   [ 7619.457998] mtd_test: error -5 while erasing EB 100
   [ 7619.537990] mtd_test: error -5 while erasing EB 100
   ...

Fixes: 6cf78358c94f ("mtd: mtd_torturetest: use mtd_test helpers")
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Akinobu Mita &lt;akinobu.mita@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>
commit 68f29815034e9dc9ed53cad85946c32b07adc8cc upstream.

The torture test should quit once it actually induces an error in the
flash. This step was accidentally removed during refactoring.

Without this fix, the torturetest just continues infinitely, or until
the maximum cycle count is reached. e.g.:

   ...
   [ 7619.218171] mtd_test: error -5 while erasing EB 100
   [ 7619.297981] mtd_test: error -5 while erasing EB 100
   [ 7619.377953] mtd_test: error -5 while erasing EB 100
   [ 7619.457998] mtd_test: error -5 while erasing EB 100
   [ 7619.537990] mtd_test: error -5 while erasing EB 100
   ...

Fixes: 6cf78358c94f ("mtd: mtd_torturetest: use mtd_test helpers")
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Drivers: hv: vmbus: Fix a race condition when unregistering a device</title>
<updated>2015-01-16T14:59:32+00:00</updated>
<author>
<name>Vitaly Kuznetsov</name>
<email>vkuznets@redhat.com</email>
</author>
<published>2014-11-04T12:40:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=8a8c38c8e681f36170d6d565c8c50539f7845667'/>
<id>8a8c38c8e681f36170d6d565c8c50539f7845667</id>
<content type='text'>
commit 04a258c162a85c0f4ae56be67634dc43c9a4fa9b upstream.

When build with Debug the following crash is sometimes observed:
Call Trace:
 [&lt;ffffffff812b9600&gt;] string+0x40/0x100
 [&lt;ffffffff812bb038&gt;] vsnprintf+0x218/0x5e0
 [&lt;ffffffff810baf7d&gt;] ? trace_hardirqs_off+0xd/0x10
 [&lt;ffffffff812bb4c1&gt;] vscnprintf+0x11/0x30
 [&lt;ffffffff8107a2f0&gt;] vprintk+0xd0/0x5c0
 [&lt;ffffffffa0051ea0&gt;] ? vmbus_process_rescind_offer+0x0/0x110 [hv_vmbus]
 [&lt;ffffffff8155c71c&gt;] printk+0x41/0x45
 [&lt;ffffffffa004ebac&gt;] vmbus_device_unregister+0x2c/0x40 [hv_vmbus]
 [&lt;ffffffffa0051ecb&gt;] vmbus_process_rescind_offer+0x2b/0x110 [hv_vmbus]
...

This happens due to the following race: between 'if (channel-&gt;device_obj)' check
in vmbus_process_rescind_offer() and pr_debug() in vmbus_device_unregister() the
device can disappear. Fix the issue by taking an additional reference to the
device before proceeding to vmbus_device_unregister().

Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.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 04a258c162a85c0f4ae56be67634dc43c9a4fa9b upstream.

When build with Debug the following crash is sometimes observed:
Call Trace:
 [&lt;ffffffff812b9600&gt;] string+0x40/0x100
 [&lt;ffffffff812bb038&gt;] vsnprintf+0x218/0x5e0
 [&lt;ffffffff810baf7d&gt;] ? trace_hardirqs_off+0xd/0x10
 [&lt;ffffffff812bb4c1&gt;] vscnprintf+0x11/0x30
 [&lt;ffffffff8107a2f0&gt;] vprintk+0xd0/0x5c0
 [&lt;ffffffffa0051ea0&gt;] ? vmbus_process_rescind_offer+0x0/0x110 [hv_vmbus]
 [&lt;ffffffff8155c71c&gt;] printk+0x41/0x45
 [&lt;ffffffffa004ebac&gt;] vmbus_device_unregister+0x2c/0x40 [hv_vmbus]
 [&lt;ffffffffa0051ecb&gt;] vmbus_process_rescind_offer+0x2b/0x110 [hv_vmbus]
...

This happens due to the following race: between 'if (channel-&gt;device_obj)' check
in vmbus_process_rescind_offer() and pr_debug() in vmbus_device_unregister() the
device can disappear. Fix the issue by taking an additional reference to the
device before proceeding to vmbus_device_unregister().

Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>n_tty: Fix read_buf race condition, increment read_head after pushing data</title>
<updated>2015-01-16T14:59:32+00:00</updated>
<author>
<name>Christian Riesch</name>
<email>christian.riesch@omicron.at</email>
</author>
<published>2014-11-13T04:53:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=7810e6d8f1390a96e634e66072064c69a6f7d08d'/>
<id>7810e6d8f1390a96e634e66072064c69a6f7d08d</id>
<content type='text'>
commit 8bfbe2de769afda051c56aba5450391670e769fc upstream.

Commit 19e2ad6a09f0c06dbca19c98e5f4584269d913dd ("n_tty: Remove overflow
tests from receive_buf() path") moved the increment of read_head into
the arguments list of read_buf_addr(). Function calls represent a
sequence point in C. Therefore read_head is incremented before the
character c is placed in the buffer. Since the circular read buffer is
a lock-less design since commit 6d76bd2618535c581f1673047b8341fd291abc67
("n_tty: Make N_TTY ldisc receive path lockless"), this creates a race
condition that leads to communication errors.

This patch modifies the code to increment read_head _after_ the data
is placed in the buffer and thus fixes the race for non-SMP machines.
To fix the problem for SMP machines, memory barriers must be added in
a separate patch.

Signed-off-by: Christian Riesch &lt;christian.riesch@omicron.at&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 8bfbe2de769afda051c56aba5450391670e769fc upstream.

Commit 19e2ad6a09f0c06dbca19c98e5f4584269d913dd ("n_tty: Remove overflow
tests from receive_buf() path") moved the increment of read_head into
the arguments list of read_buf_addr(). Function calls represent a
sequence point in C. Therefore read_head is incremented before the
character c is placed in the buffer. Since the circular read buffer is
a lock-less design since commit 6d76bd2618535c581f1673047b8341fd291abc67
("n_tty: Make N_TTY ldisc receive path lockless"), this creates a race
condition that leads to communication errors.

This patch modifies the code to increment read_head _after_ the data
is placed in the buffer and thus fixes the race for non-SMP machines.
To fix the problem for SMP machines, memory barriers must be added in
a separate patch.

Signed-off-by: Christian Riesch &lt;christian.riesch@omicron.at&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>serial: samsung: wait for transfer completion before clock disable</title>
<updated>2015-01-16T14:59:32+00:00</updated>
<author>
<name>Robert Baldyga</name>
<email>r.baldyga@samsung.com</email>
</author>
<published>2014-11-24T06:56:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=24003a22ef28a69dd07fa5277ce7ef0c944e8a0e'/>
<id>24003a22ef28a69dd07fa5277ce7ef0c944e8a0e</id>
<content type='text'>
commit 1ff383a4c3eda8893ec61b02831826e1b1f46b41 upstream.

This patch adds waiting until transmit buffer and shifter will be empty
before clock disabling.

Without this fix it's possible to have clock disabled while data was
not transmited yet, which causes unproper state of TX line and problems
in following data transfers.

Signed-off-by: Robert Baldyga &lt;r.baldyga@samsung.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 1ff383a4c3eda8893ec61b02831826e1b1f46b41 upstream.

This patch adds waiting until transmit buffer and shifter will be empty
before clock disabling.

Without this fix it's possible to have clock disabled while data was
not transmited yet, which causes unproper state of TX line and problems
in following data transfers.

Signed-off-by: Robert Baldyga &lt;r.baldyga@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>cdc-acm: memory leak in error case</title>
<updated>2015-01-16T14:59:32+00:00</updated>
<author>
<name>Oliver Neukum</name>
<email>oneukum@suse.de</email>
</author>
<published>2014-11-20T13:54:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=7756c314710ceee0336824b3812261c1ae49106f'/>
<id>7756c314710ceee0336824b3812261c1ae49106f</id>
<content type='text'>
commit d908f8478a8d18e66c80a12adb27764920c1f1ca upstream.

If probe() fails not only the attributes need to be removed
but also the memory freed.

Reported-by: Ahmed Tamrawi &lt;ahmedtamrawi@gmail.com&gt;
Signed-off-by: Oliver Neukum &lt;oneukum@suse.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>
commit d908f8478a8d18e66c80a12adb27764920c1f1ca upstream.

If probe() fails not only the attributes need to be removed
but also the memory freed.

Reported-by: Ahmed Tamrawi &lt;ahmedtamrawi@gmail.com&gt;
Signed-off-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>USB: cdc-acm: check for valid interfaces</title>
<updated>2015-01-16T14:59:32+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2014-11-07T16:48:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=77e2e4877b2000379a5e525d51e79e6705ce242d'/>
<id>77e2e4877b2000379a5e525d51e79e6705ce242d</id>
<content type='text'>
commit 403dff4e2c94f275e24fd85f40b2732ffec268a1 upstream.

We need to check that we have both a valid data and control inteface for both
types of headers (union and not union.)

References: https://bugzilla.kernel.org/show_bug.cgi?id=83551
Reported-by: Simon Schubert &lt;2+kernel@0x2c.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>
commit 403dff4e2c94f275e24fd85f40b2732ffec268a1 upstream.

We need to check that we have both a valid data and control inteface for both
types of headers (union and not union.)

References: https://bugzilla.kernel.org/show_bug.cgi?id=83551
Reported-by: Simon Schubert &lt;2+kernel@0x2c.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>misc: genwqe: check for error from get_user_pages_fast()</title>
<updated>2015-01-16T14:59:31+00:00</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2014-11-06T16:23:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=7de4a0e7fe4390dfc3b42c1fdcd53104758cc33c'/>
<id>7de4a0e7fe4390dfc3b42c1fdcd53104758cc33c</id>
<content type='text'>
commit cf35d6e0475982667b0d2d318fb27be4b8849827 upstream.

`genwqe_user_vmap()` calls `get_user_pages_fast()` and if the return
value is less than the number of pages requested, it frees the pages and
returns an error (`-EFAULT`).  However, it fails to consider a negative
error return value from `get_user_pages_fast()`.  In that case, the test
`if (rc &lt; m-&gt;nr_pages)` will be false (due to promotion of `rc` to a
large `unsigned int`) and the code will continue on to call
`genwqe_map_pages()` with an invalid list of page pointers.  Fix it by
bailing out if `get_user_pages_fast()` returns a negative error value.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&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 cf35d6e0475982667b0d2d318fb27be4b8849827 upstream.

`genwqe_user_vmap()` calls `get_user_pages_fast()` and if the return
value is less than the number of pages requested, it frees the pages and
returns an error (`-EFAULT`).  However, it fails to consider a negative
error return value from `get_user_pages_fast()`.  In that case, the test
`if (rc &lt; m-&gt;nr_pages)` will be false (due to promotion of `rc` to a
large `unsigned int`) and the code will continue on to call
`genwqe_map_pages()` with an invalid list of page pointers.  Fix it by
bailing out if `get_user_pages_fast()` returns a negative error value.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
</feed>
