Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Sep 2012 01:58:47 +0100
From:      "Steven Hartland" <killing@multiplay.co.uk>
To:        <freebsd-stable@freebsd.org>
Subject:   Lock MFI config not exclusively locked - panic
Message-ID:  <F623D1F9C19F4D4DB525E9E0B2102B1A@multiplay.co.uk>

next in thread | raw e-mail | index | archive | help
I've been testing some enhancements to mfiutil so compiled
kernel in debug with:-
options INVARIANTS
options INVARIANT_SUPPORT
options DDB
options MFI_DEBUG

After doing that and running mfiutil to import a foreign
config I get a panic with:-
Lock MFI config not exclusively locked @ /usr/src/sys/dev/mfi/mfi.c:1001

Looking at the code this was trigged by the mfi_ldprobe from
mfi_check_command_post which doesn't do any locking.

Is the correct fix for this to wrap all the calls to mfi_ldprobe
with config and io lock as per mfi_startup e.g.
        sx_xlock(&sc->mfi_config_lock);
        mtx_lock(&sc->mfi_io_lock);
        mfi_ldprobe(sc);
        mtx_unlock(&sc->mfi_io_lock);
        sx_xunlock(&sc->mfi_config_lock);

    Regards
    Steve

================================================
This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 

In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
or return the E.mail to postmaster@multiplay.co.uk.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F623D1F9C19F4D4DB525E9E0B2102B1A>