linux-stable/drivers
Heiner Kallweit 3d1355b3cf HID: hid-led: fix issue with transfer buffer not being dma capable
The hid-led driver works fine under 4.8.0, however with the next
kernel from today I get this:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 2578 at drivers/usb/core/hcd.c:1584 usb_hcd_map_urb_for_dma+0x373/0x550 [usbcore]
transfer buffer not dma capable
Modules linked in: hid_led(+) usbhid vfat fat ir_sony_decoder iwlmvm led_class mac80211 snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal iwlwifi crc32c_intel snd_hda_codec_hdmi i2c_i801 i2c_smbus snd_hda_intel cfg80211 snd_hda_codec snd_hda_core snd_pcm r8169 snd_timer mei_me mii snd mei ir_lirc_codec lirc_dev nuvoton_cir rc_core btusb btintel bluetooth rfkill usb_storage efivarfs ipv6 ehci_pci ehci_hcd xhci_pci xhci_hcd usbcore usb_common ext4 jbd2 mbcache ahci libahci libata
CPU: 0 PID: 2578 Comm: systemd-udevd Not tainted 4.8.0-rc8-next-20161003 #1
Hardware name: ZOTAC ZBOX-CI321NANO/ZBOX-CI321NANO, BIOS B246P105 06/01/2015
 ffffc90003dbb7e0 ffffffff81280425 ffffc90003dbb830 0000000000000000
 ffffc90003dbb820 ffffffff8105b086 0000063003dbb800 ffff88006f374480
 0000000000000000 0000000000000000 0000000000000001 ffff880079544000
Call Trace:
 [<ffffffff81280425>] dump_stack+0x68/0x93
 [<ffffffff8105b086>] __warn+0xc6/0xe0
 [<ffffffff8105b0ea>] warn_slowpath_fmt+0x4a/0x50
 [<ffffffffa0143a43>] usb_hcd_map_urb_for_dma+0x373/0x550 [usbcore]
 [<ffffffffa01441b6>] usb_hcd_submit_urb+0x316/0x9c0 [usbcore]
 [<ffffffff810bce80>] ? rcu_read_lock_sched_held+0x40/0x80
 [<ffffffff810e0043>] ? module_assert_mutex_or_preempt+0x13/0x50
 [<ffffffff810e0c07>] ? __module_address+0x27/0xf0
 [<ffffffffa01456e4>] usb_submit_urb+0x2c4/0x520 [usbcore]
 [<ffffffffa0145fea>] usb_start_wait_urb+0x5a/0xe0 [usbcore]
 [<ffffffffa014612c>] usb_control_msg+0xbc/0xf0 [usbcore]
 [<ffffffff810e0c07>] ? __module_address+0x27/0xf0
 [<ffffffffa079a724>] usbhid_raw_request+0xa4/0x180 [usbhid]
 [<ffffffffa07a93b1>] hidled_recv+0x71/0xe0 [hid_led]
 [<ffffffffa07a947d>] thingm_init+0x2d/0x50 [hid_led]
 [<ffffffffa07a969b>] hidled_probe+0xcb/0x24a [hid_led]
 [<ffffffff814d96f2>] hid_device_probe+0xd2/0x150
 [<ffffffff8146023d>] driver_probe_device+0x1fd/0x2c0
 [<ffffffff8146039a>] __driver_attach+0x9a/0xa0
 [<ffffffff81460300>] ? driver_probe_device+0x2c0/0x2c0
 [<ffffffff8145e25d>] bus_for_each_dev+0x5d/0x90
 [<ffffffff8145fa79>] driver_attach+0x19/0x20
 [<ffffffff8145f5ff>] bus_add_driver+0x11f/0x220
 [<ffffffffa07ac000>] ? 0xffffffffa07ac000
 [<ffffffff8146086b>] driver_register+0x5b/0xd0
 [<ffffffffa07ac000>] ? 0xffffffffa07ac000
 [<ffffffff814d83d1>] __hid_register_driver+0x61/0xa0
 [<ffffffffa07ac01e>] hidled_driver_init+0x1e/0x20 [hid_led]
 [<ffffffff81000408>] do_one_initcall+0x38/0x150
 [<ffffffff810bce80>] ? rcu_read_lock_sched_held+0x40/0x80
 [<ffffffff81194ca0>] ? kmem_cache_alloc_trace+0x1d0/0x230
 [<ffffffff811342f9>] do_init_module+0x5a/0x1cb
 [<ffffffff810e3862>] load_module+0x1e42/0x2530
 [<ffffffff810e0990>] ? __symbol_put+0x50/0x50
 [<ffffffff810dfc50>] ? show_coresize+0x30/0x30
 [<ffffffff811ad650>] ? kernel_read_file+0x100/0x190
 [<ffffffff811ad794>] ? kernel_read_file_from_fd+0x44/0x70
 [<ffffffff810e415a>] SYSC_finit_module+0xba/0xc0
 [<ffffffff810e4179>] SyS_finit_module+0x9/0x10
 [<ffffffff815e082a>] entry_SYSCALL_64_fastpath+0x18/0xad
---[ end trace c9e6ea27003ecf9e ]---

Fix this by using a kmalloc'ed buffer when calling hid_hw_raw_request.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-10-10 10:47:03 +02:00
..
accessibility
acpi PCI changes for the v4.9 merge window: 2016-10-07 11:46:37 -07:00
amba
android Revert "android: binder: fix dangling pointer comparison" 2016-08-18 17:21:37 +02:00
ata pata_ninja32: Avoid corrupting status flags 2016-08-30 11:59:47 -04:00
atm atm: iphase: fix newline escape and minor tweak to source formatting 2016-09-15 19:15:55 -04:00
auxdisplay
base General improvements: 2016-10-05 11:37:14 -07:00
bcma bcma: use of_dma_configure() to set initial dma mask 2016-09-09 12:00:37 +03:00
block Revert "floppy: refactor open() flags handling" 2016-08-25 08:56:51 -06:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-10-05 10:11:24 -07:00
bus Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-10-03 19:43:08 -07:00
cdrom
char Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2016-10-04 14:48:27 -07:00
clk CLK: Add Loongson1C clock support 2016-09-23 14:49:21 -07:00
clocksource Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-10-03 18:09:13 -07:00
connector
cpufreq Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2016-10-06 07:59:37 -07:00
cpuidle Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-10-03 19:43:08 -07:00
crypto chcr/cxgb4i/cxgbit/RDMA/cxgb4: Allocate resources dynamically for all cxgb4 ULD's 2016-09-19 01:37:32 -04:00
dax dax: fix mapping size check 2016-09-03 10:40:57 -07:00
dca
devfreq PM / devfreq: rk3399_dmc: Remove explictly regulator_put call in .remove 2016-09-19 13:36:20 +02:00
dio
dma dmaengine updates for 4.8-rc1 2016-10-06 17:13:54 -07:00
dma-buf dma-buf/sw_sync: de-stage SW_SYNC 2016-08-15 16:41:46 +02:00
edac * Altera Arria10 enablement of NAND, DMA, USB, QSPI and SD-MMC FIFO 2016-10-04 12:06:26 -07:00
eisa
extcon Merge branch 'next' into resolution 2016-09-15 16:45:20 +05:30
firewire
firmware Fix bug in module unloading. 2016-10-06 15:16:16 -07:00
fmc
fpga fpga manager: Add hardware dependency to Zynq driver 2016-09-08 17:31:44 +02:00
gpio This is the bulk of GPIO changes for the v4.9 series: 2016-10-05 11:49:09 -07:00
gpu drm/udl: fix line iterator in damage handling 2016-09-28 13:29:18 +10:00
hid HID: hid-led: fix issue with transfer buffer not being dma capable 2016-10-10 10:47:03 +02:00
hsi
hv Drivers: hv: get rid of id in struct vmbus_channel 2016-09-27 12:35:49 +02:00
hwmon hwmon updates for v4.9 2016-10-04 10:56:14 -07:00
hwspinlock
hwtracing coresight: tmc: mark symbols static where possible 2016-09-09 13:53:00 +02:00
i2c Merge branches 'acpi-wdat' and 'acpi-ec' 2016-10-02 01:40:07 +02:00
ide
idle
iio Staging/IIO patches for 4.9-rc1 2016-10-05 14:50:51 -07:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-10-05 10:11:24 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2016-10-07 09:12:19 -07:00
iommu KVM updates for v4.9-rc1 2016-10-06 10:49:01 -07:00
ipack
irqchip irqchip core changes for v4.9 2016-09-22 22:49:52 +02:00
isdn mISDN: mark symbols static where possible 2016-09-01 23:36:17 -07:00
leds leds: triggers: Check return value of kobject_uevent_env() 2016-09-20 10:22:10 +02:00
lguest
lightnvm miscdevice: Use module_misc_device() macro 2016-08-31 14:12:35 +02:00
macintosh drivers/macintosh: Delete owner assignment 2016-08-22 11:09:33 +10:00
mailbox Merge branch 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration 2016-10-06 17:36:53 -07:00
mcb mcb: Add a dma_device to mcb_device 2016-09-27 12:33:47 +02:00
md Merge tag 'md/4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md 2016-10-07 09:45:43 -07:00
media USB/PHY/EXTCON patches for 4.9-rc1 2016-10-03 20:17:35 -07:00
memory Char/Misc driver update for 4.9-rc1 2016-10-03 19:57:49 -07:00
memstick
message scsi: fusion: Fix error return code in mptfc_probe() 2016-09-14 14:26:19 -04:00
mfd - Core Frameworks 2016-10-07 08:35:35 -07:00
misc Char/Misc driver update for 4.9-rc1 2016-10-03 19:57:49 -07:00
mmc USB/PHY/EXTCON patches for 4.9-rc1 2016-10-03 20:17:35 -07:00
mtd Another round of MTD fixes for v4.8 2016-09-28 12:53:08 -07:00
net phy: micrel.c: Enable ksz9031 energy-detect power-down mode 2016-10-05 21:19:06 -04:00
nfc
ntb
nubus
nvdimm libnvdimm, region: fix flush hint table thinko 2016-09-24 11:45:38 -07:00
nvme nvme-rdma: only clear queue flags after successful connect 2016-09-22 19:58:17 -06:00
nvmem nvmem: rockchip-efuse: add rk3399-efuse support 2016-09-02 17:22:51 +02:00
of DeviceTree updates for 4.9: 2016-10-05 11:56:38 -07:00
oprofile oprofile/timer: Convert to hotplug state machine 2016-09-19 21:44:28 +02:00
parisc
parport
pci PCI changes for the v4.9 merge window: 2016-10-07 11:46:37 -07:00
pcmcia pcmcia: lubbock: fix sockets configuration 2016-09-12 10:57:01 +01:00
perf Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-10-03 19:43:08 -07:00
phy phy-twl4030-usb: initialize charging-related stuff via pm_runtime 2016-09-14 10:59:12 +05:30
pinctrl This is the bulk of GPIO changes for the v4.9 series: 2016-10-05 11:49:09 -07:00
platform - Core Frameworks 2016-10-07 08:35:35 -07:00
pnp PNP: isapnp: make core more explicitly non-modular 2016-08-16 22:53:59 +02:00
power power supply and reset changes for the v4.9 series 2016-10-06 18:21:15 -07:00
powercap x86/cpu: Rename Merrifield2 to Moorefield 2016-09-08 08:13:08 +02:00
pps
ps3
ptp ptp: Fix resource leak in case of error 2016-10-03 21:54:10 -04:00
pwm
rapidio rapidio/rio_cm: avoid GFP_KERNEL in atomic context 2016-09-19 15:36:17 -07:00
ras
regulator - Core Frameworks 2016-10-07 08:35:35 -07:00
remoteproc rpmsg updates for v4.9 2016-10-06 17:03:49 -07:00
reset
rpmsg rpmsg: smd: fix dependency on QCOM_SMD=n 2016-09-12 07:05:13 -07:00
rtc Merge branches 'ib-mfd-gpio-4.9', 'ib-mfd-gpio-regulator-4.9', 'ib-mfd-input-4.9', 'ib-mfd-regulator-4.9', 'ib-mfd-regulator-4.9.1', 'ib-mfd-regulator-rtc-4.9', 'ib-mfd-regulator-rtc-4.9-1' and 'ib-mfd-rtc-4.9' into ibs-for-mfd-merged 2016-10-04 15:47:01 +01:00
s390 SCSI misc on 20161006 2016-10-07 09:28:53 -07:00
sbus
scsi SCSI misc on 20161006 2016-10-07 09:28:53 -07:00
sfi
sh
sn
soc ARM: EXYNOS: Remove calls to of_genpd_get_from_provider() 2016-09-13 02:49:33 +02:00
spi Merge remote-tracking branches 'spi/topic/ti-qspi', 'spi/topic/tools', 'spi/topic/txx9' and 'spi/topic/xlp' into spi-next 2016-09-30 09:14:22 -07:00
spmi spmi: pmic-arb: Return an error code if sanity check fails 2016-09-27 12:43:34 +02:00
ssb
staging Staging/IIO patches for 4.9-rc1 2016-10-05 14:50:51 -07:00
target chcr/cxgb4i/cxgbit/RDMA/cxgb4: Allocate resources dynamically for all cxgb4 ULD's 2016-09-19 01:37:32 -04:00
tc
thermal thermal: rcar_thermal: Fix priv->zone error handling 2016-09-06 20:46:06 +08:00
thunderbolt thunderbolt: Don't declare Falcon Ridge unsupported 2016-08-31 13:25:02 +02:00
tty TTY/Serial patches for 4.9-rc1 2016-10-03 20:11:49 -07:00
uio uio: fix dmem_region_start computation 2016-08-31 13:07:30 +02:00
usb Revert "usbtmc: convert to devm_kzalloc" 2016-09-28 11:51:30 +02:00
uwb
vfio vfio_pci: use pci_alloc_irq_vectors 2016-09-29 13:36:38 -06:00
vhost Merge 4.8-rc5 into char-misc-next 2016-09-05 08:04:07 +02:00
video backlight: pwm_bl: Handle gpio that can sleep 2016-10-06 09:27:26 +01:00
virt
virtio virtio: mark vring_dma_dev() static 2016-09-09 21:12:35 +03:00
vlynq
vme vme: fake: remove unexpected unlock in fake_master_set() 2016-09-27 12:43:35 +02:00
w1 w1: fix timeout_us parameter description 2016-08-31 13:56:05 +02:00
watchdog USB/PHY/EXTCON patches for 4.9-rc1 2016-10-03 20:17:35 -07:00
xen xen: features and fixes for 4.9-rc0 2016-10-06 11:19:10 -07:00
zorro
Kconfig
Makefile clk: probe common clock drivers earlier 2016-09-23 13:00:04 +02:00