Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
3
-
9223372036854775807
Description
if target is read-only for a reason, then lfs migrate just crashes because open RPC is non-replayable and has no och_mod:
och = ll_lease_open(child_inode, NULL, FMODE_WRITE, 0);
if (IS_ERR(och)) {
rc = PTR_ERR(och);
och = NULL;
GOTO(out_unlock, rc);
}
...
spin_lock(&och->och_mod->mod_open_req->rq_lock);
och->och_mod->mod_open_req->rq_replay = 0;
spin_unlock(&och->och_mod->mod_open_req->rq_lock);
so the oops:
[ 33.411902] BUG: kernel NULL pointer dereference, address: 0000000000000008 [ 33.411904] #PF: supervisor read access in kernel mode [ 33.411905] #PF: error_code(0x0000) - not-present page [ 33.411906] PGD 15d35e067 P4D 15d35e067 PUD 134034067 PMD 0 [ 33.411908] Oops: 0000 [#1] SMP [ 33.411910] CPU: 3 PID: 7660 Comm: lfs Tainted: G W O ------- --- 5.14.0 #1 [ 33.411912] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-1.fc38 04/01/2014 [ 33.411912] RIP: 0010:ll_migrate+0xc4f/0xdf0 [lustre] [ 33.411941] Code: 03 49 89 46 50 48 8b 45 c0 49 89 86 28 01 00 00 48 8b 43 20 41 81 8e 20 01 00 00 00 20 00 00 49 89 86 30 01 00 00 48 8b 43 18 <48> 8b 78 08 48 83 c7 18 e8 04 6c 72 dd 48 8b 43 18 48 8b 40 08 80 [ 33.411942] RSP: 0018:ffff9af1859a7c90 EFLAGS: 00010206 [ 33.411943] RAX: 0000000000000000 RBX: ffff9af1738db800 RCX: 0000000000000000 [ 33.411944] RDX: 00000000000008bc RSI: ffffffffc00600fe RDI: ffff9af14170e240 [ 33.411945] RBP: ffff9af1859a7d00 R08: 0000000000000240 R09: 00000000000008ef [ 33.411945] R10: ffff9af1859a7c58 R11: ffff9af1aff358ed R12: ffff9af1852d7e40 [ 33.411946] R13: 0000000000000000 R14: ffff9af1728c2c00 R15: ffff9af173f872b8 [ 33.411948] FS: 00007f725a7c5440(0000) GS:ffff9af2b0580000(0000) knlGS:0000000000000000 [ 33.411951] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 33.411952] CR2: 0000000000000008 CR3: 0000000136c28000 CR4: 0000000000350ea0 [ 33.411952] Call Trace: [ 33.411954] <TASK> [ 33.411955] ? __die_body+0x15/0x60 [ 33.411959] ? page_fault_oops+0x65/0x140 [ 33.411961] ? exc_page_fault+0x6a/0x230 [ 33.411964] ? asm_exc_page_fault+0x22/0x30 [ 33.411967] ? libcfs_debug_msg+0xa0e/0xcd0 [libcfs] [ 33.411973] ? ll_migrate+0xc4f/0xdf0 [lustre] [ 33.411988] ll_dir_ioctl+0x1d3a/0x7940 [lustre]