OSDN Git Service

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 15:20:49 +0000 (08:20 -0700)
commit4215727c437c76503dc668677ffdd77f233182f0
tree014301686225ec541aa4b0fda5aedb4347c8a312
parent1d280829188e2a0f10fbc530dfb7c2fcb2d97acc
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