<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/net, branch v3.12.35</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>rt2x00: do not align payload on modern H/W</title>
<updated>2014-12-06T14:18:25+00:00</updated>
<author>
<name>Stanislaw Gruszka</name>
<email>sgruszka@redhat.com</email>
</author>
<published>2014-11-11T13:28:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8c3b78ffdeff62372503e92c606a262be51fb19a'/>
<id>8c3b78ffdeff62372503e92c606a262be51fb19a</id>
<content type='text'>
commit cfd9167af14eb4ec21517a32911d460083ee3d59 upstream.

RT2800 and newer hardware require padding between header and payload if
header length is not multiple of 4.

For historical reasons we also align payload to to 4 bytes boundary, but
such alignment is not needed on modern H/W.

Patch fixes skb_under_panic problems reported from time to time:

https://bugzilla.kernel.org/show_bug.cgi?id=84911
https://bugzilla.kernel.org/show_bug.cgi?id=72471
http://marc.info/?l=linux-wireless&amp;m=139108549530402&amp;w=2
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1087591

Panic happened because we eat 4 bytes of skb headroom on each
(re)transmission when sending frame without the payload and the header
length not being multiple of 4 (i.e. QoS header has 26 bytes). On such
case because paylad_aling=2 is bigger than header_align=0 we increase
header_align by 4 bytes. To prevent that we could change the check to:

	if (payload_length &amp;&amp; payload_align &gt; header_align)
		header_align += 4;

but not aligning payload at all is more effective and alignment is not
really needed by H/W (that has been tested on OpenWrt project for few
years now).

Reported-and-tested-by: Antti S. Lankila &lt;alankila@bel.fi&gt;
Debugged-by: Antti S. Lankila &lt;alankila@bel.fi&gt;
Reported-by: Henrik Asp &lt;solenskiner@gmail.com&gt;
Originally-From: Helmut Schaa &lt;helmut.schaa@googlemail.com&gt;
Signed-off-by: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit cfd9167af14eb4ec21517a32911d460083ee3d59 upstream.

RT2800 and newer hardware require padding between header and payload if
header length is not multiple of 4.

For historical reasons we also align payload to to 4 bytes boundary, but
such alignment is not needed on modern H/W.

Patch fixes skb_under_panic problems reported from time to time:

https://bugzilla.kernel.org/show_bug.cgi?id=84911
https://bugzilla.kernel.org/show_bug.cgi?id=72471
http://marc.info/?l=linux-wireless&amp;m=139108549530402&amp;w=2
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1087591

Panic happened because we eat 4 bytes of skb headroom on each
(re)transmission when sending frame without the payload and the header
length not being multiple of 4 (i.e. QoS header has 26 bytes). On such
case because paylad_aling=2 is bigger than header_align=0 we increase
header_align by 4 bytes. To prevent that we could change the check to:

	if (payload_length &amp;&amp; payload_align &gt; header_align)
		header_align += 4;

but not aligning payload at all is more effective and alignment is not
really needed by H/W (that has been tested on OpenWrt project for few
years now).

Reported-and-tested-by: Antti S. Lankila &lt;alankila@bel.fi&gt;
Debugged-by: Antti S. Lankila &lt;alankila@bel.fi&gt;
Reported-by: Henrik Asp &lt;solenskiner@gmail.com&gt;
Originally-From: Helmut Schaa &lt;helmut.schaa@googlemail.com&gt;
Signed-off-by: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>can: dev: avoid calling kfree_skb() from interrupt context</title>
<updated>2014-12-06T14:18:24+00:00</updated>
<author>
<name>Thomas Körper</name>
<email>thomas.koerper@esd.eu</email>
</author>
<published>2014-10-31T06:33:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=20542e3efc5012451f8e05c17bea46119763fddf'/>
<id>20542e3efc5012451f8e05c17bea46119763fddf</id>
<content type='text'>
commit 5247a589c24022ab34e780039cc8000c48f2035e upstream.

ikfree_skb() is Called in can_free_echo_skb(), which might be called from (TX
Error) interrupt, which triggers the folloing warning:

