]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit - sys/dev/mps/mps_user.c
MFC r251396
authorasomers <asomers@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 12 Jun 2013 22:19:49 +0000 (22:19 +0000)
committerasomers <asomers@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 12 Jun 2013 22:19:49 +0000 (22:19 +0000)
commit59e6a8f5814664a31d3b4fd8f1655b44db267a9c
treee65b20cdbb8107b63ce874e5b78951d2969c1c34
parent989269017ddf4475971df8968c7e83b2a4ff7008
MFC r251396

sys/dev/mps/mps.c
sys/dev/mps/mps_user.c
        Fix uninitialized memory reference in mps_read_config_page.  It was
        referencing a field (params->hdr.Ext.ExtPageType) that would only be
        set when reading an Extended config page.  The symptom was that
        MPSIO_READ_CFG_PAGE ioctls would randomly fail with
        MPI2_IOCSTATUS_CONFIG_INVALID_PAGE errors.  The solution is to
        determine whether an extended or an ordinary config page is requested
        by looking at the PageType field, which should be available regardless.

        Similarly, mps_user_read_extcfg_header and mps_user_read_extcfg_page,
        which call mps_read_config_page, had to be fixed to always set the
        PageType field.  They were implicitly assuming that
        mps_read_config_page always operated on Extended pages.

Reviewed by: ken
Approved by: ken (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@251670 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/mps/mps.c
sys/dev/mps/mps_user.c