Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change "M" to "N" #318

Open
wants to merge 1 commit into
base: master
from
Open

Change "M" to "N" #318

wants to merge 1 commit into from

Conversation

@appins
Copy link

appins commented Sep 3, 2016

Someone accidentally hit M I think

@samangh
Copy link

samangh commented Sep 6, 2016

This repo is mirror-only, nothing will be accepted here for legitimate reasons. See:

#17 (comment)

I don't do github pull requests.

github throws away all the relevant information, like having even a
valid email address for the person asking me to pull. The diffstat is
also deficient and useless.

Git comes with a nice pull-request generation module, but github
instead decided to replace it with their own totally inferior version.
As a result, I consider github useless for these kinds of things. It's
fine for hosting, but the pull requests and the online commit
editing, are just pure garbage.

I've told github people about my concerns, they didn't think they
mattered, so I gave up. Feel free to make a bugreport to github.

Linus
@AraHaan
Copy link

AraHaan commented Sep 19, 2016

Well how to make a bug report when the issues Tab is not set on the Repo. consider Setting it up with 1 check in the Repo's settings.

Also I like the Linux Kernel but the only thing bad with it is that it does not have a simple way to connecting to the Internet just by simply clicking on the Internet Router Name and entering a password to automatically resolve all of the harder settings like windows does. Until that is taken cared of I am sticking to Windows 7 Ultimate x64.

Also I do not like how you cannot install python 3.4.2, 3.4.3, 3.4.4, 3.4.5, 3.5.0, 3.5.1, or even 3.5.2 without them overwriting eachother if it was possible to install all of those versions of that interpreter like you can on windows it would simplify my project's zip making without having to install python to those pecific versions just to build my zip files. So as such if they named everything with the python{0.major}.{0.minor}.{0.micro} for all of those versions of the interpreter including their standard library it would resolve this issue. But for now I am not amused (I would have to hack into the interpreter code to find the lines to change for the interpreter to read the things including it's stanard library right). But Yeah I would alert the Python devs they should do this in case people want to install multiple copies of the same version (3.5.x or even 3.6.x) without overwriting it all. (Like what can be done in Windows)

Also Linux that I currently have seems to ship by default with python 2.7.x I recommend only forcing it to ship with 3.5.x to favor asyncio. (For coroutines)

@DmitryHetman
Copy link

DmitryHetman commented Oct 1, 2016

Install Gentoo, here you can have all python versions at the same time.

@battlesnake
Copy link

battlesnake commented Nov 15, 2016

Python 3.5 as default would break tonnes of install scripts, there's stuff like virtualenv for dealing with multiple versions

@battlesnake
Copy link

battlesnake commented Nov 15, 2016

Also, I'm not sure what Python or UI for connecting to routers has to do with the kernel....

@xuhdev
Copy link
Contributor

xuhdev commented Nov 28, 2016

@AraHaan Are you really talking about the kernel? Check out here.

fengguang pushed a commit to 0day-ci/linux that referenced this pull request Jan 31, 2017
As warned by checkpatch:

	WARNING: struct of_device_id should normally be const
	torvalds#318: FILE: drivers/media/platform/coda/imx-vdoa.c:318:
	+static struct of_device_id vdoa_dt_ids[] = {

So, constify structs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Feb 8, 2017
As warned by checkpatch:

	WARNING: struct of_device_id should normally be const
	torvalds#318: FILE: drivers/media/platform/coda/imx-vdoa.c:318:
	+static struct of_device_id vdoa_dt_ids[] = {

So, constify structs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
laijs pushed a commit to laijs/linux that referenced this pull request Feb 14, 2017
otavio added a commit to Freescale/linux-fslc that referenced this pull request Mar 15, 2017
As warned by checkpatch:

	WARNING: struct of_device_id should normally be const
	torvalds#318: FILE: drivers/media/platform/coda/imx-vdoa.c:318:
	+static struct of_device_id vdoa_dt_ids[] = {

So, constify structs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 126f52b)
otavio added a commit to Freescale/linux-fslc that referenced this pull request Mar 15, 2017
As warned by checkpatch:

	WARNING: struct of_device_id should normally be const
	torvalds#318: FILE: drivers/media/platform/coda/imx-vdoa.c:318:
	+static struct of_device_id vdoa_dt_ids[] = {

So, constify structs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit d2fe28f)
otavio added a commit to Freescale/linux-fslc that referenced this pull request Mar 22, 2017
As warned by checkpatch:

	WARNING: struct of_device_id should normally be const
	torvalds#318: FILE: drivers/media/platform/coda/imx-vdoa.c:318:
	+static struct of_device_id vdoa_dt_ids[] = {

So, constify structs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 126f52b)
otavio added a commit to Freescale/linux-fslc that referenced this pull request Mar 22, 2017
As warned by checkpatch:

	WARNING: struct of_device_id should normally be const
	torvalds#318: FILE: drivers/media/platform/coda/imx-vdoa.c:318:
	+static struct of_device_id vdoa_dt_ids[] = {

So, constify structs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit d2fe28f)
otavio added a commit to Freescale/linux-fslc that referenced this pull request Mar 27, 2017
As warned by checkpatch:

	WARNING: struct of_device_id should normally be const
	torvalds#318: FILE: drivers/media/platform/coda/imx-vdoa.c:318:
	+static struct of_device_id vdoa_dt_ids[] = {

So, constify structs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 126f52b)
otavio added a commit to Freescale/linux-fslc that referenced this pull request Mar 27, 2017
As warned by checkpatch:

	WARNING: struct of_device_id should normally be const
	torvalds#318: FILE: drivers/media/platform/coda/imx-vdoa.c:318:
	+static struct of_device_id vdoa_dt_ids[] = {

So, constify structs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit d2fe28f)
otavio added a commit to Freescale/linux-fslc that referenced this pull request Apr 10, 2017
As warned by checkpatch:

	WARNING: struct of_device_id should normally be const
	torvalds#318: FILE: drivers/media/platform/coda/imx-vdoa.c:318:
	+static struct of_device_id vdoa_dt_ids[] = {

So, constify structs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 126f52b)
otavio added a commit to Freescale/linux-fslc that referenced this pull request Apr 10, 2017
As warned by checkpatch:

	WARNING: struct of_device_id should normally be const
	torvalds#318: FILE: drivers/media/platform/coda/imx-vdoa.c:318:
	+static struct of_device_id vdoa_dt_ids[] = {

So, constify structs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit d2fe28f)
aleksander0m added a commit to aleksander0m/linux that referenced this pull request Jul 11, 2017
As warned by checkpatch:

	WARNING: struct of_device_id should normally be const
	torvalds#318: FILE: drivers/media/platform/coda/imx-vdoa.c:318:
	+static struct of_device_id vdoa_dt_ids[] = {

So, constify structs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 126f52b)
aleksander0m added a commit to aleksander0m/linux that referenced this pull request Jul 11, 2017
As warned by checkpatch:

	WARNING: struct of_device_id should normally be const
	torvalds#318: FILE: drivers/media/platform/coda/imx-vdoa.c:318:
	+static struct of_device_id vdoa_dt_ids[] = {

So, constify structs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit d2fe28f)
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Jan 27, 2020
This patch fixes a several locking problem.

1. netdevsim basic operations(new_device, del_device, new_port,
and del_port) are called with sysfs.
These operations use the same resource so they should acquire a lock for
the whole resource not only for a list.
2. devices are managed by nsim_bus_dev_list. and all devices are deleted
in the __exit() routine. After delete routine, new_device() and
del_device() should be disallowed. So, the global flag variable 'enable'
is added.
3. new_port() and del_port() would be called before resources are
allocated or initialized. If so, panic will occur.
In order to avoid this scenario, variable 'nsim_bus_dev->init' is added.

Test commands:
    #SHELL1
    modprobe netdevsim
    while :
    do
        echo "1 1" > /sys/bus/netdevsim/new_device
        echo "1 1" > /sys/bus/netdevsim/del_device
    done

    #SHELL2
    while :
    do
        echo 1 > /sys/devices/netdevsim1/new_port
        echo 1 > /sys/devices/netdevsim1/del_port
    done

Splat looks like:
[   66.648015][ T1095] kasan: CONFIG_KASAN_INLINE enabled
[   66.660685][ T1095] kasan: GPF could be caused by NULL-ptr deref or user memory access
[   66.662106][ T1095] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI
[   66.663151][ T1095] CPU: 0 PID: 1095 Comm: bash Not tainted 5.5.0-rc6+ torvalds#318
[   66.664046][ T1095] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
[   66.665308][ T1095] RIP: 0010:__mutex_lock+0x10a/0x14b0
[   66.666056][ T1095] Code: 08 84 d2 0f 85 7f 12 00 00 44 8b 0d 70 c4 66 02 45 85 c9 75 29 49 8d 7f 68 48 b8 00 f
[   66.670158][ T1095] RSP: 0018:ffff8880d36efbb0 EFLAGS: 00010206
[   66.672254][ T1095] RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
[   66.673392][ T1095] RDX: 0000000000000021 RSI: ffffffffbb922ac0 RDI: 0000000000000108
[   66.674563][ T1095] RBP: ffff8880d36efd30 R08: ffffffffc033ead0 R09: 0000000000000000
[   66.675731][ T1095] R10: ffff8880d36efd50 R11: ffff8880ca1f8040 R12: 0000000000000000
[   66.676897][ T1095] R13: dffffc0000000000 R14: ffffffffbd17a7c0 R15: 00000000000000a0
[   66.678005][ T1095] FS:  00007fe4a170f740(0000) GS:ffff8880d9c00000(0000) knlGS:0000000000000000
[   66.679101][ T1095] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   66.679906][ T1095] CR2: 000055fa392f7ca0 CR3: 00000000b136a003 CR4: 00000000000606f0
[   66.681467][ T1095] Call Trace:
[   66.681899][ T1095]  ? nsim_dev_port_add+0x50/0x150 [netdevsim]
[   66.682681][ T1095]  ? mutex_lock_io_nested+0x1380/0x1380
[   66.683371][ T1095]  ? _kstrtoull+0x76/0x160
[   66.683819][ T1095]  ? _parse_integer+0xf0/0xf0
[   66.684324][ T1095]  ? kernfs_fop_write+0x1cf/0x410
[   66.684861][ T1095]  ? sysfs_file_ops+0x160/0x160
[   66.687441][ T1095]  ? kstrtouint+0x86/0x110
[   66.687961][ T1095]  ? nsim_dev_port_add+0x50/0x150 [netdevsim]
[   66.688646][ T1095]  nsim_dev_port_add+0x50/0x150 [netdevsim]
[   66.689269][ T1095]  ? sysfs_file_ops+0x160/0x160
[   66.690547][ T1095]  new_port_store+0x99/0xb0 [netdevsim]
[   66.691114][ T1095]  ? del_port_store+0xb0/0xb0 [netdevsim]
[   66.691699][ T1095]  ? sysfs_file_ops+0x112/0x160
[   66.692193][ T1095]  ? sysfs_kf_write+0x3b/0x180
[   66.692677][ T1095]  kernfs_fop_write+0x276/0x410
[   66.693176][ T1095]  ? __sb_start_write+0x215/0x2e0
[   66.693695][ T1095]  vfs_write+0x197/0x4a0
[   66.694136][ T1095]  ksys_write+0x141/0x1d0
[ ... ]

Fixes: f9d9db4 ("netdevsim: add bus attributes to add new and delete devices")
Fixes: 794b2c0 ("netdevsim: extend device attrs to support port addition and deletion")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Jan 27, 2020
devlink reload destroys resources and allocates resources again.
So, when devices and ports resources are being used, devlink reload
function should not be executed. In order to avoid this race, a new
lock is added and new_port() and del_port() call devlink_reload_disable()
and devlink_reload_enable().

Thread0                      Thread1
{new/del}_port()             {new/del}_port()
devlink_reload_disable()
                             devlink_reload_disable()
devlink_reload_enable()      //here
                             devlink_reload_enable()

Before Thread1's devlink_reload_enable(), the devlink is already allowed
to execute reload because Thread0 allows it. devlink reload disable/enable
variable type is bool. So the above case would exist.
So, disable/enable should be executed atomically.
In order to do that, a new lock is used.

Test commands:
    modprobe netdevsim
    echo 1 > /sys/bus/netdevsim/new_device

    while :
    do
        echo 1 > /sys/devices/netdevsim1/new_port &
        echo 1 > /sys/devices/netdevsim1/del_port &
        devlink dev reload netdevsim/netdevsim1 &
    done

Splat looks like:
[ 1067.313531][ T1480] kernel BUG at lib/list_debug.c:53!
[ 1067.314519][ T1480] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI
[ 1067.315948][ T1480] CPU: 3 PID: 1480 Comm: bash Tainted: G        W         5.5.0-rc6+ torvalds#318
[ 1067.326082][ T1480] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
[ 1067.356308][ T1480] RIP: 0010:__list_del_entry_valid+0xe6/0x150
[ 1067.357006][ T1480] Code: 89 ea 48 c7 c7 a0 64 1e 9f e8 7f 5b 4d ff 0f 0b 48 c7 c7 00 65 1e 9f e8 71 5b 4d ff 4
[ 1067.395359][ T1480] RSP: 0018:ffff8880a316fb58 EFLAGS: 00010282
[ 1067.396016][ T1480] RAX: 0000000000000054 RBX: ffff8880c0e76718 RCX: 0000000000000000
[ 1067.402370][ T1480] RDX: 0000000000000054 RSI: 0000000000000008 RDI: ffffed101462df61
[ 1067.430844][ T1480] RBP: ffff8880a31bfca0 R08: ffffed101b5404f9 R09: ffffed101b5404f9
[ 1067.432165][ T1480] R10: 0000000000000001 R11: ffffed101b5404f8 R12: ffff8880a316fcb0
[ 1067.433526][ T1480] R13: ffff8880a310d440 R14: ffffffffa117a7c0 R15: ffff8880c0e766c0
[ 1067.435818][ T1480] FS:  00007f001c026740(0000) GS:ffff8880da800000(0000) knlGS:0000000000000000
[ 1067.441677][ T1480] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1067.451305][ T1480] CR2: 00007f001afb7180 CR3: 00000000a3170003 CR4: 00000000000606e0
[ 1067.453416][ T1480] Call Trace:
[ 1067.453832][ T1480]  mutex_remove_waiter+0x101/0x520
[ 1067.455949][ T1480]  __mutex_lock+0xac7/0x14b0
[ 1067.456880][ T1480]  ? nsim_dev_port_add+0x50/0x150 [netdevsim]
[ 1067.458946][ T1480]  ? mutex_lock_io_nested+0x1380/0x1380
[ 1067.460614][ T1480]  ? _parse_integer+0xf0/0xf0
[ 1067.472498][ T1480]  ? kstrtouint+0x86/0x110
[ 1067.473327][ T1480]  ? nsim_dev_port_add+0x50/0x150 [netdevsim]
[ 1067.474187][ T1480]  nsim_dev_port_add+0x50/0x150 [netdevsim]
[ 1067.474980][ T1480]  new_port_store+0xc4/0xf0 [netdevsim]
[ 1067.475717][ T1480]  ? del_port_store+0xf0/0xf0 [netdevsim]
[ 1067.476478][ T1480]  ? sysfs_kf_write+0x3b/0x180
[ 1067.477106][ T1480]  ? sysfs_file_ops+0x160/0x160
[ 1067.477744][ T1480]  kernfs_fop_write+0x276/0x410
[ ... ]