[ 1153.360705] ------------[ cut here ]------------
[ 1153.360715] WARNING: CPU: 0 PID: 31 at net/core/skbuff.c:563 skb_release_head_state+0xb9/0xd0()
[ 1153.360772] Call Trace:
[ 1153.360778]  [&lt;c167906f&gt;] dump_stack+0x41/0x52
[ 1153.360782]  [&lt;c105bb7e&gt;] warn_slowpath_common+0x7e/0xa0
[ 1153.360784]  [&lt;c158b909&gt;] ? skb_release_head_state+0xb9/0xd0
[ 1153.360786]  [&lt;c158b909&gt;] ? skb_release_head_state+0xb9/0xd0
[ 1153.360788]  [&lt;c105bc42&gt;] warn_slowpath_null+0x22/0x30
[ 1153.360791]  [&lt;c158b909&gt;] skb_release_head_state+0xb9/0xd0
[ 1153.360793]  [&lt;c158be90&gt;] skb_release_all+0x10/0x30
[ 1153.360795]  [&lt;c158bf06&gt;] kfree_skb+0x36/0x80
[ 1153.360799]  [&lt;f8486938&gt;] ? can_free_echo_skb+0x28/0x40 [can_dev]
[ 1153.360802]  [&lt;f8486938&gt;] can_free_echo_skb+0x28/0x40 [can_dev]
[ 1153.360805]  [&lt;f849a12c&gt;] esd_pci402_interrupt+0x34c/0x57a [esd402]
[ 1153.360809]  [&lt;c10a75b5&gt;] handle_irq_event_percpu+0x35/0x180
[ 1153.360811]  [&lt;c10a7623&gt;] ? handle_irq_event_percpu+0xa3/0x180
[ 1153.360813]  [&lt;c10a7731&gt;] handle_irq_event+0x31/0x50
[ 1153.360816]  [&lt;c10a9c7f&gt;] handle_fasteoi_irq+0x6f/0x120
[ 1153.360818]  [&lt;c10a9c10&gt;] ? handle_edge_irq+0x110/0x110
[ 1153.360822]  [&lt;c1011b61&gt;] handle_irq+0x71/0x90
[ 1153.360823]  &lt;IRQ&gt;  [&lt;c168152c&gt;] do_IRQ+0x3c/0xd0
[ 1153.360829]  [&lt;c1680b6c&gt;] common_interrupt+0x2c/0x34
[ 1153.360834]  [&lt;c107d277&gt;] ? finish_task_switch+0x47/0xf0
[ 1153.360836]  [&lt;c167c27b&gt;] __schedule+0x35b/0x7e0
[ 1153.360839]  [&lt;c10a5334&gt;] ? console_unlock+0x2c4/0x4d0
[ 1153.360842]  [&lt;c13df500&gt;] ? n_tty_receive_buf_common+0x890/0x890
[ 1153.360845]  [&lt;c10707b6&gt;] ? process_one_work+0x196/0x370
[ 1153.360847]  [&lt;c167c723&gt;] schedule+0x23/0x60
[ 1153.360849]  [&lt;c1070de1&gt;] worker_thread+0x161/0x460
[ 1153.360852]  [&lt;c1090fcf&gt;] ? __wake_up_locked+0x1f/0x30
[ 1153.360854]  [&lt;c1070c80&gt;] ? rescuer_thread+0x2f0/0x2f0
[ 1153.360856]  [&lt;c1074f01&gt;] kthread+0xa1/0xc0
[ 1153.360859]  [&lt;c1680401&gt;] ret_from_kernel_thread+0x21/0x30
[ 1153.360861]  [&lt;c1074e60&gt;] ? kthread_create_on_node+0x110/0x110
[ 1153.360863] ---[ end trace 5ff83639cbb74b35 ]---

This patch replaces the kfree_skb() by dev_kfree_skb_any().

Signed-off-by: Thomas Körper &lt;thomas.koerper@esd.eu&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 5247a589c24022ab34e780039cc8000c48f2035e upstream.

ikfree_skb() is Called in can_free_echo_skb(), which might be called from (TX
Error) interrupt, which triggers the folloing warning:

[ 1153.360705] ------------[ cut here ]------------
[ 1153.360715] WARNING: CPU: 0 PID: 31 at net/core/skbuff.c:563 skb_release_head_state+0xb9/0xd0()
[ 1153.360772] Call Trace:
[ 1153.360778]  [&lt;c167906f&gt;] dump_stack+0x41/0x52
[ 1153.360782]  [&lt;c105bb7e&gt;] warn_slowpath_common+0x7e/0xa0
[ 1153.360784]  [&lt;c158b909&gt;] ? skb_release_head_state+0xb9/0xd0
[ 1153.360786]  [&lt;c158b909&gt;] ? skb_release_head_state+0xb9/0xd0
[ 1153.360788]  [&lt;c105bc42&gt;] warn_slowpath_null+0x22/0x30
[ 1153.360791]  [&lt;c158b909&gt;] skb_release_head_state+0xb9/0xd0
[ 1153.360793]  [&lt;c158be90&gt;] skb_release_all+0x10/0x30
[ 1153.360795]  [&lt;c158bf06&gt;] kfree_skb+0x36/0x80
[ 1153.360799]  [&lt;f8486938&gt;] ? can_free_echo_skb+0x28/0x40 [can_dev]
[ 1153.360802]  [&lt;f8486938&gt;] can_free_echo_skb+0x28/0x40 [can_dev]
[ 1153.360805]  [&lt;f849a12c&gt;] esd_pci402_interrupt+0x34c/0x57a [esd402]
[ 1153.360809]  [&lt;c10a75b5&gt;] handle_irq_event_percpu+0x35/0x180
[ 1153.360811]  [&lt;c10a7623&gt;] ? handle_irq_event_percpu+0xa3/0x180
[ 1153.360813]  [&lt;c10a7731&gt;] handle_irq_event+0x31/0x50
[ 1153.360816]  [&lt;c10a9c7f&gt;] handle_fasteoi_irq+0x6f/0x120
[ 1153.360818]  [&lt;c10a9c10&gt;] ? handle_edge_irq+0x110/0x110
[ 1153.360822]  [&lt;c1011b61&gt;] handle_irq+0x71/0x90
[ 1153.360823]  &lt;IRQ&gt;  [&lt;c168152c&gt;] do_IRQ+0x3c/0xd0
[ 1153.360829]  [&lt;c1680b6c&gt;] common_interrupt+0x2c/0x34
[ 1153.360834]  [&lt;c107d277&gt;] ? finish_task_switch+0x47/0xf0
[ 1153.360836]  [&lt;c167c27b&gt;] __schedule+0x35b/0x7e0
[ 1153.360839]  [&lt;c10a5334&gt;] ? console_unlock+0x2c4/0x4d0
[ 1153.360842]  [&lt;c13df500&gt;] ? n_tty_receive_buf_common+0x890/0x890
[ 1153.360845]  [&lt;c10707b6&gt;] ? process_one_work+0x196/0x370
[ 1153.360847]  [&lt;c167c723&gt;] schedule+0x23/0x60
[ 1153.360849]  [&lt;c1070de1&gt;] worker_thread+0x161/0x460
[ 1153.360852]  [&lt;c1090fcf&gt;] ? __wake_up_locked+0x1f/0x30
[ 1153.360854]  [&lt;c1070c80&gt;] ? rescuer_thread+0x2f0/0x2f0
[ 1153.360856]  [&lt;c1074f01&gt;] kthread+0xa1/0xc0
[ 1153.360859]  [&lt;c1680401&gt;] ret_from_kernel_thread+0x21/0x30
[ 1153.360861]  [&lt;c1074e60&gt;] ? kthread_create_on_node+0x110/0x110
[ 1153.360863] ---[ end trace 5ff83639cbb74b35 ]---

