aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-06-28 17:25:28 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:02:26 -0400
commit9d49e861a5e31fb7f575f348743886189045e102 (patch)
tree2392541960aca9fbdd1c00e0694f0c5402036bb3 /drivers
parent31670070ffe18f8e8743109b19297a0efac0a72c (diff)
ath9k: 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')
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index 6d20725d6451..9f99f00c1447 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -500,31 +500,31 @@ int ath9k_init_debug(struct ath_softc *sc)
500 goto err; 500 goto err;
501 501
502 sc->debug.debugfs_debug = debugfs_create_file("debug", 502 sc->debug.debugfs_debug = debugfs_create_file("debug",
503 S_IRUGO | S_IWUSR, sc->debug.debugfs_phy, sc, &fops_debug); 503 S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, sc, &fops_debug);
504 if (!sc->debug.debugfs_debug) 504 if (!sc->debug.debugfs_debug)
505 goto err; 505 goto err;
506 506
507 sc->debug.debugfs_dma = debugfs_create_file("dma", S_IRUGO, 507 sc->debug.debugfs_dma = debugfs_create_file("dma", S_IRUSR,
508 sc->debug.debugfs_phy, sc, &fops_dma); 508 sc->debug.debugfs_phy, sc, &fops_dma);
509 if (!sc->debug.debugfs_dma) 509 if (!sc->debug.debugfs_dma)
510 goto err; 510 goto err;
511 511
512 sc->debug.debugfs_interrupt = debugfs_create_file("interrupt", 512 sc->debug.debugfs_interrupt = debugfs_create_file("interrupt",
513 S_IRUGO, 513 S_IRUSR,
514 sc->debug.debugfs_phy, 514 sc->debug.debugfs_phy,
515 sc, &fops_interrupt); 515 sc, &fops_interrupt);
516 if (!sc->debug.debugfs_interrupt) 516 if (!sc->debug.debugfs_interrupt)
517 goto err; 517 goto err;
518 518
519 sc->debug.debugfs_rcstat = debugfs_create_file("rcstat", 519 sc->debug.debugfs_rcstat = debugfs_create_file("rcstat",
520 S_IRUGO, 520 S_IRUSR,
521 sc->debug.debugfs_phy, 521 sc->debug.debugfs_phy,
522 sc, &fops_rcstat); 522 sc, &fops_rcstat);
523 if (!sc->debug.debugfs_rcstat) 523 if (!sc->debug.debugfs_rcstat)
524 goto err; 524 goto err;
525 525
526 sc->debug.debugfs_wiphy = debugfs_create_file( 526 sc->debug.debugfs_wiphy = debugfs_create_file(
527 "wiphy", S_IRUGO | S_IWUSR, sc->debug.debugfs_phy, sc, 527 "wiphy", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, sc,
528 &fops_wiphy); 528 &fops_wiphy);
529 if (!sc->debug.debugfs_wiphy) 529 if (!sc->debug.debugfs_wiphy)
530 goto err; 530 goto err;