Bug 218167 - ctl(4): calling _callout_stop_safe with the following non-sleepable locks held
Summary: ctl(4): calling _callout_stop_safe with the following non-sleepable locks held
Status: Closed FIXED
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: 2017-03-27 17:25 UTC by Ed Maste
Modified: 2017-05-08 22:25 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2017-03-27 17:25:20 UTC
While exploring cfumass(4) I received a warning, using a recent SD card snapshot.

Uname:

FreeBSD beaglebone 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r315864: Thu Mar 23 22:59:22 UTC 2017     root@releng3.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/BEAGLEBONE  arm

Warning:

root@beaglebone:~ # ctladm create -b block -o file=/data/target0
ctladm: LUN creation warning: error opening /data/target0: 2
LUN created successfully
backend:       block
device type:   0
LUN size:      0 bytes
blocksize      512 bytes
LUN ID:        0
Serial Number: MYSERIAL   0
Device ID;     MYDEVID   0
root@beaglebone:~ # ctladm remove -b block -l 0
calling _callout_stop_safe with the following non-sleepable locks held:
exclusive sleep mutex CTL mutex (CTL mutex) r = 0 (0xc36bd000) locked @ /usr/src/sys/cam/ctl/ctl.c:5030
stack backtrace:
LUN 0 removed successfully
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-04-24 12:53:38 UTC
A commit references this bug:

Author: mav
Date: Mon Apr 24 12:52:42 UTC 2017
New revision: 317370
URL: https://svnweb.freebsd.org/changeset/base/317370

Log:
  Change ctl_free_lun() locking.

  This fixes potential callout_drain() sleep under non-sleepable lock.

  PR:		218167
  MFC after:	2 weeks

Changes:
  head/sys/cam/ctl/ctl.c
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-05-08 22:25:39 UTC
A commit references this bug:

Author: mav
Date: Mon May  8 22:24:07 UTC 2017
New revision: 317988
URL: https://svnweb.freebsd.org/changeset/base/317988

Log:
  MFC r317370: Change ctl_free_lun() locking.

  This fixes potential callout_drain() sleep under non-sleepable lock.

  PR:		218167

Changes:
_U  stable/11/
  stable/11/sys/cam/ctl/ctl.c