This patch replaces the kfree_skb() by dev_kfree_skb_any().

Signed-off-by: Thomas Körper &lt;thomas.koerper@esd.eu&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>can: esd_usb2: fix memory leak on disconnect</title>
<updated>2014-12-06T14:18:18+00:00</updated>
<author>
<name>Alexey Khoroshilov</name>
<email>khoroshilov@ispras.ru</email>
</author>
<published>2014-10-10T20:31:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=000245b631cbc9dde4bebb0f378ec8cac5d60c07'/>
<id>000245b631cbc9dde4bebb0f378ec8cac5d60c07</id>
<content type='text'>
commit efbd50d2f62fc1f69a3dcd153e63ba28cc8eb27f upstream.

It seems struct esd_usb2 dev is not deallocated on disconnect. The patch adds
the missing deallocation.

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

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Acked-by: Matthias Fuchs &lt;matthias.fuchs@esd.eu&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit efbd50d2f62fc1f69a3dcd153e63ba28cc8eb27f upstream.

It seems struct esd_usb2 dev is not deallocated on disconnect. The patch adds
the missing deallocation.

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

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Acked-by: Matthias Fuchs &lt;matthias.fuchs@esd.eu&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ath9k: Fix RTC_DERIVED_CLK usage</title>
<updated>2014-12-06T14:17:45+00:00</updated>
<author>
<name>Miaoqing Pan</name>
<email>miaoqing@qca.qualcomm.com</email>
</author>
<published>2014-11-06T05:22:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1043c385dd176fc1061781f9a9896cff540f6ea7'/>
<id>1043c385dd176fc1061781f9a9896cff540f6ea7</id>
<content type='text'>
commit 4e6ce4dc7ce71d0886908d55129d5d6482a27ff9 upstream.

Based on the reference clock, which could be 25MHz or 40MHz,
AR_RTC_DERIVED_CLK is programmed differently for AR9340 and AR9550.
But, when a chip reset is done, processing the initvals
sets the register back to the default value.

Fix this by moving the code in ath9k_hw_init_pll() to
ar9003_hw_override_ini(). Also, do this override for AR9531.

js: remove AR_SREV_9531 test as 9531 support is not in 3.12 yet

Signed-off-by: Miaoqing Pan &lt;miaoqing@qca.qualcomm.com&gt;
Signed-off-by: Sujith Manoharan &lt;c_manoha@qca.qualcomm.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 4e6ce4dc7ce71d0886908d55129d5d6482a27ff9 upstream.

Based on the reference clock, which could be 25MHz or 40MHz,
AR_RTC_DERIVED_CLK is programmed differently for AR9340 and AR9550.
But, when a chip reset is done, processing the initvals
sets the register back to the default value.

Fix this by moving the code in ath9k_hw_init_pll() to
ar9003_hw_override_ini(). Also, do this override for AR9531.

js: remove AR_SREV_9531 test as 9531 support is not in 3.12 yet

Signed-off-by: Miaoqing Pan &lt;miaoqing@qca.qualcomm.com&gt;
Signed-off-by: Sujith Manoharan &lt;c_manoha@qca.qualcomm.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pptp: fix stack info leak in pptp_getname()</title>
<updated>2014-11-27T10:14:06+00:00</updated>
<author>
<name>Mathias Krause</name>
<email>minipli@googlemail.com</email>
</author>
<published>2014-11-19T17:05:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=416b05bc9db9b9cd48418391538478a438e762b3'/>
<id>416b05bc9db9b9cd48418391538478a438e762b3</id>
<content type='text'>
[ Upstream commit a5f6fc28d6e6cc379c6839f21820e62262419584 ]

pptp_getname() only partially initializes the stack variable sa,
particularly only fills the pptp part of the sa_addr union. The code
thereby discloses 16 bytes of kernel stack memory via getsockname().

Fix this by memset(0)'ing the union before.

Cc: Dmitry Kozlov &lt;xeb@mail.ru&gt;
Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit a5f6fc28d6e6cc379c6839f21820e62262419584 ]

pptp_getname() only partially initializes the stack variable sa,
particularly only fills the pptp part of the sa_addr union. The code
thereby discloses 16 bytes of kernel stack memory via getsockname().

Fix this by memset(0)'ing the union before.

Cc: Dmitry Kozlov &lt;xeb@mail.ru&gt;
Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qmi_wwan: Add support for HP lt4112 LTE/HSPA+ Gobi 4G Modem</title>
<updated>2014-11-27T10:14:06+00:00</updated>
<author>
<name>Martin Hauke</name>
<email>mardnh@gmx.de</email>
</author>
<published>2014-11-16T18:55:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6d986f090a2f895a0d3a3f42122402aa3d3427b7'/>
<id>6d986f090a2f895a0d3a3f42122402aa3d3427b7</id>
<content type='text'>
[ Upstream commit bb2bdeb83fb125c95e47fc7eca2a3e8f868e2a74 ]

Added the USB VID/PID for the HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e)

Signed-off-by: Martin Hauke &lt;mardnh@gmx.de&gt;
Acked-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit bb2bdeb83fb125c95e47fc7eca2a3e8f868e2a74 ]

Added the USB VID/PID for the HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e)

