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)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 6 Aug 2015 23:32:13 +0000 (00:32 +0100)
commita5045e0fee1a7b2cf132afb94977d4c8d781bd04
treee837baa96199ebf2b7c452ba49d24eb4f2ba409a
parent74b469cfb9b8eca325bb5822708fda9c6dc3626a
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: Ben Hutchings <ben@decadent.org.uk>
fs/omfs/inode.c