dmaengine: idxd: Fix a possible NULL pointer dereference
mainline inclusion from mainline-v5.15 commit e9c5b0b5 category: bugfix bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I596WO CVE: NA Intel-SIG: commit e9c5b0b5 dmaengine: idxd: Fix a possible NULL pointer dereference. Incremental backporting patches for DSA/IAA on Intel Xeon platform. -------------------------------- 'device_driver_attach()' dereferences its first argument (i.e. 'alt_drv') so it must not be NULL. Simplify the error handling logic about NULL 'alt_drv' in order to be more robust and future-proof. Fixes: 568b2126 ("dmaengine: idxd: fix uninit var for alt_drv") Fixes: 6e7f3ee9 ("dmaengine: idxd: move dsa_drv support to compatible mode") Signed-off-by:Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by:
Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/77f0dc4f3966591d1f0cffb614a94085f8895a85.1627560174.git.christophe.jaillet@wanadoo.fr Signed-off-by:
Vinod Koul <vkoul@kernel.org> Signed-off-by:
Xiaochen Shen <xiaochen.shen@intel.com>
Loading
Please sign in to comment