Skip to content
Commit b2bc4782 authored by Goldwyn Rodrigues's avatar Goldwyn Rodrigues Committed by Linus Torvalds
Browse files

RDMA: Check for NULL mode in .devnode methods

Commits 71c29bd5 ("IB/uverbs: Add devnode method to set path/mode")
and c3af0980

 ("IB: Add devnode methods to cm_class and umad_class")
added devnode methods that set the mode.

However, these methods don't check for a NULL mode, and so we get a
crash when unloading modules because devtmpfs_delete_node() calls
device_get_devnode() with mode == NULL.

Add the missing checks.

Signed-off-by: default avatarGoldwyn Rodrigues <rgoldwyn@suse.de>
[ Also fix cm.c.  - Roland ]
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ba466c74
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment