fs, omfs: add NULL terminator in the end up the token list
authorSasha Levin <sasha.levin@oracle.com>
Thu, 28 May 2015 22:44:29 +0000 (15:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Jun 2015 06:19:54 +0000 (23:19 -0700)
commitf00429f1fb50d113494c8a02cf7bfdb121f0d105
treeccb415e800ac8c1c7b69fe42b85a004aac5eaa26
parent0b93bc9d1b0ca52d58a2015809b69ad188d0866c
fs, omfs: add NULL terminator in the end up the token list

commit dcbff39da3d815f08750552fdd04f96b51751129 upstream.

match_token() expects a NULL terminator at the end of the token list so
that it would know where to stop.  Not having one causes it to overrun
to invalid memory.

In practice, passing a mount option that omfs didn't recognize would
sometimes panic the system.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/omfs/inode.c