Fixes: 4418f86 ("netdevsim: implement support for devlink region and snapshots")
Fixes: 75ba029 ("netdevsim: implement proper devlink reload")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Jan 27, 2020
When netdevsim dev is being created, a debugfs directory is created.
The variable "dev_ddir_name" is 16bytes device name pointer and device
name is "netdevsim<dev id>".
The maximum dev id length is 10.
So, 16bytes for device name isn't enough.

Test commands:
    modprobe netdevsim
    echo "1000000000 0" > /sys/bus/netdevsim/new_device

Splat looks like:
[  362.229174][  T889] BUG: KASAN: stack-out-of-bounds in number+0x824/0x880
[  362.230221][  T889] Write of size 1 at addr ffff8880c1def988 by task bash/889
[  362.231541][  T889]
[  362.232116][  T889] CPU: 2 PID: 889 Comm: bash Not tainted 5.5.0-rc6+ torvalds#318
[  362.233233][  T889] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
[  362.237316][  T889] Call Trace:
[  362.237790][  T889]  dump_stack+0x96/0xdb
[  362.238471][  T889]  ? number+0x824/0x880
[  362.239137][  T889]  print_address_description.constprop.5+0x1be/0x360
[  362.240166][  T889]  ? number+0x824/0x880
[  362.240782][  T889]  ? number+0x824/0x880
[  362.254907][  T889]  __kasan_report+0x12a/0x16f
[  362.276693][  T889]  ? number+0x824/0x880
[  362.284345][  T889]  kasan_report+0xe/0x20
[  362.291523][  T889]  number+0x824/0x880
[  362.305981][  T889]  ? put_dec+0xa0/0xa0
[  362.306583][  T889]  ? rcu_read_lock_sched_held+0x90/0xc0
[  362.307779][  T889]  vsnprintf+0x63c/0x10b0
[  362.308440][  T889]  ? pointer+0x5b0/0x5b0
[  362.309068][  T889]  ? mark_lock+0x11d/0xc40
[  362.309740][  T889]  sprintf+0x9b/0xd0
[  362.327152][  T889]  ? scnprintf+0xe0/0xe0
[  362.327888][  T889]  nsim_dev_probe+0x63c/0xbf0 [netdevsim]
[  362.328882][  T889]  ? kernfs_next_descendant_post+0x11d/0x250
[  362.331521][  T889]  ? nsim_dev_reload_up+0x500/0x500 [netdevsim]
[  362.333054][  T889]  ? kernfs_add_one+0x2c6/0x410
[  362.334145][  T889]  ? kernfs_get.part.12+0x4c/0x60
[  362.335181][  T889]  ? kernfs_put+0x29/0x4b0
[  362.335814][  T889]  ? kernfs_create_link+0x170/0x230
[  362.336600][  T889]  ? sysfs_do_create_link_sd.isra.2+0x87/0xf0
[  362.338118][  T889]  really_probe+0x4b2/0xb50
[  362.338789][  T889]  ? driver_allows_async_probing+0x110/0x110
[  362.340055][  T889]  driver_probe_device+0x24d/0x370
[  362.349864][  T889]  ? __device_attach_driver+0xae/0x210
[  362.364057][  T889]  ? driver_allows_async_probing+0x110/0x110
[  362.367598][  T889]  bus_for_each_drv+0x10f/0x190
[  362.371583][  T889]  ? bus_rescan_devices+0x20/0x20
[  362.372524][  T889]  ? mutex_lock_io_nested+0x1380/0x1380
[  362.374546][  T889]  __device_attach+0x1b1/0x2d0
[  362.376621][  T889]  ? device_bind_driver+0xa0/0xa0
[  362.378889][  T889]  ? wait_for_completion+0x390/0x390
[  362.379727][  T889]  bus_probe_device+0x1a7/0x250
[  362.380635][  T889]  device_add+0x1101/0x1900
[  362.381590][  T889]  ? memset+0x1f/0x40
[  362.382409][  T889]  ? lockdep_init_map+0x10c/0x630
[  362.383701][  T889]  ? device_link_remove+0x120/0x120
[  362.386953][  T889]  ? lockdep_init_map+0x10c/0x630
[  362.387656][  T889]  ? __init_waitqueue_head+0x3a/0x90
[  362.388868][  T889]  new_device_store+0x277/0x4c0 [netdevsim]
[  362.389822][  T889]  ? del_port_store+0x160/0x160 [netdevsim]
[ ... ]

Fixes: ab1d0cc ("netdevsim: change debugfs tree topology")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
torvalds pushed a commit that referenced this pull request Apr 17, 2020
When running liburing test case 'accept', I got below warning:
RED: Invalid credentials
RED: At include/linux/cred.h:285
RED: Specified credentials: 00000000d02474a0
RED: ->magic=4b, put_addr=000000005b4f46e9
RED: ->usage=-1699227648, subscr=-25693
RED: ->*uid = { 256,-25693,-25693,65534 }
RED: ->*gid = { 0,-1925859360,-1789740800,-1827028688 }
RED: ->security is 00000000258c136e
eneral protection fault, probably for non-canonical address 0xdead4ead00000000: 0000 [#1] SMP PTI
PU: 21 PID: 2037 Comm: accept Not tainted 5.6.0+ #318
ardware name: QEMU Standard PC (i440FX + PIIX, 1996),
BIOS rel-1.11.1-0-g0551a4be2c-prebuilt.qemu-project.org 04/01/2014
IP: 0010:dump_invalid_creds+0x16f/0x184
ode: 48 8b 83 88 00 00 00 48 3d ff 0f 00 00 76 29 48 89 c2 81 e2 00 ff ff ff 48
81 fa 00 6b 6b 6b 74 17 5b 48 c7 c7 4b b1 10 8e 5d <8b> 50 04 41 5c 8b 30 41 5d
e9 67 e3 04 00 5b 5d 41 5c 41 5d c3 0f
SP: 0018:ffffacc1039dfb38 EFLAGS: 00010087
AX: dead4ead00000000 RBX: ffff9ba39319c100 RCX: 0000000000000007
DX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff8e10b14b
BP: ffffffff8e108476 R08: 0000000000000000 R09: 0000000000000001
10: 0000000000000000 R11: ffffacc1039df9e5 R12: 000000009552b900
13: 000000009319c130 R14: ffff9ba39319c100 R15: 0000000000000246
S:  00007f96b2bfc4c0(0000) GS:ffff9ba39f340000(0000) knlGS:0000000000000000
S:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
R2: 0000000000401870 CR3: 00000007db7a4000 CR4: 00000000000006e0
all Trace:
__invalid_creds+0x48/0x4a
__io_req_aux_free+0x2e8/0x3b0
? io_poll_remove_one+0x2a/0x1d0
__io_free_req+0x18/0x200
io_free_req+0x31/0x350
io_poll_remove_one+0x17f/0x1d0
io_poll_cancel.isra.80+0x6c/0x80
io_async_find_and_cancel+0x111/0x120
io_issue_sqe+0x181/0x10e0
? __lock_acquire+0x552/0xae0
? lock_acquire+0x8e/0x310
? fs_reclaim_acquire.part.97+0x5/0x30
__io_queue_sqe.part.100+0xc4/0x580
? io_submit_sqes+0x751/0xbd0
? rcu_read_lock_sched_held+0x32/0x40
io_submit_sqes+0x9ba/0xbd0
? __x64_sys_io_uring_enter+0x2b2/0x460
? __x64_sys_io_uring_enter+0xaf/0x460
? find_held_lock+0x2d/0x90
? __x64_sys_io_uring_enter+0x111/0x460
__x64_sys_io_uring_enter+0x2d7/0x460
do_syscall_64+0x5a/0x230
entry_SYSCALL_64_after_hwframe+0x49/0xb3

After looking into codes, it turns out that this issue is because we didn't
restore the req->work, which is changed in io_arm_poll_handler(), req->work
is a union with below struct:
	struct {
		struct callback_head	task_work;
		struct hlist_node	hash_node;
		struct async_poll	*apoll;
	};
If we forget to restore, members in struct io_wq_work would be invalid,
restore the req->work to fix this issue.

Signed-off-by: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>

Get rid of not needed 'need_restore' variable.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.