Signed-off-by: Martin Hauke &lt;mardnh@gmx.de&gt;
Acked-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ieee802154: fix error handling in ieee802154fake_probe()</title>
<updated>2014-11-27T10:14:06+00:00</updated>
<author>
<name>Alexey Khoroshilov</name>
<email>khoroshilov@ispras.ru</email>
</author>
<published>2014-11-14T23:11:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0d55bc1cf51599a78ae3bb5182fa2eda1e9c0c7c'/>
<id>0d55bc1cf51599a78ae3bb5182fa2eda1e9c0c7c</id>
<content type='text'>
[ Upstream commit 8c2dd54485ccee7fc4086611e188478584758c8d ]

In case of any failure ieee802154fake_probe() just calls unregister_netdev().
But it does not look safe to unregister netdevice before it was registered.

The patch implements straightforward resource deallocation in case of
failure in ieee802154fake_probe().

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

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 8c2dd54485ccee7fc4086611e188478584758c8d ]

In case of any failure ieee802154fake_probe() just calls unregister_netdev().
But it does not look safe to unregister netdevice before it was registered.

The patch implements straightforward resource deallocation in case of
failure in ieee802154fake_probe().

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

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211_hwsim: release driver when ieee80211_register_hw fails</title>
<updated>2014-11-19T17:38:17+00:00</updated>
<author>
<name>Junjie Mao</name>
<email>eternal.n08@gmail.com</email>
</author>
<published>2014-10-28T01:31:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4d2ff0c7516b4e636e59a0d1e036dc33750c1f89'/>
<id>4d2ff0c7516b4e636e59a0d1e036dc33750c1f89</id>
<content type='text'>
commit 805dbe17d1c832ad341f14fae8cedf41b67ca6fa upstream.

The driver is not released when ieee80211_register_hw fails in
mac80211_hwsim_create_radio, leading to the access to the unregistered (and
possibly freed) device in platform_driver_unregister:

