Re: [PATCH v2] devpts: allow mounting with uid/gid of uint32_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 19 2015, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

>
> whoa, wait, I was looking at the -mm tree which changes kstrtouint():
>
> static inline int __must_check kstrtouint(const char *s, unsigned int base, unsigned int *res)
> {
> 	return parse_integer(s, base | PARSE_INTEGER_NEWLINE, res);
> }
>
> and
>
>  * Return number of characters parsed or -E.
>  ...
>  */
> #define parse_integer(s, base, val)	\
>
>
> Alexey, doesn't this mean that code which does
>
> 	if (kstrtouint(...))
> 		return -EFOO;
>
> will break?

No, because PARSE_INTEGER_NEWLINE means more than just accepting a
trailing newline. It also requires the entire string to be consumed, and
changes the return semantics.

I suggested splitting those three things into separate flags and letting
PARSE_INTEGER_KSTRTOX be a shorthand for those.

<http://thread.gmane.org/gmane.linux.kernel/1949066/focus=1949239>

Rasmus
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux