Sasha Levin d9060742fb ocfs2: check if cluster name exists before deref
Commit c74a3bdd9b52 ("ocfs2: add clustername to cluster connection") is
trying to strlcpy a string which was explicitly passed as NULL in the
very same patch, triggering a NULL ptr deref.

  BUG: unable to handle kernel NULL pointer dereference at           (null)
  IP: strlcpy (lib/string.c:388 lib/string.c:151)
  CPU: 19 PID: 19426 Comm: trinity-c19 Tainted: G        W     3.14.0-rc7-next-20140325-sasha-00014-g9476368-dirty #274
  RIP:  strlcpy (lib/string.c:388 lib/string.c:151)
  Call Trace:
   ocfs2_cluster_connect (fs/ocfs2/stackglue.c:350)
   ocfs2_cluster_connect_agnostic (fs/ocfs2/stackglue.c:396)
   user_dlm_register (fs/ocfs2/dlmfs/userdlm.c:679)
   dlmfs_mkdir (fs/ocfs2/dlmfs/dlmfs.c:503)
   vfs_mkdir (fs/namei.c:3467)
   SyS_mkdirat (fs/namei.c:3488 fs/namei.c:3472)
   tracesys (arch/x86/kernel/entry_64.S:749)

akpm: this patch probably disables the feature.  A temporary thing to
avoid triviel oopses.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Cc: Goldwyn Rodrigues <rgoldwyn@suse.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-03-28 13:56:58 -07:00
..
2014-01-21 16:19:41 -08:00
2013-05-07 20:16:25 -07:00
2010-09-10 09:18:15 -07:00
2013-06-29 12:57:02 +04:00
2011-07-25 14:58:15 -07:00
2014-03-10 11:43:32 -04:00
2013-11-09 00:16:32 -05:00
2013-05-07 20:16:25 -07:00
2011-02-21 11:18:23 +08:00
2008-10-13 13:57:57 -07:00
2014-01-21 16:19:41 -08:00
2013-02-26 02:46:10 -05:00
2008-02-03 17:33:42 +02:00
2014-03-04 07:55:48 -08:00
2011-03-31 11:26:23 -03:00
2011-07-24 10:34:54 -07:00
2012-05-29 23:28:40 -04:00
2011-02-24 16:22:20 +08:00