[    0.447547] mac80211_hwsim: ieee80211_register_hw failed (-2)
[    0.448292] ------------[ cut here ]------------
[    0.448854] WARNING: CPU: 0 PID: 1 at ../include/linux/kref.h:47 kobject_get+0x33/0x50()
[    0.449839] CPU: 0 PID: 1 Comm: swapper Not tainted 3.17.0-00001-gdd46990-dirty #2
[    0.450813] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[    0.451512]  00000000 00000000 78025e38 7967c6c6 78025e68 7905e09b 7988b480 00000000
[    0.452579]  00000001 79887d62 0000002f 79170bb3 79170bb3 78397008 79ac9d74 00000001
[    0.453614]  78025e78 7905e15d 00000009 00000000 78025e84 79170bb3 78397000 78025e8c
[    0.454632] Call Trace:
[    0.454921]  [&lt;7967c6c6&gt;] dump_stack+0x16/0x18
[    0.455453]  [&lt;7905e09b&gt;] warn_slowpath_common+0x6b/0x90
[    0.456067]  [&lt;79170bb3&gt;] ? kobject_get+0x33/0x50
[    0.456612]  [&lt;79170bb3&gt;] ? kobject_get+0x33/0x50
[    0.457155]  [&lt;7905e15d&gt;] warn_slowpath_null+0x1d/0x20
[    0.457748]  [&lt;79170bb3&gt;] kobject_get+0x33/0x50
[    0.458274]  [&lt;7925824f&gt;] get_device+0xf/0x20
[    0.458779]  [&lt;7925b5cd&gt;] driver_detach+0x3d/0xa0
[    0.459331]  [&lt;7925a3ff&gt;] bus_remove_driver+0x8f/0xb0
[    0.459927]  [&lt;7925bf80&gt;] ? class_unregister+0x40/0x80
[    0.460660]  [&lt;7925bad7&gt;] driver_unregister+0x47/0x50
[    0.461248]  [&lt;7925c033&gt;] ? class_destroy+0x13/0x20
[    0.461824]  [&lt;7925d07b&gt;] platform_driver_unregister+0xb/0x10
[    0.462507]  [&lt;79b51ba0&gt;] init_mac80211_hwsim+0x3e8/0x3f9
[    0.463161]  [&lt;79b30c58&gt;] do_one_initcall+0x106/0x1a9
[    0.463758]  [&lt;79b517b8&gt;] ? if_spi_init_module+0xac/0xac
[    0.464393]  [&lt;79b517b8&gt;] ? if_spi_init_module+0xac/0xac
[    0.465001]  [&lt;79071935&gt;] ? parse_args+0x2f5/0x480
[    0.465569]  [&lt;7906b41e&gt;] ? __usermodehelper_set_disable_depth+0x3e/0x50
[    0.466345]  [&lt;79b30dd9&gt;] kernel_init_freeable+0xde/0x17d
[    0.466972]  [&lt;79b304d6&gt;] ? do_early_param+0x7a/0x7a
[    0.467546]  [&lt;79677b1b&gt;] kernel_init+0xb/0xe0
[    0.468072]  [&lt;79075f42&gt;] ? schedule_tail+0x12/0x40
[    0.468658]  [&lt;79686580&gt;] ret_from_kernel_thread+0x20/0x30
[    0.469303]  [&lt;79677b10&gt;] ? rest_init+0xc0/0xc0
[    0.469829] ---[ end trace ad8ac403ff8aef5c ]---
[    0.470509] ------------[ cut here ]------------
[    0.471047] WARNING: CPU: 0 PID: 1 at ../kernel/locking/lockdep.c:3161 __lock_acquire.isra.22+0x7aa/0xb00()
[    0.472163] DEBUG_LOCKS_WARN_ON(id &gt;= MAX_LOCKDEP_KEYS)
[    0.472774] CPU: 0 PID: 1 Comm: swapper Tainted: G        W      3.17.0-00001-gdd46990-dirty #2
[    0.473815] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[    0.474492]  78025de0 78025de0 78025da0 7967c6c6 78025dd0 7905e09b 79888931 78025dfc
[    0.475515]  00000001 79888a93 00000c59 7907f33a 7907f33a 78028000 fffe9d09 00000000
[    0.476519]  78025de8 7905e10e 00000009 78025de0 79888931 78025dfc 78025e24 7907f33a
[    0.477523] Call Trace:
[    0.477821]  [&lt;7967c6c6&gt;] dump_stack+0x16/0x18
[    0.478352]  [&lt;7905e09b&gt;] warn_slowpath_common+0x6b/0x90
[    0.478976]  [&lt;7907f33a&gt;] ? __lock_acquire.isra.22+0x7aa/0xb00
[    0.479658]  [&lt;7907f33a&gt;] ? __lock_acquire.isra.22+0x7aa/0xb00
[    0.480417]  [&lt;7905e10e&gt;] warn_slowpath_fmt+0x2e/0x30
[    0.480479]  [&lt;7907f33a&gt;] __lock_acquire.isra.22+0x7aa/0xb00
[    0.480479]  [&lt;79078aa5&gt;] ? sched_clock_cpu+0xb5/0xf0
[    0.480479]  [&lt;7907fd06&gt;] lock_acquire+0x56/0x70
[    0.480479]  [&lt;7925b5e8&gt;] ? driver_detach+0x58/0xa0
[    0.480479]  [&lt;79682d11&gt;] mutex_lock_nested+0x61/0x2a0
[    0.480479]  [&lt;7925b5e8&gt;] ? driver_detach+0x58/0xa0
[    0.480479]  [&lt;7925b5e8&gt;] ? driver_detach+0x58/0xa0
[    0.480479]  [&lt;7925b5e8&gt;] driver_detach+0x58/0xa0
[    0.480479]  [&lt;7925a3ff&gt;] bus_remove_driver+0x8f/0xb0
[    0.480479]  [&lt;7925bf80&gt;] ? class_unregister+0x40/0x80
[    0.480479]  [&lt;7925bad7&gt;] driver_unregister+0x47/0x50
[    0.480479]  [&lt;7925c033&gt;] ? class_destroy+0x13/0x20
[    0.480479]  [&lt;7925d07b&gt;] platform_driver_unregister+0xb/0x10
[    0.480479]  [&lt;79b51ba0&gt;] init_mac80211_hwsim+0x3e8/0x3f9
[    0.480479]  [&lt;79b30c58&gt;] do_one_initcall+0x106/0x1a9
[    0.480479]  [&lt;79b517b8&gt;] ? if_spi_init_module+0xac/0xac
[    0.480479]  [&lt;79b517b8&gt;] ? if_spi_init_module+0xac/0xac
[    0.480479]  [&lt;79071935&gt;] ? parse_args+0x2f5/0x480
[    0.480479]  [&lt;7906b41e&gt;] ? __usermodehelper_set_disable_depth+0x3e/0x50
[    0.480479]  [&lt;79b30dd9&gt;] kernel_init_freeable+0xde/0x17d
[    0.480479]  [&lt;79b304d6&gt;] ? do_early_param+0x7a/0x7a
[    0.480479]  [&lt;79677b1b&gt;] kernel_init+0xb/0xe0
[    0.480479]  [&lt;79075f42&gt;] ? schedule_tail+0x12/0x40
[    0.480479]  [&lt;79686580&gt;] ret_from_kernel_thread+0x20/0x30
[    0.480479]  [&lt;79677b10&gt;] ? rest_init+0xc0/0xc0
[    0.480479] ---[ end trace ad8ac403ff8aef5d ]---
[    0.495478] BUG: unable to handle kernel paging request at 00200200
[    0.496257] IP: [&lt;79682de5&gt;] mutex_lock_nested+0x135/0x2a0
[    0.496923] *pde = 00000000
[    0.497290] Oops: 0002 [#1]
[    0.497653] CPU: 0 PID: 1 Comm: swapper Tainted: G        W      3.17.0-00001-gdd46990-dirty #2
[    0.498659] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[    0.499321] task: 78028000 ti: 78024000 task.ti: 78024000
[    0.499955] EIP: 0060:[&lt;79682de5&gt;] EFLAGS: 00010097 CPU: 0
[    0.500620] EIP is at mutex_lock_nested+0x135/0x2a0
[    0.501145] EAX: 00200200 EBX: 78397434 ECX: 78397460 EDX: 78025e70
[    0.501816] ESI: 00000246 EDI: 78028000 EBP: 78025e8c ESP: 78025e54
[    0.502497]  DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
[    0.503076] CR0: 8005003b CR2: 00200200 CR3: 01b9d000 CR4: 00000690
[    0.503773] Stack:
[    0.503998]  00000000 00000001 00000000 7925b5e8 78397460 7925b5e8 78397474 78397460
[    0.504944]  00200200 11111111 78025e70 78397000 79ac9d74 00000001 78025ea0 7925b5e8
[    0.505451]  79ac9d74 fffffffe 00000001 78025ebc 7925a3ff 7a251398 78025ec8 7925bf80
[    0.505451] Call Trace:
[    0.505451]  [&lt;7925b5e8&gt;] ? driver_detach+0x58/0xa0
[    0.505451]  [&lt;7925b5e8&gt;] ? driver_detach+0x58/0xa0
[    0.505451]  [&lt;7925b5e8&gt;] driver_detach+0x58/0xa0
[    0.505451]  [&lt;7925a3ff&gt;] bus_remove_driver+0x8f/0xb0
[    0.505451]  [&lt;7925bf80&gt;] ? class_unregister+0x40/0x80
[    0.505451]  [&lt;7925bad7&gt;] driver_unregister+0x47/0x50
[    0.505451]  [&lt;7925c033&gt;] ? class_destroy+0x13/0x20
[    0.505451]  [&lt;7925d07b&gt;] platform_driver_unregister+0xb/0x10
[    0.505451]  [&lt;79b51ba0&gt;] init_mac80211_hwsim+0x3e8/0x3f9
[    0.505451]  [&lt;79b30c58&gt;] do_one_initcall+0x106/0x1a9
[    0.505451]  [&lt;79b517b8&gt;] ? if_spi_init_module+0xac/0xac
[    0.505451]  [&lt;79b517b8&gt;] ? if_spi_init_module+0xac/0xac
[    0.505451]  [&lt;79071935&gt;] ? parse_args+0x2f5/0x480
[    0.505451]  [&lt;7906b41e&gt;] ? __usermodehelper_set_disable_depth+0x3e/0x50
[    0.505451]  [&lt;79b30dd9&gt;] kernel_init_freeable+0xde/0x17d
[    0.505451]  [&lt;79b304d6&gt;] ? do_early_param+0x7a/0x7a
[    0.505451]  [&lt;79677b1b&gt;] kernel_init+0xb/0xe0
[    0.505451]  [&lt;79075f42&gt;] ? schedule_tail+0x12/0x40
[    0.505451]  [&lt;79686580&gt;] ret_from_kernel_thread+0x20/0x30
[    0.505451]  [&lt;79677b10&gt;] ? rest_init+0xc0/0xc0
[    0.505451] Code: 89 d8 e8 cf 9b 9f ff 8b 4f 04 8d 55 e4 89 d8 e8 72 9d 9f ff 8d 43 2c 89 c1 89 45 d8 8b 43 30 8d 55 e4 89 53 30 89 4d e4 89 45 e8 &lt;89&gt; 10 8b 55 dc 8b 45 e0 89 7d ec e8 db af 9f ff eb 11 90 31 c0
[    0.505451] EIP: [&lt;79682de5&gt;] mutex_lock_nested+0x135/0x2a0 SS:ESP 0068:78025e54
[    0.505451] CR2: 0000000000200200
[    0.505451] ---[ end trace ad8ac403ff8aef5e ]---
[    0.505451] Kernel panic - not syncing: Fatal exception

Fixes: 9ea927748ced ("mac80211_hwsim: Register and bind to driver")
Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Junjie Mao &lt;eternal.n08@gmail.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 805dbe17d1c832ad341f14fae8cedf41b67ca6fa upstream.

The driver is not released when ieee80211_register_hw fails in
mac80211_hwsim_create_radio, leading to the access to the unregistered (and
possibly freed) device in platform_driver_unregister:

[    0.447547] mac80211_hwsim: ieee80211_register_hw failed (-2)
[    0.448292] ------------[ cut here ]------------
[    0.448854] WARNING: CPU: 0 PID: 1 at ../include/linux/kref.h:47 kobject_get+0x33/0x50()
[    0.449839] CPU: 0 PID: 1 Comm: swapper Not tainted 3.17.0-00001-gdd46990-dirty #2
[    0.450813] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[    0.451512]  00000000 00000000 78025e38 7967c6c6 78025e68 7905e09b 7988b480 00000000
[    0.452579]  00000001 79887d62 0000002f 79170bb3 79170bb3 78397008 79ac9d74 00000001
[    0.453614]  78025e78 7905e15d 00000009 00000000 78025e84 79170bb3 78397000 78025e8c
[    0.454632] Call Trace:
[    0.454921]  [&lt;7967c6c6&gt;] dump_stack+0x16/0x18
[    0.455453]  [&lt;7905e09b&gt;] warn_slowpath_common+0x6b/0x90
[    0.456067]  [&lt;79170bb3&gt;] ? kobject_get+0x33/0x50
[    0.456612]  [&lt;79170bb3&gt;] ? kobject_get+0x33/0x50
[    0.457155]  [&lt;7905e15d&gt;] warn_slowpath_null+0x1d/0x20
[    0.457748]  [&lt;79170bb3&gt;] kobject_get+0x33/0x50
[    0.458274]  [&lt;7925824f&gt;] get_device+0xf/0x20
[    0.458779]  [&lt;7925b5cd&gt;] driver_detach+0x3d/0xa0
[    0.459331]  [&lt;7925a3ff&gt;] bus_remove_driver+0x8f/0xb0
[    0.459927]  [&lt;7925bf80&gt;] ? class_unregister+0x40/0x80
[    0.460660]  [&lt;7925bad7&gt;] driver_unregister+0x47/0x50
[    0.461248]  [&lt;7925c033&gt;] ? class_destroy+0x13/0x20
[    0.461824]  [&lt;7925d07b&gt;] platform_driver_unregister+0xb/0x10
[    0.462507]  [&lt;79b51ba0&gt;] init_mac80211_hwsim+0x3e8/0x3f9
[    0.463161]  [&lt;79b30c58&gt;] do_one_initcall+0x106/0x1a9
[    0.463758]  [&lt;79b517b8&gt;] ? if_spi_init_module+0xac/0xac
[    0.464393]  [&lt;79b517b8&gt;] ? if_spi_init_module+0xac/0xac
[    0.465001]  [&lt;79071935&gt;] ? parse_args+0x2f5/0x480
[    0.465569]  [&lt;7906b41e&gt;] ? __usermodehelper_set_disable_depth+0x3e/0x50
[    0.466345]  [&lt;79b30dd9&gt;] kernel_init_freeable+0xde/0x17d
[    0.466972]  [&lt;79b304d6&gt;] ? do_early_param+0x7a/0x7a
[    0.467546]  [&lt;79677b1b&gt;] kernel_init+0xb/0xe0
[    0.468072]  [&lt;79075f42&gt;] ? schedule_tail+0x12/0x40
[    0.468658]  [&lt;79686580&gt;] ret_from_kernel_thread+0x20/0x30
[    0.469303]  [&lt;79677b10&gt;] ? rest_init+0xc0/0xc0
[    0.469829] ---[ end trace ad8ac403ff8aef5c ]---
[    0.470509] ------------[ cut here ]------------
[    0.471047] WARNING: CPU: 0 PID: 1 at ../kernel/locking/lockdep.c:3161 __lock_acquire.isra.22+0x7aa/0xb00()
[    0.472163] DEBUG_LOCKS_WARN_ON(id &gt;= MAX_LOCKDEP_KEYS)
[    0.472774] CPU: 0 PID: 1 Comm: swapper Tainted: G        W      3.17.0-00001-gdd46990-dirty #2
[    0.473815] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[    0.474492]  78025de0 78025de0 78025da0 7967c6c6 78025dd0 7905e09b 79888931 78025dfc
[    0.475515]  00000001 79888a93 00000c59 7907f33a 7907f33a 78028000 fffe9d09 00000000
[    0.476519]  78025de8 7905e10e 00000009 78025de0 79888931 78025dfc 78025e24 7907f33a
[    0.477523] Call Trace:
[    0.477821]  [&lt;7967c6c6&gt;] dump_stack+0x16/0x18
[    0.478352]  [&lt;7905e09b&gt;] warn_slowpath_common+0x6b/0x90
[    0.478976]  [&lt;7907f33a&gt;] ? __lock_acquire.isra.22+0x7aa/0xb00
[    0.479658]  [&lt;7907f33a&gt;] ? __lock_acquire.isra.22+0x7aa/0xb00
[    0.480417]  [&lt;7905e10e&gt;] warn_slowpath_fmt+0x2e/0x30
[    0.480479]  [&lt;7907f33a&gt;] __lock_acquire.isra.22+0x7aa/0xb00
[    0.480479]  [&lt;79078aa5&gt;] ? sched_clock_cpu+0xb5/0xf0
[    0.480479]  [&lt;7907fd06&gt;] lock_acquire+0x56/0x70
[    0.480479]  [&lt;7925b5e8&gt;] ? driver_detach+0x58/0xa0
[    0.480479]  [&lt;79682d11&gt;] mutex_lock_nested+0x61/0x2a0
[    0.480479]  [&lt;7925b5e8&gt;] ? driver_detach+0x58/0xa0
[    0.480479]  [&lt;7925b5e8&gt;] ? driver_detach+0x58/0xa0
[    0.480479]  [&lt;7925b5e8&gt;] driver_detach+0x58/0xa0
[    0.480479]  [&lt;7925a3ff&gt;] bus_remove_driver+0x8f/0xb0
[    0.480479]  [&lt;7925bf80&gt;] ? class_unregister+0x40/0x80
[    0.480479]  [&lt;7925bad7&gt;] driver_unregister+0x47/0x50
[    0.480479]  [&lt;7925c033&gt;] ? class_destroy+0x13/0x20
[    0.480479]  [&lt;7925d07b&gt;] platform_driver_unregister+0xb/0x10
[    0.480479]  [&lt;79b51ba0&gt;] init_mac80211_hwsim+0x3e8/0x3f9
[    0.480479]  [&lt;79b30c58&gt;] do_one_initcall+0x106/0x1a9
[    0.480479]  [&lt;79b517b8&gt;] ? if_spi_init_module+0xac/0xac
[    0.480479]  [&lt;79b517b8&gt;] ? if_spi_init_module+0xac/0xac
[    0.480479]  [&lt;79071935&gt;] ? parse_args+0x2f5/0x480
[    0.480479]  [&lt;7906b41e&gt;] ? __usermodehelper_set_disable_depth+0x3e/0x50
[    0.480479]  [&lt;79b30dd9&gt;] kernel_init_freeable+0xde/0x17d
[    0.480479]  [&lt;79b304d6&gt;] ? do_early_param+0x7a/0x7a
[    0.480479]  [&lt;79677b1b&gt;] kernel_init+0xb/0xe0
[    0.480479]  [&lt;79075f42&gt;] ? schedule_tail+0x12/0x40
[    0.480479]  [&lt;79686580&gt;] ret_from_kernel_thread+0x20/0x30
[    0.480479]  [&lt;79677b10&gt;] ? rest_init+0xc0/0xc0
[    0.480479] ---[ end trace ad8ac403ff8aef5d ]---
[    0.495478] BUG: unable to handle kernel paging request at 00200200
[    0.496257] IP: [&lt;79682de5&gt;] mutex_lock_nested+0x135/0x2a0
[    0.496923] *pde = 00000000
[    0.497290] Oops: 0002 [#1]
[    0.497653] CPU: 0 PID: 1 Comm: swapper Tainted: G        W      3.17.0-00001-gdd46990-dirty #2
[    0.498659] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[    0.499321] task: 78028000 ti: 78024000 task.ti: 78024000
[    0.499955] EIP: 0060:[&lt;79682de5&gt;] EFLAGS: 00010097 CPU: 0
[    0.500620] EIP is at mutex_lock_nested+0x135/0x2a0
[    0.501145] EAX: 00200200 EBX: 78397434 ECX: 78397460 EDX: 78025e70
[    0.501816] ESI: 00000246 EDI: 78028000 EBP: 78025e8c ESP: 78025e54
[    0.502497]  DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
[    0.503076] CR0: 8005003b CR2: 00200200 CR3: 01b9d000 CR4: 00000690
[    0.503773] Stack:
[    0.503998]  00000000 00000001 00000000 7925b5e8 78397460 7925b5e8 78397474 78397460
[    0.504944]  00200200 11111111 78025e70 78397000 79ac9d74 00000001 78025ea0 7925b5e8
[    0.505451]  79ac9d74 fffffffe 00000001 78025ebc 7925a3ff 7a251398 78025ec8 7925bf80
[    0.505451] Call Trace:
[    0.505451]  [&lt;7925b5e8&gt;] ? driver_detach+0x58/0xa0
[    0.505451]  [&lt;7925b5e8&gt;] ? driver_detach+0x58/0xa0
[    0.505451]  [&lt;7925b5e8&gt;] driver_detach+0x58/0xa0
[    0.505451]  [&lt;7925a3ff&gt;] bus_remove_driver+0x8f/0xb0
[    0.505451]  [&lt;7925bf80&gt;] ? class_unregister+0x40/0x80
[    0.505451]  [&lt;7925bad7&gt;] driver_unregister+0x47/0x50
[    0.505451]  [&lt;7925c033&gt;] ? class_destroy+0x13/0x20
[    0.505451]  [&lt;7925d07b&gt;] platform_driver_unregister+0xb/0x10
[    0.505451]  [&lt;79b51ba0&gt;] init_mac80211_hwsim+0x3e8/0x3f9
[    0.505451]  [&lt;79b30c58&gt;] do_one_initcall+0x106/0x1a9
[    0.505451]  [&lt;79b517b8&gt;] ? if_spi_init_module+0xac/0xac
[    0.505451]  [&lt;79b517b8&gt;] ? if_spi_init_module+0xac/0xac
[    0.505451]  [&lt;79071935&gt;] ? parse_args+0x2f5/0x480
[    0.505451]  [&lt;7906b41e&gt;] ? __usermodehelper_set_disable_depth+0x3e/0x50
[    0.505451]  [&lt;79b30dd9&gt;] kernel_init_freeable+0xde/0x17d
[    0.505451]  [&lt;79b304d6&gt;] ? do_early_param+0x7a/0x7a
[    0.505451]  [&lt;79677b1b&gt;] kernel_init+0xb/0xe0
[    0.505451]  [&lt;79075f42&gt;] ? schedule_tail+0x12/0x40
[    0.505451]  [&lt;79686580&gt;] ret_from_kernel_thread+0x20/0x30
[    0.505451]  [&lt;79677b10&gt;] ? rest_init+0xc0/0xc0
[    0.505451] Code: 89 d8 e8 cf 9b 9f ff 8b 4f 04 8d 55 e4 89 d8 e8 72 9d 9f ff 8d 43 2c 89 c1 89 45 d8 8b 43 30 8d 55 e4 89 53 30 89 4d e4 89 45 e8 &lt;89&gt; 10 8b 55 dc 8b 45 e0 89 7d ec e8 db af 9f ff eb 11 90 31 c0
[    0.505451] EIP: [&lt;79682de5&gt;] mutex_lock_nested+0x135/0x2a0 SS:ESP 0068:78025e54
[    0.505451] CR2: 0000000000200200
[    0.505451] ---[ end trace ad8ac403ff8aef5e ]---
[    0.505451] Kernel panic - not syncing: Fatal exception

Fixes: 9ea927748ced ("mac80211_hwsim: Register and bind to driver")
Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Junjie Mao &lt;eternal.n08@gmail.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>macvtap: Fix csum_start when VLAN tags are present</title>
<updated>2014-11-19T17:38:17+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2014-11-03T06:01:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6e2b9478b3c0545793d0da88287dc417146bad90'/>
<id>6e2b9478b3c0545793d0da88287dc417146bad90</id>
<content type='text'>
commit 3ce9b20f1971690b8b3b620e735ec99431573b39 upstream.

When VLAN is in use in macvtap_put_user, we end up setting
csum_start to the wrong place.  The result is that the whoever
ends up doing the checksum setting will corrupt the packet instead
of writing the checksum to the expected location, usually this
means writing the checksum with an offset of -4.

This patch fixes this by adjusting csum_start when VLAN tags are
detected.

Fixes: f09e2249c4f5 ("macvtap: restore vlan header on user read")
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 3ce9b20f1971690b8b3b620e735ec99431573b39 upstream.

When VLAN is in use in macvtap_put_user, we end up setting
csum_start to the wrong place.  The result is that the whoever
ends up doing the checksum setting will corrupt the packet instead
of writing the checksum to the expected location, usually this
means writing the checksum with an offset of -4.

This patch fixes this by adjusting csum_start when VLAN tags are
detected.

Fixes: f09e2249c4f5 ("macvtap: restore vlan header on user read")
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>tun: Fix csum_start with VLAN acceleration</title>
<updated>2014-11-19T17:38:15+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2014-11-02T20:30:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c150584886e5542df2a9fb4d0189f492d9d69b35'/>
<id>c150584886e5542df2a9fb4d0189f492d9d69b35</id>
<content type='text'>
commit a8f9bfdf982e2b1fb9f094e4de9ab08c57f3d2fd upstream.

When VLAN acceleration is in use on the xmit path, we end up
setting csum_start to the wrong place.  The result is that the
whoever ends up doing the checksum setting will corrupt the packet
instead of writing the checksum to the expected location, usually
this means writing the checksum with an offset of -4.

This patch fixes this by adjusting csum_start when VLAN acceleration
is detected.

Fixes: 6680ec68eff4 ("tuntap: hardware vlan tx support")
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit a8f9bfdf982e2b1fb9f094e4de9ab08c57f3d2fd upstream.

When VLAN acceleration is in use on the xmit path, we end up
setting csum_start to the wrong place.  The result is that the
whoever ends up doing the checksum setting will corrupt the packet
instead of writing the checksum to the expected location, usually
this means writing the checksum with an offset of -4.

This patch fixes this by adjusting csum_start when VLAN acceleration
is detected.

Fixes: 6680ec68eff4 ("tuntap: hardware vlan tx support")
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

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