diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2009-06-28 17:25:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 15:02:26 -0400 |
commit | 31670070ffe18f8e8743109b19297a0efac0a72c (patch) | |
tree | aefe670217fec01a291a1670cae8c3e2bcae808d /drivers/net/wireless/ath/ath5k/debug.c | |
parent | 6badaaf7729e5d1c02934b1739303ce79014ab67 (diff) |
ath5k: remove permissions from debugfs files
Don't allow users to open debugfs files, because it can cause oopses.
When a user opens some file, driver unlinks it and frees the
corresponding structure, we will dereference freed memory.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/debug.c')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/debug.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c index 4904a07e4b59..747508c15d34 100644 --- a/drivers/net/wireless/ath/ath5k/debug.c +++ b/drivers/net/wireless/ath/ath5k/debug.c | |||
@@ -380,13 +380,15 @@ ath5k_debug_init_device(struct ath5k_softc *sc) | |||
380 | sc->debug.debugfs_phydir = debugfs_create_dir(wiphy_name(sc->hw->wiphy), | 380 | sc->debug.debugfs_phydir = debugfs_create_dir(wiphy_name(sc->hw->wiphy), |
381 | ath5k_global_debugfs); | 381 | ath5k_global_debugfs); |
382 | 382 | ||
383 | sc->debug.debugfs_debug = debugfs_create_file("debug", S_IWUSR | S_IRUGO, | 383 | sc->debug.debugfs_debug = debugfs_create_file("debug", |
384 | S_IWUSR | S_IRUSR, | ||
384 | sc->debug.debugfs_phydir, sc, &fops_debug); | 385 | sc->debug.debugfs_phydir, sc, &fops_debug); |
385 | 386 | ||
386 | sc->debug.debugfs_registers = debugfs_create_file("registers", S_IRUGO, | 387 | sc->debug.debugfs_registers = debugfs_create_file("registers", S_IRUSR, |
387 | sc->debug.debugfs_phydir, sc, &fops_registers); | 388 | sc->debug.debugfs_phydir, sc, &fops_registers); |
388 | 389 | ||
389 | sc->debug.debugfs_beacon = debugfs_create_file("beacon", S_IWUSR | S_IRUGO, | 390 | sc->debug.debugfs_beacon = debugfs_create_file("beacon", |
391 | S_IWUSR | S_IRUSR, | ||
390 | sc->debug.debugfs_phydir, sc, &fops_beacon); | 392 | sc->debug.debugfs_phydir, sc, &fops_beacon); |
391 | 393 | ||
392 | sc->debug.debugfs_reset = debugfs_create_file("reset", S_IWUSR, | 394 | sc->debug.debugfs_reset = debugfs_create_file("reset", S_IWUSR, |