Bug 255131 - kernel panic using zfs on shsec
Summary: kernel panic using zfs on shsec
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-16 19:55 UTC by nvass
Modified: 2021-04-16 19:55 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nvass 2021-04-16 19:55:51 UTC
Trying to use zfs on a shsec device will result to a kernel panic.

Use the following script to reproduce the problem:
#!/bin/sh
gshsec load
m0=`mdconfig -at swap -s 120M`
m1=`mdconfig -at swap -s 120M`
m2=`mdconfig -at swap -s 120M`

gshsec label secret1234 $m0 $m1 $m2
zpool create secret1234 /dev/shsec/secret1234



Panic message:
Unread portion of the kernel message buffer:
panic: non-NULL bp->data in g_io_request(cmd=5)
cpuid = 1
time = 1618601239
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0063abfa30
vpanic() at vpanic+0x181/frame 0xfffffe0063abfa80
panic() at panic+0x43/frame 0xfffffe0063abfae0
g_io_request() at g_io_request+0x365/frame 0xfffffe0063abfb10
g_shsec_start() at g_shsec_start+0x1db/frame 0xfffffe0063abfb70
g_io_schedule_down() at g_io_schedule_down+0x134/frame 0xfffffe0063abfba0
g_down_procbody() at g_down_procbody+0x5c/frame 0xfffffe0063abfbb0
fork_exit() at fork_exit+0x80/frame 0xfffffe0063abfbf0
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0063abfbf0
--- trap 0, rip = 0, rsp = 0, rbp = 0 ---
KDB: enter: panic