Skip to content
Commit 65c054f2 authored by Kei Tokunaga's avatar Kei Tokunaga Committed by James Bottomley
Browse files

[SCSI] mpt: modify mptctl_exit() to call proper deregister functions



This patch fixes some issues of mptctl_exit().

  1) It doesn't call mpt_deregister() for mptctl_taskmgmt_id
     => Insmoding/rmmoding mptctl.ko repeadtedly (up to
        MPT_MAX_PROTOCOL_DRIVERS-1 at most) can eat up all cb_idx,
        and that would cause a lack of MptCallbacks[], MptDriverClass[],
        and MptEvHandlers[].

  2) It doesn't call mpt_event_deregister() for mptctl_id
     => Need to call it.

  3) It calls mpt_reset_deregister() for mptctl_taskmgmt_id
     => This could accidentally deregister an innocent reset handler
        that you don't want to.

This patch also adds a check for mptctl_taskmgmt_id.

Signed-off-by: default avatarKei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Acked-by: default avatar"Desai, Kashyap" <Kashyap.Desai@lsi.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent f018b73a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment