mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-02 02:27:40 +07:00
mbcs: add .owner to mbcs struct file_operations
Without ".owner = THIS_MODULE" it is possible to crash the kernel by unloading the mbcs module while someone works with the file. Fix this by initializing the ‘struct file_operations' ->owner with THIS_MODULE. Signed-off-by: Naveen Kumar Parna <parna.naveenkumar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ec74136ded
commit
f9f7bb9e0a
@ -50,6 +50,7 @@ static LIST_HEAD(soft_list);
|
|||||||
* file operations
|
* file operations
|
||||||
*/
|
*/
|
||||||
static const struct file_operations mbcs_ops = {
|
static const struct file_operations mbcs_ops = {
|
||||||
|
.owner = THIS_MODULE,
|
||||||
.open = mbcs_open,
|
.open = mbcs_open,
|
||||||
.llseek = mbcs_sram_llseek,
|
.llseek = mbcs_sram_llseek,
|
||||||
.read = mbcs_sram_read,
|
.read = mbcs_sram_read,
|
||||||
|
Loading…
Reference in New Issue
Block a user