lkml.org 
[lkml]   [2012]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] Kprobes : Recursively remove the directory on failure
    Date
    Remove the "kprobes" directory recursivly if "enabled" file creation fails

    Signed-off-by: Sasikantha babu <sasikanth.v19@gmail.com>
    ---
    kernel/kprobes.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/kernel/kprobes.c b/kernel/kprobes.c
    index c62b854..9b45515 100644
    --- a/kernel/kprobes.c
    +++ b/kernel/kprobes.c
    @@ -2251,7 +2251,7 @@ static int __kprobes debugfs_kprobe_init(void)
    file = debugfs_create_file("enabled", 0600, dir,
    &value, &fops_kp);
    if (!file) {
    - debugfs_remove(dir);
    + debugfs_remove_recursive(dir);
    return -ENOMEM;
    }

    --
    1.7.3.4


    \
     
     \ /
      Last update: 2012-04-03 17:35    [W:0.029 / U:0.016 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site