[PATCH v1] libnvdimm, dax: Fix a missing check in nd_dax_probe()

2021-04-09 Thread wangyingjie55
From: Yingjie Wang In nd_dax_probe(), nd_dax_alloc() may fail and return NULL. Check for NULL before attempting to use nd_dax to avoid a NULL pointer dereference. Fixes: c5ed9268643c ("libnvdimm, dax: autodetect support") Signed-off-by: Yingjie Wang --- drivers/nvdimm/dax_devs.c | 2 ++ 1

[PATCH v1] libnvdimm, dax: Fix a missing check in nd_dax_probe()

2021-04-08 Thread wangyingjie55
From: Yingjie Wang In nd_dax_probe(), 'nd_dax' is allocated by nd_dax_alloc(). nd_dax_alloc() may fail and return NULL, so we should better check it's return value to avoid a NULL pointer dereference a bit later in the code. Fixes: c5ed9268643c ("libnvdimm, dax: autodetect support")

[PATCH v1] drm/amd/dc: Fix a missing check bug in dm_dp_mst_detect()

2021-04-08 Thread wangyingjie55
From: Yingjie Wang In dm_dp_mst_detect(), We should check whether or not @connector has been unregistered from userspace. If the connector is unregistered, we should return disconnected status. Fixes: 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)") Signed-off-by: Yingjie Wang ---

[PATCH v1] drm/radeon: Fix a missing check bug in radeon_dp_mst_detect()

2021-04-06 Thread wangyingjie55
From: Yingjie Wang In radeon_dp_mst_detect(), We should check whether or not @connector has been unregistered from userspace. If the connector is unregistered, we should return disconnected status. Fixes: 9843ead08f18 ("drm/radeon: add DisplayPort MST support (v2)") Signed-off-by: Yingjie Wang

[PATCH v1] libnvdimm, dax: Fix a missing check in nd_dax_probe()

2021-03-17 Thread wangyingjie55
From: Yingjie Wang In nd_dax_probe(), 'nd_dax' is allocated by nd_dax_alloc(). nd_dax_alloc() may fail and return NULL, so we should better check it's return value to avoid a NULL pointer dereference a bit later in the code. Fixes: c5ed9268643c ("libnvdimm, dax: autodetect support")

[PATCH v1] libnvdimm, dax: Fix a missing check in nd_dax_probe()

2021-03-17 Thread wangyingjie55
From: Yingjie Wang In nd_dax_probe()??? 'nd_dax' is allocated by nd_dax_alloc(). nd_dax_alloc() may fail and return NULL, so we should better check it's return value to avoid a NULL pointer dereference a bit later in the code. Fixes: c5ed9268643c ("libnvdimm, dax: autodetect support")

[PATCH v1] ipv4: add iPv4_is_multicast() check in ip_mc_leave_group().

2021-01-17 Thread wangyingjie55
From: Yingjie Wang There is no iPv4_is_multicast() check added to ip_mc_leave_group() to check if imr->imr_multiaddr.s_addr is a multicast address. If not a multicast address, it may result in an error. In some cases, the callers of ip_mc_leave_group() don't check whether it is multicast address

[PATCH v3] octeontx2-af: Fix missing check bugs in rvu_cgx.c

2021-01-15 Thread wangyingjie55
From: Yingjie Wang In rvu_mbox_handler_cgx_mac_addr_get() and rvu_mbox_handler_cgx_mac_addr_set(), the msg is expected only from PFs that are mapped to CGX LMACs. It should be checked before mapping, so we add the is_cgx_config_permitted() in the functions. Fixes: 96be2e0da85e ("octeontx2-af:

[PATCH v3] octeontx2-af: Fix missing check bugs in rvu_cgx.c

2021-01-15 Thread wangyingjie55
From: Yingjie Wang In rvu_mbox_handler_cgx_mac_addr_get() and rvu_mbox_handler_cgx_mac_addr_set(), the msg is expected only from PFs that are mapped to CGX LMACs. It should be checked before mapping, so we add the is_cgx_config_permitted() in the functions. Fixes: 96be2e0da85e ("octeontx2-af:

[PATCH v3] octeontx2-af: Fix missing check bugs in rvu_cgx.c

2021-01-14 Thread wangyingjie55
From: Yingjie Wang In rvu_mbox_handler_cgx_mac_addr_get() and rvu_mbox_handler_cgx_mac_addr_set(), the msg is expected only from PFs that are mapped to CGX LMACs. It should be checked before mapping, so we add the is_cgx_config_permitted() in the functions. Fixes: 96be2e0da85e ("octeontx2-af:

[PATCH v2] af/rvu_cgx: Fix missing check bugs in rvu_cgx.c

2021-01-12 Thread wangyingjie55
From: Yingjie Wang In rvu_mbox_handler_cgx_mac_addr_get() and rvu_mbox_handler_cgx_mac_addr_set(), the msg is expected only from PFs that are mapped to CGX LMACs. It should be checked before mapping, so we add the is_cgx_config_permitted() in the functions. Fixes: 289e20bc1ab5 ("af/rvu_cgx: Fix

[PATCH v1] net/ipv4: add IPv4_is_multicast() check in ip_mc_leave_group().

2021-01-12 Thread wangyingjie55
From: Yingjie Wang There is no IPv4_is_multicast() check added to ip_mc_leave_group() to determine whether imr->imr_multiaddr.s_addr is a multicast address. If not a multicast address, it may result in an error. In some cases, the callers of ip_mc_leave_group don't check whether it is multicast

[PATCH v2] af/rvu_cgx: Fix missing check bugs in rvu_cgx.c

2021-01-06 Thread wangyingjie55
From: Yingjie Wang In rvu_mbox_handler_cgx_mac_addr_get() and rvu_mbox_handler_cgx_mac_addr_set(), the msg is expected only from PFs that are mapped to CGX LMACs. It should be checked before mapping, so we add the is_cgx_config_permitted() in the functions. Fixes: 85482bb ("af/rvu_cgx: Fix

[PATCH v2] af/rvu_cgx: Fix missing check bugs in rvu_cgx.c

2021-01-06 Thread wangyingjie55
From: Yingjie Wang In rvu_mbox_handler_cgx_mac_addr_get() and rvu_mbox_handler_cgx_mac_addr_set(), the msg is expected only from PFs that are mapped to CGX LMACs. It should be checked before mapping, so we add the is_cgx_config_permitted() in the functions. Signed-off-by: Yingjie Wang ---

[PATCH v1] af/rvu_cgx: Fix missing check bugs in rvu_cgx.c

2020-12-30 Thread wangyingjie55
From: Yingjie Wang In rvu_mbox_handler_cgx_mac_addr_get() and rvu_mbox_handler_cgx_mac_addr_set(), the msg is expected only from PFs that are mapped to CGX LMACs. It should be checked before mapping, so we add the is_cgx_config_permitted() in the functions. Signed-off-by: Yingjie Wang ---