]> Git Repo - linux.git/commit
iwlwifi: mvm: properly check debugfs dentry before using it
authorGreg Kroah-Hartman <[email protected]>
Sat, 30 Mar 2019 09:31:52 +0000 (10:31 +0100)
committerLuca Coelho <[email protected]>
Thu, 18 Apr 2019 12:06:44 +0000 (15:06 +0300)
commit154d4899e4111ae24e68d6ba955f46856cb046bc
tree1fb72fc026547fb493cea5f03f52e445a08d5881
parentb35f63972c5c67fc0f908286f7fc624137788876
iwlwifi: mvm: properly check debugfs dentry before using it

debugfs can now report an error code if something went wrong instead of
just NULL.  So if the return value is to be used as a "real" dentry, it
needs to be checked if it is an error before dereferencing it.

This is now happening because of ff9fb72bc077 ("debugfs: return error
values, not NULL").  If multiple iwlwifi devices are in the system, this
can cause problems when the driver attempts to create the main debugfs
directory again.  Later on in the code we fail horribly by trying to
dereference a pointer that is an error value.

Reported-by: Laura Abbott <[email protected]>
Reported-by: Gabriel Ramirez <[email protected]>
Cc: Johannes Berg <[email protected]>
Cc: Emmanuel Grumbach <[email protected]>
Cc: Luca Coelho <[email protected]>
Cc: Intel Linux Wireless <[email protected]>
Cc: Kalle Valo <[email protected]>
Cc: stable <[email protected]> # 5.0
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c
This page took 0.059278 seconds and 4 git commands to generate.