* [PATCH] hugetlbfs: fix mount mode command line processing
@ 2021-07-21 18:33 Mike Kravetz
2021-07-21 18:42 ` Matthew Wilcox
0 siblings, 1 reply; 2+ messages in thread
From: Mike Kravetz @ 2021-07-21 18:33 UTC (permalink / raw)
To: linux-mm, linux-kernel
Cc: Matthew Wilcox, David Howells, Al Viro, Andrew Morton,
Mike Kravetz, Dennis Camera, stable
In commit 32021982a324 ("hugetlbfs: Convert to fs_context") processing
of the mount mode string was changed from match_octal() to fsparam_u32.
This changed existing behavior as match_octal does not require octal
values to have a '0' prefix, but fsparam_u32 does.
Use fsparam_u32oct which provides the same behavior as match_octal.
Reported-by: Dennis Camera <bugs+kernel.org@dtnr.ch>
Fixes: 32021982a324 ("hugetlbfs: Convert to fs_context")
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
CC: <stable@vger.kernel.org>
---
fs/hugetlbfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 926eeb9bf4eb..cdfb1ae78a3f 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -77,7 +77,7 @@ enum hugetlb_param {
static const struct fs_parameter_spec hugetlb_fs_parameters[] = {
fsparam_u32 ("gid", Opt_gid),
fsparam_string("min_size", Opt_min_size),
- fsparam_u32 ("mode", Opt_mode),
+ fsparam_u32oct("mode", Opt_mode),
fsparam_string("nr_inodes", Opt_nr_inodes),
fsparam_string("pagesize", Opt_pagesize),
fsparam_string("size", Opt_size),
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] hugetlbfs: fix mount mode command line processing
2021-07-21 18:33 [PATCH] hugetlbfs: fix mount mode command line processing Mike Kravetz
@ 2021-07-21 18:42 ` Matthew Wilcox
0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2021-07-21 18:42 UTC (permalink / raw)
To: Mike Kravetz
Cc: linux-mm, linux-kernel, David Howells, Al Viro, Andrew Morton,
Dennis Camera, stable
On Wed, Jul 21, 2021 at 11:33:26AM -0700, Mike Kravetz wrote:
> In commit 32021982a324 ("hugetlbfs: Convert to fs_context") processing
> of the mount mode string was changed from match_octal() to fsparam_u32.
> This changed existing behavior as match_octal does not require octal
> values to have a '0' prefix, but fsparam_u32 does.
>
> Use fsparam_u32oct which provides the same behavior as match_octal.
>
> Reported-by: Dennis Camera <bugs+kernel.org@dtnr.ch>
> Fixes: 32021982a324 ("hugetlbfs: Convert to fs_context")
> Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
> CC: <stable@vger.kernel.org>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-21 18:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 18:33 [PATCH] hugetlbfs: fix mount mode command line processing Mike Kravetz
2021-07-21 18:42 ` Matthew Wilcox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).