WSL2-Linux-Kernel/drivers/net/irda
Thomas Jarosch 9476d39366 mcs7780: Fix initialization when CONFIG_VMAP_STACK is enabled
DMA transfers are not allowed to buffers that are on the stack.
Therefore allocate a buffer to store the result of usb_control_message().

Fixes these bugreports:
https://bugzilla.kernel.org/show_bug.cgi?id=195217

https://bugzilla.redhat.com/show_bug.cgi?id=1421387
https://bugzilla.redhat.com/show_bug.cgi?id=1427398

Shortened kernel backtrace from 4.11.9-200.fc25.x86_64:
kernel: ------------[ cut here ]------------
kernel: WARNING: CPU: 3 PID: 2957 at drivers/usb/core/hcd.c:1587
kernel: transfer buffer not dma capable
kernel: Call Trace:
kernel: dump_stack+0x63/0x86
kernel: __warn+0xcb/0xf0
kernel: warn_slowpath_fmt+0x5a/0x80
kernel: usb_hcd_map_urb_for_dma+0x37f/0x570
kernel: ? try_to_del_timer_sync+0x53/0x80
kernel: usb_hcd_submit_urb+0x34e/0xb90
kernel: ? schedule_timeout+0x17e/0x300
kernel: ? del_timer_sync+0x50/0x50
kernel: ? __slab_free+0xa9/0x300
kernel: usb_submit_urb+0x2f4/0x560
kernel: ? urb_destroy+0x24/0x30
kernel: usb_start_wait_urb+0x6e/0x170
kernel: usb_control_msg+0xdc/0x120
kernel: mcs_get_reg+0x36/0x40 [mcs7780]
kernel: mcs_net_open+0xb5/0x5c0 [mcs7780]
...

Regression goes back to 4.9, so it's a good candidate for -stable.
Though it's the decision of the maintainer.

Thanks to Dan Williams for adding the "transfer buffer not dma capable"
warning in the first place. It instantly pointed me in the right direction.

Patch has been tested with transferring data from a Polar watch.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-24 16:24:05 -07:00
..
Kconfig irda: sh_irda: remove driver 2016-04-04 16:24:13 -04:00
Makefile irda: sh_irda: remove driver 2016-04-04 16:24:13 -04:00
act200l-sir.c irda: Convert IRDA_DEBUG to pr_debug 2014-11-12 13:56:41 -05:00
actisys-sir.c irda: Convert IRDA_DEBUG to pr_debug 2014-11-12 13:56:41 -05:00
ali-ircc.c Annotate hardware config module parameters in drivers/net/irda/ 2017-04-20 12:02:32 +01:00
ali-ircc.h irda: ali-ircc: Replace timeval with ktime_t 2015-01-11 21:39:40 -05:00
au1k_ir.c net: irda: au1k_ir: drop useless include 2017-02-14 14:51:03 -05:00
bfin_sir.c net: Remove usage of net_device last_rx member 2017-01-18 17:22:49 -05:00
bfin_sir.h net/irda: bfin_sir: remove duplicate defines 2016-01-21 10:45:45 -08:00
donauboe.c irda: Convert IRDA_DEBUG to pr_debug 2014-11-12 13:56:41 -05:00
donauboe.h
esi-sir.c irda: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
girbil-sir.c irda: Convert IRDA_DEBUG to pr_debug 2014-11-12 13:56:41 -05:00
irda-usb.c net: irda: irda-usb: fix firmware name on big-endian hosts 2017-05-12 12:15:46 -04:00
irda-usb.h irda: irda-usb: Replace timeval with ktime_t 2015-01-11 21:39:40 -05:00
irtty-sir.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
irtty-sir.h
kingsun-sir.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
ks959-sir.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
ksdazzle-sir.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
litelink-sir.c irda: Convert IRDA_DEBUG to pr_debug 2014-11-12 13:56:41 -05:00
ma600-sir.c irda: Convert IRDA_DEBUG to pr_debug 2014-11-12 13:56:41 -05:00
mcp2120-sir.c irda: Convert IRDA_DEBUG to pr_debug 2014-11-12 13:56:41 -05:00
mcs7780.c mcs7780: Fix initialization when CONFIG_VMAP_STACK is enabled 2017-07-24 16:24:05 -07:00
mcs7780.h irda: Removed all unused timeval variables 2015-01-11 21:39:40 -05:00
nsc-ircc.c Annotate hardware config module parameters in drivers/net/irda/ 2017-04-20 12:02:32 +01:00
nsc-ircc.h irda: nsc-ircc: Replace timeval with ktime_t 2015-01-11 21:39:40 -05:00
old_belkin-sir.c irda: Convert IRDA_DEBUG to pr_debug 2014-11-12 13:56:41 -05:00
pxaficp_ir.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/clock.h> 2017-03-02 08:42:27 +01:00
sa1100_ir.c arm: sa1100: move irda header to linux/platform_data 2014-12-30 18:44:07 -05:00
sh_sir.c net: Remove usage of net_device last_rx member 2017-01-18 17:22:49 -05:00
sir-dev.h irda: Remove extern from function prototypes 2013-09-24 12:54:17 -07:00
sir_dev.c irda: Convert IRDA_DEBUG to pr_debug 2014-11-12 13:56:41 -05:00
sir_dongle.c irda: Convert IRDA_DEBUG to pr_debug 2014-11-12 13:56:41 -05:00
smsc-ircc2.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
smsc-ircc2.h irda: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
smsc-sio.h
stir4200.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
tekram-sir.c irda: Convert IRDA_DEBUG to pr_debug 2014-11-12 13:56:41 -05:00
toim3232-sir.c irda: toim3232-sir: delete some dead code 2016-01-08 13:25:33 -05:00
via-ircc.c treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
via-ircc.h irda: Removed all unused timeval variables 2015-01-11 21:39:40 -05:00
vlsi_ir.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
vlsi_ir.h irda: vlsi_ir: Replace timeval with ktime_t 2015-01-11 21:39:40 -05:00
w83977af.h
w83977af_ir.c Annotate hardware config module parameters in drivers/net/irda/ 2017-04-20 12:02:32 +01:00
w83977af_ir.h