mthca - check for NULL mode in uverbs_devnode()
Unloading ib_mthca crashes with a NULL pointer dereference because devtmpfs_delete_node() calls device_get_devnode() with mode as NULL.
Signed-off-by Goldwyn Rodrigues <[email protected]>
---
drivers/infiniband/core/uverbs_main.c +2 -1
@@ -826,7 +826,8 @@ static void ib_uverbs_remove_one(struct ib_device *device)static char *uverbs_devnode (struct device *dev,mode_t *mode) { - *mode =0666 ; +if (mode) + *mode =0666 ;return kasprintf (GFP_KERNEL ,"infiniband/%s" ,dev_name (dev)); }
Signature · 5 lines
Goldwyn -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html