* Re: [PATCH] at76c50x-usb: Don't register led_trigger if usb_register_driver failed
From: Kalle Valo @ 2019-04-25 16:52 UTC (permalink / raw)
To: Yue Haibing; +Cc: linux-kernel, linux-wireless, davem, netdev, YueHaibing
In-Reply-To: <20190408034529.27500-1-yuehaibing@huawei.com>
Yue Haibing <yuehaibing@huawei.com> wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> Syzkaller report this:
>
> [ 1213.468581] BUG: unable to handle kernel paging request at fffffbfff83bf338
> [ 1213.469530] #PF error: [normal kernel read fault]
> [ 1213.469530] PGD 237fe4067 P4D 237fe4067 PUD 237e60067 PMD 1c868b067 PTE 0
> [ 1213.473514] Oops: 0000 [#1] SMP KASAN PTI
> [ 1213.473514] CPU: 0 PID: 6321 Comm: syz-executor.0 Tainted: G C 5.1.0-rc3+ #8
> [ 1213.473514] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
> [ 1213.473514] RIP: 0010:strcmp+0x31/0xa0
> [ 1213.473514] Code: 00 00 00 00 fc ff df 55 53 48 83 ec 08 eb 0a 84 db 48 89 ef 74 5a 4c 89 e6 48 89 f8 48 89 fa 48 8d 6f 01 48 c1 e8 03 83 e2 07 <42> 0f b6 04 28 38 d0 7f 04 84 c0 75 50 48 89 f0 48 89 f2 0f b6 5d
> [ 1213.473514] RSP: 0018:ffff8881f2b7f950 EFLAGS: 00010246
> [ 1213.473514] RAX: 1ffffffff83bf338 RBX: ffff8881ea6f7240 RCX: ffffffff825350c6
> [ 1213.473514] RDX: 0000000000000000 RSI: ffffffffc1ee19c0 RDI: ffffffffc1df99c0
> [ 1213.473514] RBP: ffffffffc1df99c1 R08: 0000000000000001 R09: 0000000000000004
> [ 1213.473514] R10: 0000000000000000 R11: ffff8881de353f00 R12: ffff8881ee727900
> [ 1213.473514] R13: dffffc0000000000 R14: 0000000000000001 R15: ffffffffc1eeaaf0
> [ 1213.473514] FS: 00007fa66fa01700(0000) GS:ffff8881f7200000(0000) knlGS:0000000000000000
> [ 1213.473514] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [ 1213.473514] CR2: fffffbfff83bf338 CR3: 00000001ebb9e005 CR4: 00000000007606f0
> [ 1213.473514] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> [ 1213.473514] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> [ 1213.473514] PKRU: 55555554
> [ 1213.473514] Call Trace:
> [ 1213.473514] led_trigger_register+0x112/0x3f0
> [ 1213.473514] led_trigger_register_simple+0x7a/0x110
> [ 1213.473514] ? 0xffffffffc1c10000
> [ 1213.473514] at76_mod_init+0x77/0x1000 [at76c50x_usb]
> [ 1213.473514] do_one_initcall+0xbc/0x47d
> [ 1213.473514] ? perf_trace_initcall_level+0x3a0/0x3a0
> [ 1213.473514] ? kasan_unpoison_shadow+0x30/0x40
> [ 1213.473514] ? kasan_unpoison_shadow+0x30/0x40
> [ 1213.473514] do_init_module+0x1b5/0x547
> [ 1213.473514] load_module+0x6405/0x8c10
> [ 1213.473514] ? module_frob_arch_sections+0x20/0x20
> [ 1213.473514] ? kernel_read_file+0x1e6/0x5d0
> [ 1213.473514] ? find_held_lock+0x32/0x1c0
> [ 1213.473514] ? cap_capable+0x1ae/0x210
> [ 1213.473514] ? __do_sys_finit_module+0x162/0x190
> [ 1213.473514] __do_sys_finit_module+0x162/0x190
> [ 1213.473514] ? __ia32_sys_init_module+0xa0/0xa0
> [ 1213.473514] ? __mutex_unlock_slowpath+0xdc/0x690
> [ 1213.473514] ? wait_for_completion+0x370/0x370
> [ 1213.473514] ? vfs_write+0x204/0x4a0
> [ 1213.473514] ? do_syscall_64+0x18/0x450
> [ 1213.473514] do_syscall_64+0x9f/0x450
> [ 1213.473514] entry_SYSCALL_64_after_hwframe+0x49/0xbe
> [ 1213.473514] RIP: 0033:0x462e99
> [ 1213.473514] Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
> [ 1213.473514] RSP: 002b:00007fa66fa00c58 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
> [ 1213.473514] RAX: ffffffffffffffda RBX: 000000000073bf00 RCX: 0000000000462e99
> [ 1213.473514] RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000003
> [ 1213.473514] RBP: 00007fa66fa00c70 R08: 0000000000000000 R09: 0000000000000000
> [ 1213.473514] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fa66fa016bc
> [ 1213.473514] R13: 00000000004bcefa R14: 00000000006f6fb0 R15: 0000000000000004
>
> If usb_register failed, no need to call led_trigger_register_simple.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 1264b951463a ("at76c50x-usb: add driver")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Patch applied to wireless-drivers-next.git, thanks.
09ac2694b047 at76c50x-usb: Don't register led_trigger if usb_register_driver failed
--
https://patchwork.kernel.org/patch/10888765/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH] mwl8k: fix error handling in mwl8k_post_cmd()
From: Kalle Valo @ 2019-04-25 16:52 UTC (permalink / raw)
To: Alexey Khoroshilov
Cc: Lennert Buytenhek, Alexey Khoroshilov, David S. Miller,
linux-wireless, netdev, linux-kernel, ldv-project
In-Reply-To: <1554499598-29351-1-git-send-email-khoroshilov@ispras.ru>
Alexey Khoroshilov <khoroshilov@ispras.ru> wrote:
> If pci_map_single() fails in mwl8k_post_cmd(),
> it returns -ENOMEM immediately, while cleanup is required.
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Patch applied to wireless-drivers-next.git, thanks.
d1717282afd5 mwl8k: fix error handling in mwl8k_post_cmd()
--
https://patchwork.kernel.org/patch/10887851/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH] b43: Remove empty function lpphy_papd_cal()
From: Kalle Valo @ 2019-04-25 16:51 UTC (permalink / raw)
To: Larry Finger; +Cc: linux-wireless, pkshih, Larry Finger, Arnd Bergmann
In-Reply-To: <20190404184914.12819-1-Larry.Finger@lwfinger.net>
Larry Finger <Larry.Finger@lwfinger.net> wrote:
> In commit d825db346270e ("b43: shut up clang -Wuninitialized variable
> warning"), the message noted that function lpphy_papd_cal() was empty
> and had an old TODO regarding its implementation. As the reverse
> engineering project that created the LP-PHY version of this driver
> has not been active for some time, it is safe to remove this empty
> function.
>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Arnd Bergmann <arnd@arndb.de>
Patch applied to wireless-drivers-next.git, thanks.
b25105e126e7 b43: Remove empty function lpphy_papd_cal()
--
https://patchwork.kernel.org/patch/10886095/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH] mwifiex: prevent an array overflow
From: Kalle Valo @ 2019-04-25 16:50 UTC (permalink / raw)
To: Dan Carpenter
Cc: Amitkumar Karwar, Xinming Hu, Nishant Sarmukadam, Ganapathi Bhat,
linux-wireless, kernel-janitors
In-Reply-To: <20190404084423.GB20193@kadam>
Dan Carpenter <dan.carpenter@oracle.com> wrote:
> The "rate_index" is only used as an index into the phist_data->rx_rate[]
> array in the mwifiex_hist_data_set() function. That array has
> MWIFIEX_MAX_AC_RX_RATES (74) elements and it's used to generate some
> debugfs information. The "rate_index" variable comes from the network
> skb->data[] and it is a u8 so it's in the 0-255 range. We need to cap
> it to prevent an array overflow.
>
> Fixes: cbf6e05527a7 ("mwifiex: add rx histogram statistics support")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Patch applied to wireless-drivers-next.git, thanks.
b4c35c17227f mwifiex: prevent an array overflow
--
https://patchwork.kernel.org/patch/10885297/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH][next] zd1211rw: use struct_size() helper
From: Kalle Valo @ 2019-04-25 16:50 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Daniel Drake, Ulrich Kunitz, David S. Miller, linux-wireless,
netdev, linux-kernel, Gustavo A. R. Silva
In-Reply-To: <20190403185905.GA8650@embeddedor>
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
> Make use of the struct_size() helper instead of an open-coded version
> in order to avoid any potential type mistakes, in particular in the
> context in which this code is being used.
>
> So, replace code of the following form:
>
> sizeof(struct usb_req_write_regs) + count * sizeof(struct reg_data)
>
> with:
>
> struct_size(req, reg_writes, count)
>
> This code was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Patch applied to wireless-drivers-next.git, thanks.
0c7beb2db9a5 zd1211rw: use struct_size() helper
--
https://patchwork.kernel.org/patch/10884349/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH][next] mwifiex: use struct_size() in kzalloc()
From: Kalle Valo @ 2019-04-25 16:45 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Amitkumar Karwar, Nishant Sarmukadam, Ganapathi Bhat, Xinming Hu,
David S. Miller, linux-wireless, netdev, linux-kernel,
Gustavo A. R. Silva
In-Reply-To: <20190403164052.GA26381@embeddedor>
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
> One of the more common cases of allocation size calculations is finding
> the size of a structure that has a zero-sized array at the end, along
> with memory for some number of elements for that array. For example:
>
> struct foo {
> int stuff;
> struct boo entry[];
> };
>
> size = sizeof(struct foo) + count * sizeof(struct boo);
> instance = kzalloc(size, GFP_KERNEL)
>
> Instead of leaving these open-coded and prone to type mistakes, we can
> now use the new struct_size() helper:
>
> instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL)
>
> Notice that, in this case, variable regd_size is not necessary,
> hence it is removed.
>
> This code was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Patch applied to wireless-drivers-next.git, thanks.
ae187ba91541 mwifiex: use struct_size() in kzalloc()
--
https://patchwork.kernel.org/patch/10884249/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH 1/8] rsi: add new device model for 9116
From: Kalle Valo @ 2019-04-25 16:45 UTC (permalink / raw)
To: Siva Rebbagondla
Cc: linux-wireless, amitkarwar, krishna.pedda, Ganapathiraju Kondraju,
Siva Rebbagondla
In-Reply-To: <20190403041309.12829-2-siva8118@gmail.com>
Siva Rebbagondla <siva8118@gmail.com> wrote:
> 9116 device id entry is added in both SDIO and USB interfaces.
> New enumberation value taken for the device model. Based on the
> device model detected run time, few device specific operations
> needs to be performed.
>
> adding rsi_dev_model to get device type in run time, as we can use
> same driver for 9113 and 9116 except few firmware load changes.
>
> Signed-off-by: Siva Rebbagondla <siva8118@gmail.com>
8 patches applied to wireless-drivers-next.git, thanks.
54fdb318c111 rsi: add new device model for 9116
3ac61578fbd4 rsi: move common part of firmware load to separate function
e5a1ecc97e5f rsi: add firmware loading for 9116 device
9ba4562ac195 rsi: change in device init frame sequence for 9116
f911c86166d5 rsi: new bootup parameters for 9116
1533f976c668 rsi: send new tx command frame wlan9116 features
17ff2c794f39 rsi: reset device changes for 9116
0a60014b76f5 rsi: miscallaneous changes for 9116 and common
--
https://patchwork.kernel.org/patch/10882717/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH 1/8] rt2800: partially restore old mmio txstatus behaviour
From: Kalle Valo @ 2019-04-25 16:44 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: linux-wireless, Tomislav Požega, Daniel Golle, Felix Fietkau,
Mathias Kresin
In-Reply-To: <1553680711-15730-2-git-send-email-sgruszka@redhat.com>
Stanislaw Gruszka <sgruszka@redhat.com> wrote:
> Do not disable txstatus interrupt and add quota of processed tx statuses in
> one tasklet. Quota is needed to allow to fed device with new frames during
> processing of tx statuses.
>
> Patch fixes about 15% performance degradation on some scenarios caused by
> 0b0d556e0ebb ("rt2800mmio: use txdone/txstatus routines from lib").
>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
8 patches applied to wireless-drivers-next.git, thanks.
889bb866baaf rt2800: partially restore old mmio txstatus behaviour
f61131505e85 rt2800: new flush implementation for SoC devices
6efa79876486 rt2800: move txstatus pending routine
2c7ba758cc4b rt2800mmio: fetch tx status changes
e5ceab9df437 rt2800mmio: use timer and work for handling tx statuses timeouts
eb662b1dc62e rt2x00: remove last_nostatus_check
d954f9e3fb42 rt2x00: remove not used entry field
9ea3812f015b rt2x00mmio: remove legacy comment
--
https://patchwork.kernel.org/patch/10873121/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH v2] rsi: Fix NULL pointer dereference in kmalloc
From: Kalle Valo @ 2019-04-25 16:42 UTC (permalink / raw)
To: Aditya Pakki
Cc: pakki001, kjlu, Amitkumar Karwar, Siva Rebbagondla,
David S. Miller, linux-wireless, netdev, linux-kernel
In-Reply-To: <20190323204916.8368-1-pakki001@umn.edu>
Aditya Pakki <pakki001@umn.edu> wrote:
> kmalloc can fail in rsi_register_rates_channels but memcpy still attempts
> to write to channels. The patch replaces these calls with kmemdup and
> passes the error upstream.
>
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Patch applied to wireless-drivers-next.git, thanks.
d5414c2355b2 rsi: Fix NULL pointer dereference in kmalloc
--
https://patchwork.kernel.org/patch/10866983/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl
From: Al Viro @ 2019-04-25 16:42 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Mauro Carvalho Chehab, Linux FS-devel Mailing List,
y2038 Mailman List, Linux Kernel Mailing List, Jason Gunthorpe,
Daniel Vetter, Greg Kroah-Hartman, David Sterba, Darren Hart,
Jonathan Cameron, Bjorn Andersson, driverdevel, qat-linux,
open list:HARDWARE RANDOM NUMBER GENERATOR CORE,
Linux Media Mailing List, dri-devel, linaro-mm-sig, amd-gfx,
open list:HID CORE LAYER, linux-iio, linux-rdma, linux-nvdimm,
linux-nvme, linux-pci, Platform Driver, linux-remoteproc,
sparclinux, linux-scsi, USB list, linux-btrfs, ceph-devel,
linux-wireless, Networking, Sean Young
In-Reply-To: <CAK8P3a2HmiYQJ2FV2FgLiFsD8M9UKteC9Jetx7ja06PQVZWYfA@mail.gmail.com>
On Thu, Apr 25, 2019 at 05:55:23PM +0200, Arnd Bergmann wrote:
> On Thu, Apr 25, 2019 at 5:35 PM Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > On Thu, Apr 25, 2019 at 12:21:53PM -0300, Mauro Carvalho Chehab wrote:
> >
> > > If I understand your patch description well, using compat_ptr_ioctl
> > > only works if the driver is not for s390, right?
> >
> > No; s390 is where "oh, just set ->compat_ioctl same as ->unlocked_ioctl
> > and be done with that; compat_ptr() is a no-op anyway" breaks. IOW,
> > s390 is the reason for having compat_ptr_ioctl() in the first place;
> > that thing works on all biarch architectures, as long as all stuff
> > handled by ->ioctl() takes pointer to arch-independent object as
> > argument. IOW,
> > argument ignored => OK
> > any arithmetical type => no go, compat_ptr() would bugger it
> > pointer to int => OK
> > pointer to string => OK
> > pointer to u64 => OK
> > pointer to struct {u64 addr; char s[11];} => OK
>
> To be extra pedantic, the 'struct {u64 addr; char s[11];} '
> case is also broken on x86, because sizeof (obj) is smaller
> on i386, even though the location of the members are
> the same. i.e. you can copy_from_user() this, but not
> copy_to_user(), which overwrites 4 bytes after the end of
> the 20-byte user structure.
D'oh! FWIW, it might be worth putting into Documentation/ somewhere;
basically, what is and what isn't biarch-neutral.
Or arch-neutral, for that matter - it's very close. The only real
exception, IIRC, is an extra twist on m68k, where int behaves
like x86 long long - its alignment is only half its size, so
sizeof(struct {char c; int x;}) is 6, not 8 as everywhere
else. Irrelevant for biarch, thankfully (until somebody gets insane
enough to implement 64bit coldfire, kernel port for it *and* biarch
support for m68k binaries on that thing, that is)...
^ permalink raw reply
* Re: [PATCH] rt2x00: code-style fix in rt2800usb.c
From: Kalle Valo @ 2019-04-25 16:41 UTC (permalink / raw)
To: Tomislav Požega; +Cc: linux-wireless
In-Reply-To: <1552573160-3268-1-git-send-email-pozega.tomislav@gmail.com>
Tomislav Požega wrote:
> Remove space leftovers.
>
> Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
Patch applied to wireless-drivers-next.git, thanks.
9490c5602445 rt2x00: code-style fix in rt2800usb.c
--
https://patchwork.kernel.org/patch/10852955/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH v3 2/4] rt2x00: use ratelimited variants dev_warn/dev_err
From: Kalle Valo @ 2019-04-25 16:41 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: linux-wireless, Tomislav Požega, Daniel Golle, Felix Fietkau,
Mathias Kresin
In-Reply-To: <1552384303-29529-3-git-send-email-sgruszka@redhat.com>
Stanislaw Gruszka <sgruszka@redhat.com> wrote:
> As reported by Randy we can overwhelm logs on some USB error conditions.
> To avoid that use dev_warn_ratelimited() and dev_err_ratelimitd().
>
> Reported-and-tested-by: Randy Oostdyk <linux-kernel@oostdyk.com>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
3 patches applied to wireless-drivers-next.git, thanks.
bb3b18c92533 rt2x00: use ratelimited variants dev_warn/dev_err
e383c70474db rt2x00: check number of EPROTO errors
61a4e5ff0d72 rt2x00: do not print error when queue is full
--
https://patchwork.kernel.org/patch/10848959/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH] net: cw1200: fix a NULL pointer dereference
From: Kalle Valo @ 2019-04-25 16:40 UTC (permalink / raw)
To: Kangjie Lu
Cc: kjlu, pakki001, Solomon Peachy, David S. Miller, linux-wireless,
netdev, linux-kernel
In-Reply-To: <20190312080502.2953-1-kjlu@umn.edu>
Kangjie Lu <kjlu@umn.edu> wrote:
> In case create_singlethread_workqueue fails, the fix free the
> hardware and returns NULL to avoid NULL pointer dereference.
>
> Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Patch applied to wireless-drivers-next.git, thanks.
0ed2a0053474 net: cw1200: fix a NULL pointer dereference
--
https://patchwork.kernel.org/patch/10848701/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH] ssb: Fix possible NULL pointer dereference in ssb_host_pcmcia_exit
From: Kalle Valo @ 2019-04-25 16:40 UTC (permalink / raw)
To: Yue Haibing; +Cc: ast, daniel, linux-kernel, netdev, linux-wireless, YueHaibing
In-Reply-To: <20190306115658.25076-1-yuehaibing@huawei.com>
Yue Haibing <yuehaibing@huawei.com> wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> Syzkaller report this:
>
> kasan: GPF could be caused by NULL-ptr deref or user memory access
> general protection fault: 0000 [#1] SMP KASAN PTI
> CPU: 0 PID: 4492 Comm: syz-executor.0 Not tainted 5.0.0-rc7+ #45
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
> RIP: 0010:sysfs_remove_file_ns+0x27/0x70 fs/sysfs/file.c:468
> Code: 00 00 00 41 54 55 48 89 fd 53 49 89 d4 48 89 f3 e8 ee 76 9c ff 48 8d 7d 30 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 2d 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 8b 6d
> RSP: 0018:ffff8881e9d9fc00 EFLAGS: 00010206
> RAX: dffffc0000000000 RBX: ffffffff900367e0 RCX: ffffffff81a95952
> RDX: 0000000000000006 RSI: ffffc90001405000 RDI: 0000000000000030
> RBP: 0000000000000000 R08: fffffbfff1fa22ed R09: fffffbfff1fa22ed
> R10: 0000000000000001 R11: fffffbfff1fa22ec R12: 0000000000000000
> R13: ffffffffc1abdac0 R14: 1ffff1103d3b3f8b R15: 0000000000000000
> FS: 00007fe409dc1700(0000) GS:ffff8881f1200000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 0000001b2d721000 CR3: 00000001e98b6005 CR4: 00000000007606f0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> PKRU: 55555554
> Call Trace:
> sysfs_remove_file include/linux/sysfs.h:519 [inline]
> driver_remove_file+0x40/0x50 drivers/base/driver.c:122
> pcmcia_remove_newid_file drivers/pcmcia/ds.c:163 [inline]
> pcmcia_unregister_driver+0x7d/0x2b0 drivers/pcmcia/ds.c:209
> ssb_modexit+0xa/0x1b [ssb]
> __do_sys_delete_module kernel/module.c:1018 [inline]
> __se_sys_delete_module kernel/module.c:961 [inline]
> __x64_sys_delete_module+0x3dc/0x5e0 kernel/module.c:961
> do_syscall_64+0x147/0x600 arch/x86/entry/common.c:290
> entry_SYSCALL_64_after_hwframe+0x49/0xbe
> RIP: 0033:0x462e99
> Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
> RSP: 002b:00007fe409dc0c58 EFLAGS: 00000246 ORIG_RAX: 00000000000000b0
> RAX: ffffffffffffffda RBX: 000000000073bf00 RCX: 0000000000462e99
> RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200000c0
> RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe409dc16bc
> R13: 00000000004bccaa R14: 00000000006f6bc8 R15: 00000000ffffffff
> Modules linked in: ssb(-) 3c59x nvme_core macvlan tap pata_hpt3x3 rt2x00pci null_blk tsc40 pm_notifier_error_inject notifier_error_inject mdio cdc_wdm nf_reject_ipv4 ath9k_common ath9k_hw ath pppox ppp_generic slhc ehci_platform wl12xx wlcore tps6507x_ts ioc4 nf_synproxy_core ide_gd_mod ax25 can_dev iwlwifi can_raw atm tm2_touchkey can_gw can sundance adp5588_keys rt2800mmio rt2800lib rt2x00mmio rt2x00lib eeprom_93cx6 pn533 lru_cache elants_i2c ip_set nfnetlink gameport tipc hampshire nhc_ipv6 nhc_hop nhc_udp nhc_fragment nhc_routing nhc_mobility nhc_dest 6lowpan silead brcmutil nfc mt76_usb mt76 mac80211 iptable_security iptable_raw iptable_mangle iptable_nat nf_nat_ipv4 nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_filter bpfilter ip6_vti ip_gre sit hsr veth vxcan batman_adv cfg80211 rfkill chnl_net caif nlmon vcan bridge stp llc ip6_gre ip6_tunnel tunnel6 tun joydev mousedev serio_raw ide_pci_generic piix floppy ide_core sch_fq_codel ip_tables x_tables ipv6
> [last unloaded: 3c59x]
> Dumping ftrace buffer:
> (ftrace buffer empty)
> ---[ end trace 3913cbf8011e1c05 ]---
>
> In ssb_modinit, it does not fail SSB init when ssb_host_pcmcia_init failed,
> however in ssb_modexit, ssb_host_pcmcia_exit calls pcmcia_unregister_driver
> unconditionally, which may tigger a NULL pointer dereference issue as above.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 399500da18f7 ("ssb: pick PCMCIA host code support from b43 driver")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Patch applied to wireless-drivers-next.git, thanks.
b2c01aab9646 ssb: Fix possible NULL pointer dereference in ssb_host_pcmcia_exit
--
https://patchwork.kernel.org/patch/10841029/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH] ray_cs: use remove_proc_subtree to simplify procfs code
From: Kalle Valo @ 2019-04-25 16:39 UTC (permalink / raw)
To: Yue Haibing; +Cc: davem, linux-kernel, netdev, linux-wireless, YueHaibing
In-Reply-To: <20190306114812.30480-1-yuehaibing@huawei.com>
Yue Haibing <yuehaibing@huawei.com> wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> Use remove_proc_subtree to remove the whole subtree
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Patch applied to wireless-drivers-next.git, thanks.
3b6edcb3fffe ray_cs: use remove_proc_subtree to simplify procfs code
--
https://patchwork.kernel.org/patch/10840991/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH] ray_cs: Check return value of pcmcia_register_driver
From: Kalle Valo @ 2019-04-25 16:38 UTC (permalink / raw)
To: Yue Haibing; +Cc: davem, linux-kernel, netdev, linux-wireless, YueHaibing
In-Reply-To: <20190306114614.19116-1-yuehaibing@huawei.com>
Yue Haibing <yuehaibing@huawei.com> wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> init_ray_cs does not check value of pcmcia_register_driver,
> if it fails, there maybe cause a NULL pointer dereference in
> exit_ray_cs.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Patch applied to wireless-drivers-next.git, thanks.
444efbde3281 ray_cs: Check return value of pcmcia_register_driver
--
https://patchwork.kernel.org/patch/10840927/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH][next] rndis_wlan: use struct_size() helper
From: Kalle Valo @ 2019-04-25 16:38 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Jussi Kivilinna, David S. Miller, linux-wireless, netdev,
linux-kernel, Gustavo A. R. Silva
In-Reply-To: <20190403182334.GA3986@embeddedor>
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
> Make use of the struct_size() helper instead of an open-coded version
> in order to avoid any potential type mistakes, in particular in the
> context in which this code is being used.
>
> So, replace code of the following form:
>
> sizeof(*pmkids) + max_pmkids * sizeof(pmkids->bssid_info[0])
>
> with:
>
> struct_size(pmkids, bssid_info, num_pmkids)
>
> This code was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Patch applied to wireless-drivers-next.git, thanks.
d442af2e1bcb rndis_wlan: use struct_size() helper
--
https://patchwork.kernel.org/patch/10884341/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl
From: Arnd Bergmann @ 2019-04-25 15:55 UTC (permalink / raw)
To: Al Viro
Cc: Mauro Carvalho Chehab, Linux FS-devel Mailing List,
y2038 Mailman List, Linux Kernel Mailing List, Jason Gunthorpe,
Daniel Vetter, Greg Kroah-Hartman, David Sterba, Darren Hart,
Jonathan Cameron, Bjorn Andersson, driverdevel, qat-linux,
open list:HARDWARE RANDOM NUMBER GENERATOR CORE,
Linux Media Mailing List, dri-devel, linaro-mm-sig, amd-gfx,
open list:HID CORE LAYER, linux-iio, linux-rdma, linux-nvdimm,
linux-nvme, linux-pci, Platform Driver, linux-remoteproc,
sparclinux, linux-scsi, USB list, linux-btrfs, ceph-devel,
linux-wireless, Networking, Sean Young
In-Reply-To: <20190425153534.GS2217@ZenIV.linux.org.uk>
On Thu, Apr 25, 2019 at 5:35 PM Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> On Thu, Apr 25, 2019 at 12:21:53PM -0300, Mauro Carvalho Chehab wrote:
>
> > If I understand your patch description well, using compat_ptr_ioctl
> > only works if the driver is not for s390, right?
>
> No; s390 is where "oh, just set ->compat_ioctl same as ->unlocked_ioctl
> and be done with that; compat_ptr() is a no-op anyway" breaks. IOW,
> s390 is the reason for having compat_ptr_ioctl() in the first place;
> that thing works on all biarch architectures, as long as all stuff
> handled by ->ioctl() takes pointer to arch-independent object as
> argument. IOW,
> argument ignored => OK
> any arithmetical type => no go, compat_ptr() would bugger it
> pointer to int => OK
> pointer to string => OK
> pointer to u64 => OK
> pointer to struct {u64 addr; char s[11];} => OK
To be extra pedantic, the 'struct {u64 addr; char s[11];} '
case is also broken on x86, because sizeof (obj) is smaller
on i386, even though the location of the members are
the same. i.e. you can copy_from_user() this, but not
copy_to_user(), which overwrites 4 bytes after the end of
the 20-byte user structure.
Arnd
^ permalink raw reply
* Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl
From: Mauro Carvalho Chehab @ 2019-04-25 15:53 UTC (permalink / raw)
To: Al Viro
Cc: Arnd Bergmann, linux-fsdevel, y2038, linux-kernel,
Jason Gunthorpe, Daniel Vetter, Greg Kroah-Hartman, David Sterba,
Darren Hart, Jonathan Cameron, Bjorn Andersson, devel, qat-linux,
linux-crypto, linux-media, dri-devel, linaro-mm-sig, amd-gfx,
linux-input, linux-iio, linux-rdma, linux-nvdimm, linux-nvme,
linux-pci, platform-driver-x86, linux-remoteproc, sparclinux,
linux-scsi, linux-usb, linux-btrfs, ceph-devel, linux-wireless,
netdev, Sean Young
In-Reply-To: <20190425153534.GS2217@ZenIV.linux.org.uk>
Em Thu, 25 Apr 2019 16:35:34 +0100
Al Viro <viro@zeniv.linux.org.uk> escreveu:
> On Thu, Apr 25, 2019 at 12:21:53PM -0300, Mauro Carvalho Chehab wrote:
>
> > If I understand your patch description well, using compat_ptr_ioctl
> > only works if the driver is not for s390, right?
>
> No; s390 is where "oh, just set ->compat_ioctl same as ->unlocked_ioctl
> and be done with that; compat_ptr() is a no-op anyway" breaks. IOW,
> s390 is the reason for having compat_ptr_ioctl() in the first place;
> that thing works on all biarch architectures, as long as all stuff
> handled by ->ioctl() takes pointer to arch-independent object as
> argument. IOW,
> argument ignored => OK
> any arithmetical type => no go, compat_ptr() would bugger it
> pointer to int => OK
That's the case for all LIRC ioctls: they all use a pointer to u32
argument.
> pointer to string => OK
> pointer to u64 => OK
> pointer to struct {u64 addr; char s[11];} => OK
> pointer to long => needs explicit handler
> pointer to struct {void *addr; char s[11];} => needs explicit handler
> pointer to struct {int x; u64 y;} => needs explicit handler on amd64
> For "just use ->unlocked_ioctl for ->ioctl" we have
> argument ignored => OK
> any arithmetical type => OK
> any pointer => instant breakage on s390, in addtion to cases that break
> with compat_ptr_ioctl().
>
> Probably some form of that ought to go into commit message for compat_ptr_ioctl()
> introduction...
Agreed.
Thanks,
Mauro
^ permalink raw reply
* Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl
From: Al Viro @ 2019-04-25 15:35 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Arnd Bergmann, linux-fsdevel, y2038, linux-kernel,
Jason Gunthorpe, Daniel Vetter, Greg Kroah-Hartman, David Sterba,
Darren Hart, Jonathan Cameron, Bjorn Andersson, devel, qat-linux,
linux-crypto, linux-media, dri-devel, linaro-mm-sig, amd-gfx,
linux-input, linux-iio, linux-rdma, linux-nvdimm, linux-nvme,
linux-pci, platform-driver-x86, linux-remoteproc, sparclinux,
linux-scsi, linux-usb, linux-btrfs, ceph-devel, linux-wireless,
netdev, Sean Young
In-Reply-To: <20190425122153.450fc094@coco.lan>
On Thu, Apr 25, 2019 at 12:21:53PM -0300, Mauro Carvalho Chehab wrote:
> If I understand your patch description well, using compat_ptr_ioctl
> only works if the driver is not for s390, right?
No; s390 is where "oh, just set ->compat_ioctl same as ->unlocked_ioctl
and be done with that; compat_ptr() is a no-op anyway" breaks. IOW,
s390 is the reason for having compat_ptr_ioctl() in the first place;
that thing works on all biarch architectures, as long as all stuff
handled by ->ioctl() takes pointer to arch-independent object as
argument. IOW,
argument ignored => OK
any arithmetical type => no go, compat_ptr() would bugger it
pointer to int => OK
pointer to string => OK
pointer to u64 => OK
pointer to struct {u64 addr; char s[11];} => OK
pointer to long => needs explicit handler
pointer to struct {void *addr; char s[11];} => needs explicit handler
pointer to struct {int x; u64 y;} => needs explicit handler on amd64
For "just use ->unlocked_ioctl for ->ioctl" we have
argument ignored => OK
any arithmetical type => OK
any pointer => instant breakage on s390, in addtion to cases that break
with compat_ptr_ioctl().
Probably some form of that ought to go into commit message for compat_ptr_ioctl()
introduction...
^ permalink raw reply
* Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl
From: Arnd Bergmann @ 2019-04-25 15:32 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Alexander Viro, Linux FS-devel Mailing List, y2038 Mailman List,
Linux Kernel Mailing List, Jason Gunthorpe, Daniel Vetter,
Greg Kroah-Hartman, David Sterba, Darren Hart, Jonathan Cameron,
Bjorn Andersson, driverdevel, qat-linux,
open list:HARDWARE RANDOM NUMBER GENERATOR CORE,
Linux Media Mailing List, dri-devel, linaro-mm-sig, amd-gfx,
open list:HID CORE LAYER, linux-iio, linux-rdma, linux-nvdimm,
linux-nvme, linux-pci, Platform Driver, linux-remoteproc,
sparclinux, linux-scsi, USB list, linux-btrfs, ceph-devel,
linux-wireless, Networking, Sean Young
In-Reply-To: <20190425122153.450fc094@coco.lan>
On Thu, Apr 25, 2019 at 5:22 PM Mauro Carvalho Chehab
<mchehab+samsung@kernel.org> wrote:
> Em Tue, 16 Apr 2019 22:25:33 +0200 Arnd Bergmann <arnd@arndb.de> escreveu:
>
> If I understand your patch description well, using compat_ptr_ioctl
> only works if the driver is not for s390, right?
No, the purpose of compat_ptr_ioctl() is to make sure it works
everywhere including s390.
Even on s390 it tends to work most of the time, but for correctness
the upper bit of a 32-bit pointer needs to be cleared, as
compat_ptr_ioctl does, in case some application passes a pointer
with that bit set. [IIRC, in the instruction pointer, the high bit is set, in
data references it is ignored but usually cleared, but it may be left
on for IP-relative address generation]
Arnd
^ permalink raw reply
* Re: pull-request: iwlwifi-next 2019-04-18-2
From: Kalle Valo @ 2019-04-25 15:29 UTC (permalink / raw)
To: Luca Coelho; +Cc: linux-wireless, linuxwifi, david.e.box, joe.konno
In-Reply-To: <560ba2b6a20ac9842fd6a5a5d786def1077811f4.camel@coelho.fi>
Luca Coelho <luca@coelho.fi> writes:
> This is a new version of my pull request on top of your tree after you
> fast-forwarded to net-next, to avoid a small conflict.
>
> This is the third batch of patches intended for v5.2. This includes
> the last patchset I sent. Usual development work. More details about
> the contents in the tag description.
>
> I have sent this out before and kbuildbot reported success.
>
> Please let me know if there are any issues.
>
> Cheers,
> Luca.
>
>
> The following changes since commit 5c2e6e14a0ad24a35d9d2b318204c8c012d9d618:
>
> Merge branch 'net-add-reset-controller-driven-PHY-reset' (2019-04-18 17:43:11 -0700)
>
> are available in the Git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git tags/iwlwifi-next-for-kalle-2019-04-18-2
>
> for you to fetch changes up to 69166f7a37dc0bde5a3c26945e3cdbfc740b0562:
>
> iwlwifi: dbg_ini: set dump bit only when trigger collection is certain (2019-04-19 10:27:34 +0300)
>
> ----------------------------------------------------------------
> Third batch of patches intended for v5.2
>
> * Bump the 20000-series FW API version supported;
> * Work on the new debugging infra continues;
> * One clean-up to prevent a bogus warning with clang;
> * A small cleanup in the PCI ID list;
> * Work on new hardware continues;
> * RTT confidence indication support for FTM;
> * An improvement in HE rate-scaling;
>
> ----------------------------------------------------------------
Pulled, thanks Luca.
--
Kalle Valo
^ permalink raw reply
* Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl
From: Mauro Carvalho Chehab @ 2019-04-25 15:21 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Alexander Viro, linux-fsdevel, y2038, linux-kernel,
Jason Gunthorpe, Daniel Vetter, Greg Kroah-Hartman, David Sterba,
Darren Hart, Jonathan Cameron, Bjorn Andersson, devel, qat-linux,
linux-crypto, linux-media, dri-devel, linaro-mm-sig, amd-gfx,
linux-input, linux-iio, linux-rdma, linux-nvdimm, linux-nvme,
linux-pci, platform-driver-x86, linux-remoteproc, sparclinux,
linux-scsi, linux-usb, linux-btrfs, ceph-devel, linux-wireless,
netdev, Sean Young
In-Reply-To: <20190416202701.127745-1-arnd@arndb.de>
Em Tue, 16 Apr 2019 22:25:33 +0200
Arnd Bergmann <arnd@arndb.de> escreveu:
> The .ioctl and .compat_ioctl file operations have the same prototype so
> they can both point to the same function, which works great almost all
> the time when all the commands are compatible.
>
> One exception is the s390 architecture, where a compat pointer is only
> 31 bit wide, and converting it into a 64-bit pointer requires calling
> compat_ptr(). Most drivers here will ever run in s390, but since we now
> have a generic helper for it, it's easy enough to use it consistently.
>
> I double-checked all these drivers to ensure that all ioctl arguments
> are used as pointers or are ignored, but are not interpreted as integer
> values.
>
> Acked-by: Jason Gunthorpe <jgg@mellanox.com>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Acked-by: David Sterba <dsterba@suse.com>
> Acked-by: Darren Hart (VMware) <dvhart@infradead.org>
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/android/binder.c | 2 +-
> drivers/crypto/qat/qat_common/adf_ctl_drv.c | 2 +-
> drivers/dma-buf/dma-buf.c | 4 +---
> drivers/dma-buf/sw_sync.c | 2 +-
> drivers/dma-buf/sync_file.c | 2 +-
> drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +-
> drivers/hid/hidraw.c | 4 +---
> drivers/iio/industrialio-core.c | 2 +-
> drivers/infiniband/core/uverbs_main.c | 4 ++--
> drivers/media/rc/lirc_dev.c | 4 +---
If I understand your patch description well, using compat_ptr_ioctl
only works if the driver is not for s390, right?
In thesis, nothing prevents to use LIRC API on s390 - as this isn't
a driver but, instead, RC core feature to expose raw remote controller
codes to userspace.
Yet, lirc_dev will only work if the system has a remote controller driver.
Well, we don't have any for s390. Despite we don't have such driver,
I can't possible see why someone would use a remote controller for a
mainframe :-p
Anyway, if someone ever come with such driver/usecase, reverting this
change (or adding an #ifdef to check if arch is 390) should be
pretty straight forward.
So:
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> drivers/mfd/cros_ec_dev.c | 4 +---
> drivers/misc/vmw_vmci/vmci_host.c | 2 +-
> drivers/nvdimm/bus.c | 4 ++--
> drivers/nvme/host/core.c | 2 +-
> drivers/pci/switch/switchtec.c | 2 +-
> drivers/platform/x86/wmi.c | 2 +-
> drivers/rpmsg/rpmsg_char.c | 4 ++--
> drivers/sbus/char/display7seg.c | 2 +-
> drivers/sbus/char/envctrl.c | 4 +---
> drivers/scsi/3w-xxxx.c | 4 +---
> drivers/scsi/cxlflash/main.c | 2 +-
> drivers/scsi/esas2r/esas2r_main.c | 2 +-
> drivers/scsi/pmcraid.c | 4 +---
> drivers/staging/android/ion/ion.c | 4 +---
> drivers/staging/vme/devices/vme_user.c | 2 +-
> drivers/tee/tee_core.c | 2 +-
> drivers/usb/class/cdc-wdm.c | 2 +-
> drivers/usb/class/usbtmc.c | 4 +---
> drivers/virt/fsl_hypervisor.c | 2 +-
> fs/btrfs/super.c | 2 +-
> fs/ceph/dir.c | 2 +-
> fs/ceph/file.c | 2 +-
> fs/fuse/dev.c | 2 +-
> fs/notify/fanotify/fanotify_user.c | 2 +-
> fs/userfaultfd.c | 2 +-
> net/rfkill/core.c | 2 +-
> 36 files changed, 39 insertions(+), 57 deletions(-)
>
> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> index 4b9c7ca492e6..48109ade7234 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -5998,7 +5998,7 @@ const struct file_operations binder_fops = {
> .owner = THIS_MODULE,
> .poll = binder_poll,
> .unlocked_ioctl = binder_ioctl,
> - .compat_ioctl = binder_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> .mmap = binder_mmap,
> .open = binder_open,
> .flush = binder_flush,
> diff --git a/drivers/crypto/qat/qat_common/adf_ctl_drv.c b/drivers/crypto/qat/qat_common/adf_ctl_drv.c
> index abc7a7f64d64..ef0e482ee04f 100644
> --- a/drivers/crypto/qat/qat_common/adf_ctl_drv.c
> +++ b/drivers/crypto/qat/qat_common/adf_ctl_drv.c
> @@ -68,7 +68,7 @@ static long adf_ctl_ioctl(struct file *fp, unsigned int cmd, unsigned long arg);
> static const struct file_operations adf_ctl_ops = {
> .owner = THIS_MODULE,
> .unlocked_ioctl = adf_ctl_ioctl,
> - .compat_ioctl = adf_ctl_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> struct adf_ctl_drv_info {
> diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
> index 7c858020d14b..0cb336fe6324 100644
> --- a/drivers/dma-buf/dma-buf.c
> +++ b/drivers/dma-buf/dma-buf.c
> @@ -325,9 +325,7 @@ static const struct file_operations dma_buf_fops = {
> .llseek = dma_buf_llseek,
> .poll = dma_buf_poll,
> .unlocked_ioctl = dma_buf_ioctl,
> -#ifdef CONFIG_COMPAT
> - .compat_ioctl = dma_buf_ioctl,
> -#endif
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> /*
> diff --git a/drivers/dma-buf/sw_sync.c b/drivers/dma-buf/sw_sync.c
> index 32dcf7b4c935..411de6a8a0ad 100644
> --- a/drivers/dma-buf/sw_sync.c
> +++ b/drivers/dma-buf/sw_sync.c
> @@ -419,5 +419,5 @@ const struct file_operations sw_sync_debugfs_fops = {
> .open = sw_sync_debugfs_open,
> .release = sw_sync_debugfs_release,
> .unlocked_ioctl = sw_sync_ioctl,
> - .compat_ioctl = sw_sync_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> };
> diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
> index 4f6305ca52c8..0949f91eb85f 100644
> --- a/drivers/dma-buf/sync_file.c
> +++ b/drivers/dma-buf/sync_file.c
> @@ -488,5 +488,5 @@ static const struct file_operations sync_file_fops = {
> .release = sync_file_release,
> .poll = sync_file_poll,
> .unlocked_ioctl = sync_file_ioctl,
> - .compat_ioctl = sync_file_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> };
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> index 083bd8114db1..5d6ac7885aa7 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> @@ -49,7 +49,7 @@ static const char kfd_dev_name[] = "kfd";
> static const struct file_operations kfd_fops = {
> .owner = THIS_MODULE,
> .unlocked_ioctl = kfd_ioctl,
> - .compat_ioctl = kfd_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> .open = kfd_open,
> .mmap = kfd_mmap,
> };
> diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
> index 9fc51eff1079..e7284d38b66d 100644
> --- a/drivers/hid/hidraw.c
> +++ b/drivers/hid/hidraw.c
> @@ -476,9 +476,7 @@ static const struct file_operations hidraw_ops = {
> .release = hidraw_release,
> .unlocked_ioctl = hidraw_ioctl,
> .fasync = hidraw_fasync,
> -#ifdef CONFIG_COMPAT
> - .compat_ioctl = hidraw_ioctl,
> -#endif
> + .compat_ioctl = compat_ptr_ioctl,
> .llseek = noop_llseek,
> };
>
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index 4700fd5d8c90..eed1bea257b4 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -1635,7 +1635,7 @@ static const struct file_operations iio_buffer_fileops = {
> .owner = THIS_MODULE,
> .llseek = noop_llseek,
> .unlocked_ioctl = iio_ioctl,
> - .compat_ioctl = iio_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> static int iio_check_unique_scan_index(struct iio_dev *indio_dev)
> diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
> index 70b7d80431a9..ac4321d7c800 100644
> --- a/drivers/infiniband/core/uverbs_main.c
> +++ b/drivers/infiniband/core/uverbs_main.c
> @@ -1120,7 +1120,7 @@ static const struct file_operations uverbs_fops = {
> .release = ib_uverbs_close,
> .llseek = no_llseek,
> .unlocked_ioctl = ib_uverbs_ioctl,
> - .compat_ioctl = ib_uverbs_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> static const struct file_operations uverbs_mmap_fops = {
> @@ -1131,7 +1131,7 @@ static const struct file_operations uverbs_mmap_fops = {
> .release = ib_uverbs_close,
> .llseek = no_llseek,
> .unlocked_ioctl = ib_uverbs_ioctl,
> - .compat_ioctl = ib_uverbs_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> static struct ib_client uverbs_client = {
> diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
> index f862f1b7f996..9ccc7e9cbc8e 100644
> --- a/drivers/media/rc/lirc_dev.c
> +++ b/drivers/media/rc/lirc_dev.c
> @@ -730,9 +730,7 @@ static const struct file_operations lirc_fops = {
> .owner = THIS_MODULE,
> .write = ir_lirc_transmit_ir,
> .unlocked_ioctl = ir_lirc_ioctl,
> -#ifdef CONFIG_COMPAT
> - .compat_ioctl = ir_lirc_ioctl,
> -#endif
> + .compat_ioctl = compat_ptr_ioctl,
> .read = ir_lirc_read,
> .poll = ir_lirc_poll,
> .open = ir_lirc_open,
> diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
> index d275deaecb12..4a602a40d75c 100644
> --- a/drivers/mfd/cros_ec_dev.c
> +++ b/drivers/mfd/cros_ec_dev.c
> @@ -251,9 +251,7 @@ static const struct file_operations fops = {
> .release = ec_device_release,
> .read = ec_device_read,
> .unlocked_ioctl = ec_device_ioctl,
> -#ifdef CONFIG_COMPAT
> - .compat_ioctl = ec_device_ioctl,
> -#endif
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> static void cros_ec_class_release(struct device *dev)
> diff --git a/drivers/misc/vmw_vmci/vmci_host.c b/drivers/misc/vmw_vmci/vmci_host.c
> index 997f92543dd4..5bb406dabe85 100644
> --- a/drivers/misc/vmw_vmci/vmci_host.c
> +++ b/drivers/misc/vmw_vmci/vmci_host.c
> @@ -969,7 +969,7 @@ static const struct file_operations vmuser_fops = {
> .release = vmci_host_close,
> .poll = vmci_host_poll,
> .unlocked_ioctl = vmci_host_unlocked_ioctl,
> - .compat_ioctl = vmci_host_unlocked_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> static struct miscdevice vmci_host_miscdev = {
> diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c
> index 7bbff0af29b2..065ebd584482 100644
> --- a/drivers/nvdimm/bus.c
> +++ b/drivers/nvdimm/bus.c
> @@ -1167,7 +1167,7 @@ static const struct file_operations nvdimm_bus_fops = {
> .owner = THIS_MODULE,
> .open = nd_open,
> .unlocked_ioctl = nd_ioctl,
> - .compat_ioctl = nd_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> .llseek = noop_llseek,
> };
>
> @@ -1175,7 +1175,7 @@ static const struct file_operations nvdimm_fops = {
> .owner = THIS_MODULE,
> .open = nd_open,
> .unlocked_ioctl = nvdimm_ioctl,
> - .compat_ioctl = nvdimm_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> .llseek = noop_llseek,
> };
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 2c43e12b70af..560929bee5ce 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -2739,7 +2739,7 @@ static const struct file_operations nvme_dev_fops = {
> .owner = THIS_MODULE,
> .open = nvme_dev_open,
> .unlocked_ioctl = nvme_dev_ioctl,
> - .compat_ioctl = nvme_dev_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> static ssize_t nvme_sysfs_reset(struct device *dev,
> diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
> index e22766c79fe9..3a54b4b616e2 100644
> --- a/drivers/pci/switch/switchtec.c
> +++ b/drivers/pci/switch/switchtec.c
> @@ -1006,7 +1006,7 @@ static const struct file_operations switchtec_fops = {
> .read = switchtec_dev_read,
> .poll = switchtec_dev_poll,
> .unlocked_ioctl = switchtec_dev_ioctl,
> - .compat_ioctl = switchtec_dev_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> static void link_event_work(struct work_struct *work)
> diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> index 7b26b6ccf1a0..dded9cef42f4 100644
> --- a/drivers/platform/x86/wmi.c
> +++ b/drivers/platform/x86/wmi.c
> @@ -889,7 +889,7 @@ static const struct file_operations wmi_fops = {
> .read = wmi_char_read,
> .open = wmi_char_open,
> .unlocked_ioctl = wmi_ioctl,
> - .compat_ioctl = wmi_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> static int wmi_dev_probe(struct device *dev)
> diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c
> index eea5ebbb5119..507bfe163883 100644
> --- a/drivers/rpmsg/rpmsg_char.c
> +++ b/drivers/rpmsg/rpmsg_char.c
> @@ -290,7 +290,7 @@ static const struct file_operations rpmsg_eptdev_fops = {
> .write_iter = rpmsg_eptdev_write_iter,
> .poll = rpmsg_eptdev_poll,
> .unlocked_ioctl = rpmsg_eptdev_ioctl,
> - .compat_ioctl = rpmsg_eptdev_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> static ssize_t name_show(struct device *dev, struct device_attribute *attr,
> @@ -451,7 +451,7 @@ static const struct file_operations rpmsg_ctrldev_fops = {
> .open = rpmsg_ctrldev_open,
> .release = rpmsg_ctrldev_release,
> .unlocked_ioctl = rpmsg_ctrldev_ioctl,
> - .compat_ioctl = rpmsg_ctrldev_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> static void rpmsg_ctrldev_release_device(struct device *dev)
> diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c
> index a36e4cf1841d..c9f60656f54d 100644
> --- a/drivers/sbus/char/display7seg.c
> +++ b/drivers/sbus/char/display7seg.c
> @@ -155,7 +155,7 @@ static long d7s_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> static const struct file_operations d7s_fops = {
> .owner = THIS_MODULE,
> .unlocked_ioctl = d7s_ioctl,
> - .compat_ioctl = d7s_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> .open = d7s_open,
> .release = d7s_release,
> .llseek = noop_llseek,
> diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
> index 1a6e7224017c..dd2dfa85fc68 100644
> --- a/drivers/sbus/char/envctrl.c
> +++ b/drivers/sbus/char/envctrl.c
> @@ -714,9 +714,7 @@ static const struct file_operations envctrl_fops = {
> .owner = THIS_MODULE,
> .read = envctrl_read,
> .unlocked_ioctl = envctrl_ioctl,
> -#ifdef CONFIG_COMPAT
> - .compat_ioctl = envctrl_ioctl,
> -#endif
> + .compat_ioctl = compat_ptr_ioctl,
> .open = envctrl_open,
> .release = envctrl_release,
> .llseek = noop_llseek,
> diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
> index 2b1e0d503020..fb6444d0409c 100644
> --- a/drivers/scsi/3w-xxxx.c
> +++ b/drivers/scsi/3w-xxxx.c
> @@ -1049,9 +1049,7 @@ static int tw_chrdev_open(struct inode *inode, struct file *file)
> static const struct file_operations tw_fops = {
> .owner = THIS_MODULE,
> .unlocked_ioctl = tw_chrdev_ioctl,
> -#ifdef CONFIG_COMPAT
> - .compat_ioctl = tw_chrdev_ioctl,
> -#endif
> + .compat_ioctl = compat_ptr_ioctl,
> .open = tw_chrdev_open,
> .release = NULL,
> .llseek = noop_llseek,
> diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
> index 7096810fd222..e13d5de1d76e 100644
> --- a/drivers/scsi/cxlflash/main.c
> +++ b/drivers/scsi/cxlflash/main.c
> @@ -3589,7 +3589,7 @@ static const struct file_operations cxlflash_chr_fops = {
> .owner = THIS_MODULE,
> .open = cxlflash_chr_open,
> .unlocked_ioctl = cxlflash_chr_ioctl,
> - .compat_ioctl = cxlflash_chr_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> /**
> diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c
> index fdbda5c05aa0..80c5a235d193 100644
> --- a/drivers/scsi/esas2r/esas2r_main.c
> +++ b/drivers/scsi/esas2r/esas2r_main.c
> @@ -613,7 +613,7 @@ static int __init esas2r_init(void)
>
> /* Handle ioctl calls to "/proc/scsi/esas2r/ATTOnode" */
> static const struct file_operations esas2r_proc_fops = {
> - .compat_ioctl = esas2r_proc_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> .unlocked_ioctl = esas2r_proc_ioctl,
> };
>
> diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
> index e338d7a4f571..c0a1a1218c56 100644
> --- a/drivers/scsi/pmcraid.c
> +++ b/drivers/scsi/pmcraid.c
> @@ -3988,9 +3988,7 @@ static const struct file_operations pmcraid_fops = {
> .open = pmcraid_chr_open,
> .fasync = pmcraid_chr_fasync,
> .unlocked_ioctl = pmcraid_chr_ioctl,
> -#ifdef CONFIG_COMPAT
> - .compat_ioctl = pmcraid_chr_ioctl,
> -#endif
> + .compat_ioctl = compat_ptr_ioctl,
> .llseek = noop_llseek,
> };
>
> diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
> index 92c2914239e3..1663c163edca 100644
> --- a/drivers/staging/android/ion/ion.c
> +++ b/drivers/staging/android/ion/ion.c
> @@ -567,9 +567,7 @@ static long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
> static const struct file_operations ion_fops = {
> .owner = THIS_MODULE,
> .unlocked_ioctl = ion_ioctl,
> -#ifdef CONFIG_COMPAT
> - .compat_ioctl = ion_ioctl,
> -#endif
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> static int debug_shrink_set(void *data, u64 val)
> diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
> index 6a33aaa1a49f..fd0ea4dbcb91 100644
> --- a/drivers/staging/vme/devices/vme_user.c
> +++ b/drivers/staging/vme/devices/vme_user.c
> @@ -494,7 +494,7 @@ static const struct file_operations vme_user_fops = {
> .write = vme_user_write,
> .llseek = vme_user_llseek,
> .unlocked_ioctl = vme_user_unlocked_ioctl,
> - .compat_ioctl = vme_user_unlocked_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> .mmap = vme_user_mmap,
> };
>
> diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c
> index 17c64fccbb10..eb97acf09868 100644
> --- a/drivers/tee/tee_core.c
> +++ b/drivers/tee/tee_core.c
> @@ -684,7 +684,7 @@ static const struct file_operations tee_fops = {
> .open = tee_open,
> .release = tee_release,
> .unlocked_ioctl = tee_ioctl,
> - .compat_ioctl = tee_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> static void tee_release_device(struct device *dev)
> diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
> index 9e9caff905d5..d48c032580d0 100644
> --- a/drivers/usb/class/cdc-wdm.c
> +++ b/drivers/usb/class/cdc-wdm.c
> @@ -724,7 +724,7 @@ static const struct file_operations wdm_fops = {
> .release = wdm_release,
> .poll = wdm_poll,
> .unlocked_ioctl = wdm_ioctl,
> - .compat_ioctl = wdm_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> .llseek = noop_llseek,
> };
>
> diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
> index 4942122b2346..bbd0308b13f5 100644
> --- a/drivers/usb/class/usbtmc.c
> +++ b/drivers/usb/class/usbtmc.c
> @@ -2220,9 +2220,7 @@ static const struct file_operations fops = {
> .release = usbtmc_release,
> .flush = usbtmc_flush,
> .unlocked_ioctl = usbtmc_ioctl,
> -#ifdef CONFIG_COMPAT
> - .compat_ioctl = usbtmc_ioctl,
> -#endif
> + .compat_ioctl = compat_ptr_ioctl,
> .fasync = usbtmc_fasync,
> .poll = usbtmc_poll,
> .llseek = default_llseek,
> diff --git a/drivers/virt/fsl_hypervisor.c b/drivers/virt/fsl_hypervisor.c
> index 8ba726e600e9..fbf02bf60f62 100644
> --- a/drivers/virt/fsl_hypervisor.c
> +++ b/drivers/virt/fsl_hypervisor.c
> @@ -703,7 +703,7 @@ static const struct file_operations fsl_hv_fops = {
> .poll = fsl_hv_poll,
> .read = fsl_hv_read,
> .unlocked_ioctl = fsl_hv_ioctl,
> - .compat_ioctl = fsl_hv_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> static struct miscdevice fsl_hv_misc_dev = {
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 120e4340792a..162ea4b6b417 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -2307,7 +2307,7 @@ static const struct super_operations btrfs_super_ops = {
> static const struct file_operations btrfs_ctl_fops = {
> .open = btrfs_control_open,
> .unlocked_ioctl = btrfs_control_ioctl,
> - .compat_ioctl = btrfs_control_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> .owner = THIS_MODULE,
> .llseek = noop_llseek,
> };
> diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
> index 7c060cb22aa3..a493b957713f 100644
> --- a/fs/ceph/dir.c
> +++ b/fs/ceph/dir.c
> @@ -1785,7 +1785,7 @@ const struct file_operations ceph_dir_fops = {
> .open = ceph_open,
> .release = ceph_release,
> .unlocked_ioctl = ceph_ioctl,
> - .compat_ioctl = ceph_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> .fsync = ceph_fsync,
> .lock = ceph_lock,
> .flock = ceph_flock,
> diff --git a/fs/ceph/file.c b/fs/ceph/file.c
> index 9f53c3d99304..9b5fe7eee3c1 100644
> --- a/fs/ceph/file.c
> +++ b/fs/ceph/file.c
> @@ -2112,7 +2112,7 @@ const struct file_operations ceph_file_fops = {
> .splice_read = generic_file_splice_read,
> .splice_write = iter_file_splice_write,
> .unlocked_ioctl = ceph_ioctl,
> - .compat_ioctl = ceph_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> .fallocate = ceph_fallocate,
> .copy_file_range = ceph_copy_file_range,
> };
> diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
> index 9971a35cf1ef..dcdb26068b71 100644
> --- a/fs/fuse/dev.c
> +++ b/fs/fuse/dev.c
> @@ -2354,7 +2354,7 @@ const struct file_operations fuse_dev_operations = {
> .release = fuse_dev_release,
> .fasync = fuse_dev_fasync,
> .unlocked_ioctl = fuse_dev_ioctl,
> - .compat_ioctl = fuse_dev_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> };
> EXPORT_SYMBOL_GPL(fuse_dev_operations);
>
> diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
> index a90bb19dcfa2..a55aa029a308 100644
> --- a/fs/notify/fanotify/fanotify_user.c
> +++ b/fs/notify/fanotify/fanotify_user.c
> @@ -523,7 +523,7 @@ static const struct file_operations fanotify_fops = {
> .fasync = NULL,
> .release = fanotify_release,
> .unlocked_ioctl = fanotify_ioctl,
> - .compat_ioctl = fanotify_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> .llseek = noop_llseek,
> };
>
> diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
> index 89800fc7dc9d..f93dcf8c996f 100644
> --- a/fs/userfaultfd.c
> +++ b/fs/userfaultfd.c
> @@ -1901,7 +1901,7 @@ static const struct file_operations userfaultfd_fops = {
> .poll = userfaultfd_poll,
> .read = userfaultfd_read,
> .unlocked_ioctl = userfaultfd_ioctl,
> - .compat_ioctl = userfaultfd_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> .llseek = noop_llseek,
> };
>
> diff --git a/net/rfkill/core.c b/net/rfkill/core.c
> index abca57040f37..3b2f6ea44397 100644
> --- a/net/rfkill/core.c
> +++ b/net/rfkill/core.c
> @@ -1323,7 +1323,7 @@ static const struct file_operations rfkill_fops = {
> .release = rfkill_fop_release,
> #ifdef CONFIG_RFKILL_INPUT
> .unlocked_ioctl = rfkill_fop_ioctl,
> - .compat_ioctl = rfkill_fop_ioctl,
> + .compat_ioctl = compat_ptr_ioctl,
> #endif
> .llseek = no_llseek,
> };
Thanks,
Mauro
^ permalink raw reply
* Re: [PATCH v2 wireless-drivers-next] rtlwifi: rtl8723ae: Fix missing break in switch statement
From: Gustavo A. R. Silva @ 2019-04-25 14:27 UTC (permalink / raw)
To: Kalle Valo
Cc: Ping-Ke Shih, David S. Miller, Larry Finger, linux-wireless,
netdev, linux-kernel, Kees Cook
In-Reply-To: <87zhoewhll.fsf@kamboji.qca.qualcomm.com>
On 4/25/19 4:37 AM, Kalle Valo wrote:
> "Gustavo A. R. Silva" <gustavo@embeddedor.com> writes:
>
>> Hi all,
>>
>> Friendly ping:
>>
>> Who can take this?
>
> It's in my queue.
>
Awesome. :)
Thank you
--
Gustavo
^ permalink raw reply
* [PATCH] mt76: fix endianness sparse warnings
From: Ryder Lee @ 2019-04-25 14:42 UTC (permalink / raw)
To: Lorenzo Bianconi, Felix Fietkau
Cc: Roy Luo, Sean Wang, linux-wireless, linux-mediatek, linux-kernel,
Ryder Lee
Fix many warnings with incorrect endian assumptions.
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
index 2f2961ee0a92..af5769d05e6f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
@@ -627,7 +627,7 @@ mt7603_mac_fill_rx(struct mt7603_dev *dev, struct sk_buff *skb)
status->aggr = unicast &&
!ieee80211_is_qos_nullfunc(hdr->frame_control);
status->tid = *ieee80211_get_qos_ctl(hdr) & IEEE80211_QOS_CTL_TID_MASK;
- status->seqno = IEEE80211_SEQ_TO_SN(hdr->seq_ctrl);
+ status->seqno = IEEE80211_SEQ_TO_SN(__le16_to_cpu(hdr->seq_ctrl));
return 0;
}
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
index 1bf3e7b5f6a7..4b934b0f5a39 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
@@ -235,7 +235,7 @@ int mt7615_mac_fill_rx(struct mt7615_dev *dev, struct sk_buff *skb)
status->aggr = unicast &&
!ieee80211_is_qos_nullfunc(hdr->frame_control);
status->tid = *ieee80211_get_qos_ctl(hdr) & IEEE80211_QOS_CTL_TID_MASK;
- status->seqno = IEEE80211_SEQ_TO_SN(hdr->seq_ctrl);
+ status->seqno = IEEE80211_SEQ_TO_SN(__le16_to_cpu(hdr->seq_ctrl));
return 0;
}
@@ -337,7 +337,7 @@ int mt7615_mac_write_txwi(struct mt7615_dev *dev, __le32 *txwi,
struct ieee80211_vif *vif = info->control.vif;
int tx_count = 8;
u8 fc_type, fc_stype, p_fmt, q_idx, omac_idx = 0;
- u16 fc = le16_to_cpu(hdr->frame_control);
+ __le16 fc = hdr->frame_control;
u16 seqno = 0;
u32 val;
@@ -353,8 +353,8 @@ int mt7615_mac_write_txwi(struct mt7615_dev *dev, __le32 *txwi,
tx_count = msta->rate_count;
}
- fc_type = (fc & IEEE80211_FCTL_FTYPE) >> 2;
- fc_stype = (fc & IEEE80211_FCTL_STYPE) >> 4;
+ fc_type = (le16_to_cpu(fc) & IEEE80211_FCTL_FTYPE) >> 2;
+ fc_stype = (le16_to_cpu(fc) & IEEE80211_FCTL_STYPE) >> 4;
if (ieee80211_is_data(fc)) {
q_idx = skb_get_queue_mapping(skb);
@@ -468,7 +468,7 @@ void mt7615_txp_skb_unmap(struct mt76_dev *dev,
txp = (struct mt7615_txp *)(txwi + MT_TXD_SIZE);
for (i = 1; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]),
- le32_to_cpu(txp->len[i]), DMA_TO_DEVICE);
+ le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
}
int mt7615_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
@@ -506,7 +506,7 @@ int mt7615_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
txp = (struct mt7615_txp *)(txwi + MT_TXD_SIZE);
for (i = 0; i < nbuf; i++) {
txp->buf[i] = cpu_to_le32(tx_info->buf[i + 1].addr);
- txp->len[i] = cpu_to_le32(tx_info->buf[i + 1].len);
+ txp->len[i] = cpu_to_le16(tx_info->buf[i + 1].len);
}
txp->nbuf = nbuf;
--
2.18.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox