In the Linux kernel, the following vulnerability has been resolved:
extcon: Modify extcon device to be created after driver data is set
Currently, someone can invoke the sysfs such as stateshow() intermittently before devset_drvdata() is done. And it can be a cause of kernel Oops because of edev is Null at that time. So modified the driver registration to after setting drviver data.
Backtrace: [<c067865c>] (stateshow) from [<c05222e8>] (devattrshow) [<c05222c0>] (devattrshow) from [<c02c66e0>] (sysfskfseqshow) [<c02c6648>] (sysfskfseqshow) from [<c02c496c>] (kernfsseqshow) [<c02c4938>] (kernfsseqshow) from [<c025e2a0>] (seqread) [<c025e11c>] (seqread) from [<c02c50a0>] (kernfsfopread) [<c02c5064>] (kernfsfopread) from [<c0231cac>] (vfsread) [<c0231c5c>] (vfsread) from [<c0231ee0>] (vfsread) [<c0231e34>] (vfsread) from [<c0232464>] (ksysread) [<c02323f0>] (ksysread) from [<c02324fc>] (sysread) [<c02324e4>] (sysread) from [<c00091d0>] (systrace_return)