Skip to content

DLPX-91889 scsi: target: iscsi: Handle abort for WRITE_PENDING cmds #40

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

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

pcd1193182
Copy link
Contributor

@pcd1193182 pcd1193182 commented Aug 9, 2024

To quote the upstream patch notes:

Sometimes an initiator does not send data for a WRITE command and tries to abort it.
The abort hangs waiting for frontend driver completion. iSCSI driver waits for data and
that timeout eventually initiates connection reinstatment. The connection closing
releases the commands in the connection, but those aborted commands still did not
handle the abort and did not decrease a command ref counter. Because of that the
connection reinstatement hangs indefinitely and prevents re-login for that initiator.

Add handling in TCM of the abort for the WRITE_PENDING commands at connection
closing moment to make it possible to release them.

No additional testing was performed on this patch aside from running it through ab-pre-push, because the customer's issue is difficult to reproduce. However, the patch is small and relatively easy to understand, and to the best of my knowledge it should fix the customer's issue without breaking other flows.

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
[mnc: Rebase and expand comment]
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
@pcd1193182 pcd1193182 merged commit 0a3a298 into delphix:develop Aug 9, 2024
2 of 3 checks passed
delphix-devops-bot pushed a commit that referenced this pull request Aug 22, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Aug 23, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
prakashsurya pushed a commit that referenced this pull request Sep 23, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
palash-gandhi pushed a commit that referenced this pull request Oct 16, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Oct 20, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Nov 10, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Nov 20, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Dec 20, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Dec 21, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Dec 22, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Dec 23, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Dec 24, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Dec 25, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Dec 27, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Dec 28, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Dec 29, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Dec 30, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Dec 31, 2024
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Jan 1, 2025
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Jan 2, 2025
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Jan 3, 2025
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Jan 4, 2025
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Jan 5, 2025
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Jan 6, 2025
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Jan 7, 2025
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Jan 30, 2025
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Jan 31, 2025
)

Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Co-authored-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
delphix-devops-bot pushed a commit that referenced this pull request Mar 6, 2025
BugLink: https://bugs.launchpad.net/bugs/2089272

[ Upstream commit 60f07e2 ]

We use uprobe in aarch64_be, which we found the tracee task would exit
due to SIGILL when we enable the uprobe trace.
We can see the replace inst from uprobe is not correct in aarch big-endian.
As in Armv8-A, instruction fetches are always treated as little-endian,
we should treat the UPROBE_SWBP_INSN as little-endian。

The test case is as following。
bash-4.4# ./mqueue_test_aarchbe 1 1 2 1 10 > /dev/null &
bash-4.4# cd /sys/kernel/debug/tracing/
bash-4.4# echo 'p:test /mqueue_test_aarchbe:0xc30 %x0 %x1' > uprobe_events
bash-4.4# echo 1 > events/uprobes/enable
bash-4.4#
bash-4.4# ps
  PID TTY          TIME CMD
  140 ?        00:00:01 bash
  237 ?        00:00:00 ps
[1]+  Illegal instruction     ./mqueue_test_aarchbe 1 1 2 1 100 > /dev/null

which we debug use gdb as following:

bash-4.4# gdb attach 155
(gdb) disassemble send
Dump of assembler code for function send:
   0x0000000000400c30 <+0>:     .inst   0xa00020d4 ; undefined
   0x0000000000400c34 <+4>:     mov     x29, sp
   0x0000000000400c38 <+8>:     str     w0, [sp, #28]
   0x0000000000400c3c <+12>:    strb    w1, [sp, #27]
   0x0000000000400c40 <+16>:    str     xzr, [sp, #40]
   0x0000000000400c44 <+20>:    str     xzr, [sp, #48]
   0x0000000000400c48 <+24>:    add     x0, sp, #0x1b
   0x0000000000400c4c <+28>:    mov     w3, #0x0                 // #0
   0x0000000000400c50 <+32>:    mov     x2, #0x1                 // #1
   0x0000000000400c54 <+36>:    mov     x1, x0
   0x0000000000400c58 <+40>:    ldr     w0, [sp, #28]
   0x0000000000400c5c <+44>:    bl      0x405e10 <mq_send>
   0x0000000000400c60 <+48>:    str     w0, [sp, #60]
   0x0000000000400c64 <+52>:    ldr     w0, [sp, #60]
   0x0000000000400c68 <+56>:    ldp     x29, x30, [sp], #64
   0x0000000000400c6c <+60>:    ret
End of assembler dump.
(gdb) info b
No breakpoints or watchpoints.
(gdb) c
Continuing.

Program received signal SIGILL, Illegal instruction.
0x0000000000400c30 in send ()
(gdb) x/10x 0x400c30
0x400c30 <send>:    0xd42000a0   0xfd030091      0xe01f00b9      0xe16f0039
0x400c40 <send+16>: 0xff1700f9   0xff1b00f9      0xe06f0091      0x03008052
0x400c50 <send+32>: 0x220080d2   0xe10300aa
(gdb) disassemble 0x400c30
Dump of assembler code for function send:
=> 0x0000000000400c30 <+0>:     .inst   0xa00020d4 ; undefined
   0x0000000000400c34 <+4>:     mov     x29, sp
   0x0000000000400c38 <+8>:     str     w0, [sp, #28]
   0x0000000000400c3c <+12>:    strb    w1, [sp, #27]
   0x0000000000400c40 <+16>:    str     xzr, [sp, #40]

Signed-off-by: junhua huang <huang.junhua@zte.com.cn>
Link: https://lore.kernel.org/r/202212021511106844809@zte.com.cn
Signed-off-by: Will Deacon <will@kernel.org>
Stable-dep-of: 13f8f1e05f1d ("arm64: probes: Fix uprobes for big-endian kernels")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com>
Signed-off-by: Mehmet Basaran <mehmet.basaran@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants