• Al Viro's avatar
    delousing target_core_file a bit · dbc6e022
    Al Viro authored
    * set_fs(KERNEL_DS) + getname() is probably the weirdest implementation
    of strdup() I've seen.  Especially since they don't to copy it at all...
    * filp_open() never returns NULL; it's ERR_PTR(-E...) on failure.
    * file->f_dentry is never going to be NULL, TYVM.
    * match_strdup() + snprintf() + kfree() is a bloody weird way to spell
    match_strlcpy().
    
    Pox on cargo-cult programmers...
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    dbc6e022
target_core_file.c 14.4 KB