The patch titled selinuxfs: remove custome hex_to_bin() has been added to the -mm tree. Its filename is selinuxfs-remove-custome-hex_to_bin.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: selinuxfs: remove custome hex_to_bin() From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Cc: Eric Paris <eparis@xxxxxxxxxxxxxx> Cc: James Morris <jmorris@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- security/selinux/selinuxfs.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff -puN security/selinux/selinuxfs.c~selinuxfs-remove-custome-hex_to_bin security/selinux/selinuxfs.c --- a/security/selinux/selinuxfs.c~selinuxfs-remove-custome-hex_to_bin +++ a/security/selinux/selinuxfs.c @@ -752,14 +752,6 @@ out: return length; } -static inline int hexcode_to_int(int code) { - if (code == '\0' || !isxdigit(code)) - return -1; - if (isdigit(code)) - return code - '0'; - return tolower(code) - 'a' + 10; -} - static ssize_t sel_write_create(struct file *file, char *buf, size_t size) { char *scon = NULL, *tcon = NULL; @@ -811,9 +803,11 @@ static ssize_t sel_write_create(struct f if (c1 == '+') c1 = ' '; else if (c1 == '%') { - if ((c1 = hexcode_to_int(*r++)) < 0) + c1 = hex_to_bin(*r++); + if (c1 < 0) goto out; - if ((c2 = hexcode_to_int(*r++)) < 0) + c2 = hex_to_bin(*r++); + if (c2 < 0) goto out; c1 = (c1 << 4) | c2; } _ Patches currently in -mm which might be from andriy.shevchenko@xxxxxxxxxxxxxxx are linux-next.patch selinuxfs-remove-custome-hex_to_bin.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html