RDMA fixes and refactoring rdma-next-2017-12-24
Subsystems (2)
cover RDMA fixes and refactoring rdma-next-2017-12-24
Small series of various fixes to netlink, core and RXE found during resource tracking development. It is based on
https://patchwork.kernel.org/patch/10093725/ and
https://patchwork.kernel.org/patch/10131941/
The patches are available in the git repository at:
git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git tags/rdma-next-2017-12-24-3
Thanks
---------------------------------------
Leon Romanovsky (8):
RDMA/rxe: Remove useless export symbol
RDMA/netlink: Simplify code of autoload modules RDMA/core: Replace open-coded variant of put_device RDMA/nldev: Refactor nldev handle to be common function RDMA/core: Provide locked variant of device name to index function RDMA/netlink: Protect device query from device removal RDMA/nldev: Protect port query from accidental device removal RDMA/cma: Mark end of CMA ID messages
drivers/infiniband/core/cma.c | 1 + drivers/infiniband/core/core_priv.h | 1 + drivers/infiniband/core/device.c | 18 +++++++- drivers/infiniband/core/netlink.c | 8 ++-- drivers/infiniband/core/nldev.c | 82 +++++++++++++++++++++++-------------- drivers/infiniband/sw/rxe/rxe.c | 6 --- drivers/infiniband/sw/rxe/rxe.h | 6 ++- 7 files changed, 79 insertions(+), 43 deletions(-)
Signature · 6 lines
2.15.1 -- 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
A message that is not in the archive (sent off-list or not yet received): 20171224134328.17398-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
PATCH 1/8 RDMA/rxe: Remove useless export symbol
From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>
The RXE driver is standalone module and hence doesn't need to export symbols, move this one liner to be in header file and avoid function implementation in .c file and extra exported symbol.
--- drivers/infiniband/sw/rxe/rxe.c | 6 ------ drivers/infiniband/sw/rxe/rxe.h | 6 +++++- 2 files changed, 5 insertions(+), 7 deletions(-)
drivers/infiniband/sw/rxe/rxe.c +0 -6
@@ -77,12 +77,6 @@ void rxe_release(struct kref *kref)ib_dealloc_device (&rxe->ib_dev); } -void rxe_dev_put (struct rxe_dev *rxe) -{ -kref_put (&rxe->ref_cnt, rxe_release); -} -EXPORT_SYMBOL_GPL (rxe_dev_put); -/* initialize rxe device parameters */ static int rxe_init_device_param (struct rxe_dev *rxe) {
drivers/infiniband/sw/rxe/rxe.h +5 -1
@@ -57,6 +57,7 @@#include "rxe_hdr.h" #include "rxe_param.h" #include "rxe_verbs.h" +#include "rxe_loc.h" #define RXE_UVERBS_ABI_VERSION (1)
@@ -95,7 +96,10 @@ void rxe_remove_all(void);int rxe_rcv (struct sk_buff *skb); -void rxe_dev_put (struct rxe_dev *rxe); +static inline void rxe_dev_put (struct rxe_dev *rxe) +{ +kref_put (&rxe->ref_cnt, rxe_release); +}struct rxe_dev *net_to_rxe (struct net_device *ndev);struct rxe_dev *get_rxe_by_name (const char *name);
Signature · 6 lines
2.15.1 -- 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
PATCH 2/8 RDMA/netlink: Simplify code of autoload modules
In reply to a message not in the archiveFrom: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>
The request_module() call is internally wrapped by CONFIG_MODULE, so there is no need to check it in our RDMA code too.
Refactor the code to simplify the code.
--- drivers/infiniband/core/netlink.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/infiniband/core/netlink.c +3 -5
@@ -83,15 +83,13 @@ static bool is_nl_valid(unsigned int type, unsigned int op)if (!is_nl_msg_valid (type, op))return false; - cb_table = rdma_nl_types[type].cb_table; -#ifdef CONFIG_MODULES -if (!cb_table) { +if (!rdma_nl_types[type].cb_table) {mutex_unlock (&rdma_nl_mutex);request_module ("rdma-netlink-subsys-%d" , type);mutex_lock (&rdma_nl_mutex); - cb_table = rdma_nl_types[type].cb_table; } -#endif + + cb_table = rdma_nl_types[type].cb_table;if (!cb_table || (!cb_table[op].dump && !cb_table[op].doit))return false;
Signature · 6 lines
2.15.1 -- 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
PATCH 3/8 RDMA/core: Replace open-coded variant of put_device
In reply to a message not in the archiveFrom: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>
There is an existing function to decrease reference counter of the device, let's use it.
--- drivers/infiniband/core/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/core/device.c +1 -1
@@ -277,7 +277,7 @@ void ib_dealloc_device(struct ib_device *device) {WARN_ON (device->reg_state !=IB_DEV_UNREGISTERED && device->reg_state !=IB_DEV_UNINITIALIZED ); -kobject_put (&device->dev.kobj); +put_device (&device->dev); }EXPORT_SYMBOL (ib_dealloc_device);
Signature · 6 lines
2.15.1 -- 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
PATCH 4/8 RDMA/nldev: Refactor nldev handle to be common function
In reply to a message not in the archiveFrom: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>
The NLDEV commands are using IB device indexes and names as a handler for netlink communications. Put all relevant code into one function, so it will be reused easily.
--- drivers/infiniband/core/nldev.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
drivers/infiniband/core/nldev.c +14 -6
@@ -54,14 +54,23 @@ static const struct nla_policy nldev_policy[RDMA_NLDEV_ATTR_MAX] = { [RDMA_NLDEV_ATTR_DEV_NODE_TYPE] = { .type = NLA_U8 }, }; -static int fill_dev_info (struct sk_buff *msg,struct ib_device *device) +static int fill_nldev_handle (struct sk_buff *msg,struct ib_device *device) { -char fw[IB_FW_VERSION_NAME_MAX ]; -if (nla_put_u32 (msg,RDMA_NLDEV_ATTR_DEV_INDEX , device->index))return -EMSGSIZE ;if (nla_put_string (msg,RDMA_NLDEV_ATTR_DEV_NAME , device->name))return -EMSGSIZE ; + +return 0 ; +} + +static int fill_dev_info (struct sk_buff *msg,struct ib_device *device) +{ +char fw[IB_FW_VERSION_NAME_MAX ]; + +if (fill_nldev_handle (msg, device)) +return -EMSGSIZE ; +if (nla_put_u32 (msg,RDMA_NLDEV_ATTR_PORT_INDEX ,rdma_end_port (device)))return -EMSGSIZE ;
@@ -92,10 +101,9 @@ static int fill_port_info(struct sk_buff *msg,struct ib_port_attr attr;int ret; -if (nla_put_u32 (msg,RDMA_NLDEV_ATTR_DEV_INDEX , device->index)) -return -EMSGSIZE ; -if (nla_put_string (msg,RDMA_NLDEV_ATTR_DEV_NAME , device->name)) +if (fill_nldev_handle (msg, device))return -EMSGSIZE ; +if (nla_put_u32 (msg,RDMA_NLDEV_ATTR_PORT_INDEX , port))return -EMSGSIZE ;
Signature · 6 lines
2.15.1 -- 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
PATCH 5/8 RDMA/core: Provide locked variant of device name to index function
In reply to a message not in the archiveFrom: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>
Add self-contained with locks device name to index function.
--- drivers/infiniband/core/core_priv.h | 1 + drivers/infiniband/core/device.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+)
drivers/infiniband/core/core_priv.h +1 -0
@@ -301,6 +301,7 @@ static inline int ib_mad_enforce_security(struct ib_mad_agent_private *map,#endif struct ib_device *__ib_device_get_by_index (u32 ifindex); +struct ib_device *ib_device_get_by_index (u32 ifindex);/* RDMA device netlink */ void nldev_init (void );void nldev_exit (void );
drivers/infiniband/core/device.c +16 -0
@@ -150,6 +150,22 @@ struct ib_device *__ib_device_get_by_index(u32 index)return NULL ; } +/* +* Caller is responsible to return refrerence count by calling put_device() +*/ +struct ib_device *ib_device_get_by_index (u32 index) +{ +struct ib_device *device; + +down_write (&lists_rwsem); + device =__ib_device_get_by_index (index); +if (device) +get_device (&device->dev); + +up_write (&lists_rwsem); +return device; +} +static struct ib_device *__ib_device_get_by_name (const char *name) {struct ib_device *device;
Signature · 6 lines
2.15.1 -- 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
A message that is not in the archive (sent off-list or not yet received): 20171224134328.17398-6-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Re: [PATCH rdma-next 5/8] RDMA/core: Provide locked variant of device name to index function
Quoted 33 lines · Leon Romanovsky
From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>
Add self-contained with locks device name to index function.
drivers/infiniband/core/core_priv.h | 1 + drivers/infiniband/core/device.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+)drivers/infiniband/core/core_priv.h +2
-0+++ b/drivers/infiniband/core/core_priv.h@@ -301,6 +301,7 @@ static inline int ib_mad_enforce_security(struct ib_mad_agent_private *map,#endif struct ib_device *__ib_device_get_by_index (u32 ifindex); +struct ib_device *ib_device_get_by_index (u32 ifindex);/* RDMA device netlink */ void nldev_init (void );void nldev_exit (void );drivers/infiniband/core/device.c +6
-0+++ b/drivers/infiniband/core/device.c@@ -150,6 +150,22 @@ struct ib_device *__ib_device_get_by_index(u32 index)return NULL ; } +/* +* Caller is responsible to return refrerence count by calling put_device() +*/ +struct ib_device *ib_device_get_by_index (u32 index) +{
drivers/infiniband/core/device.c struct ib_device *__ib_device_get_by_index(u32 index) · line 167
Quoted 10 lines
drivers/infiniband/core/device.c +10
-0+struct ib_device *device; + +down_write (&lists_rwsem); + device =__ib_device_get_by_index (index); +if (device) +get_device (&device->dev); + +up_write (&lists_rwsem); +return device; +}
If you hold the write side of lists_rwsem you must also hold device_mutex.
But the write side is only needed if the code mutates the device_list or client list, and this does neither, so it should be the read lock, right?
Jason
--
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
A message that is not in the archive (sent off-list or not yet received): 20171227230227.GK25436-uk2M96/[email protected]
Re: [PATCH rdma-next 5/8] RDMA/core: Provide locked variant of device name to index function
Quoted 48 lines · Jason Gunthorpe
Quoted 33 lines · Leon Romanovsky
From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>
Add self-contained with locks device name to index function.
drivers/infiniband/core/core_priv.h | 1 + drivers/infiniband/core/device.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+)drivers/infiniband/core/core_priv.h +2
-0+++ b/drivers/infiniband/core/core_priv.h@@ -301,6 +301,7 @@ static inline int ib_mad_enforce_security(struct ib_mad_agent_private *map,#endif struct ib_device *__ib_device_get_by_index (u32 ifindex); +struct ib_device *ib_device_get_by_index (u32 ifindex);/* RDMA device netlink */ void nldev_init (void );void nldev_exit (void );drivers/infiniband/core/device.c +6
-0+++ b/drivers/infiniband/core/device.c@@ -150,6 +150,22 @@ struct ib_device *__ib_device_get_by_index(u32 index)return NULL ; } +/* +* Caller is responsible to return refrerence count by calling put_device() +*/ +struct ib_device *ib_device_get_by_index (u32 index) +{drivers/infiniband/core/device.c struct ib_device *__ib_device_get_by_index(u32 index) · line 167
Quoted 10 lines
drivers/infiniband/core/device.c +10
-0+struct ib_device *device; + +down_write (&lists_rwsem); + device =__ib_device_get_by_index (index); +if (device) +get_device (&device->dev); + +up_write (&lists_rwsem); +return device; +}If you hold the write side of
lists_rwsemyou must also holddevice_mutex.
Quoted 2 lines
But the write side is only needed if the code mutates the
device_listor client list, and this does neither, so it should be the read lock, right?
Right, I'll fix.
Thanks
Quoted 2 lines
Jason
PATCH 6/8 RDMA/netlink: Protect device query from device removal
In reply to a message not in the archiveFrom: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>
There is a chance that device will be removed during device query operations and it will cause to kernel panic in the flows which doesn't hold lists_rwsem semaphore.
--- drivers/infiniband/core/nldev.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-)
drivers/infiniband/core/nldev.c +15 -10
@@ -141,36 +141,41 @@ static int nldev_get_doit(struct sk_buff *skb, struct nlmsghdr *nlh,struct ib_device *device;struct sk_buff *msg;u32 index; -int err; +int ret = -ENOMEM ; - err =nlmsg_parse (nlh,0 , tb,RDMA_NLDEV_ATTR_MAX -1 , + ret =nlmsg_parse (nlh,0 , tb,RDMA_NLDEV_ATTR_MAX -1 , nldev_policy, extack); -if (err || !tb[RDMA_NLDEV_ATTR_DEV_INDEX ]) +if (ret || !tb[RDMA_NLDEV_ATTR_DEV_INDEX ])return -EINVAL ; index =nla_get_u32 (tb[RDMA_NLDEV_ATTR_DEV_INDEX ]); - device =__ib_device_get_by_index (index); + device =ib_device_get_by_index (index);if (!device)return -EINVAL ; msg =nlmsg_new (NLMSG_DEFAULT_SIZE ,GFP_KERNEL );if (!msg) -return -ENOMEM ; + goto err; nlh =nlmsg_put (msg,NETLINK_CB (skb).portid, nlh->nlmsg_seq,RDMA_NL_GET_TYPE (RDMA_NL_NLDEV ,RDMA_NLDEV_CMD_GET ),0 ,0 ); - err =fill_dev_info (msg, device); -if (err) { -nlmsg_free (msg); -return err; - } + ret =fill_dev_info (msg, device); +if (ret) + goto err_free;nlmsg_end (msg, nlh); +put_device (&device->dev);return rdma_nl_unicast (msg,NETLINK_CB (skb).portid); + +err_free: +nlmsg_free (msg); +err: +put_device (&device->dev); +return ret; } static int _nldev_get_dumpit(struct ib_device *device,
Signature · 6 lines
2.15.1 -- 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
A message that is not in the archive (sent off-list or not yet received): 20171224134328.17398-7-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Re: [PATCH rdma-next 6/8] RDMA/netlink: Protect device query from device removal
Quoted 22 lines · Leon Romanovsky
From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>
There is a chance that device will be removed during device query operations and it will cause to kernel panic in the flows which doesn't hold
lists_rwsemsemaphore.Fixes e5c9469efcb1 ("RDMA/netlink: Add nldev device doit implementation")drivers/infiniband/core/nldev.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-)drivers/infiniband/core/nldev.c +2
-1+++ b/drivers/infiniband/core/nldev.c@@ -141,36 +141,41 @@ static int nldev_get_doit(struct sk_buff *skb, struct nlmsghdr *nlh,struct ib_device *device;struct sk_buff *msg;u32 index; -int err; +int ret = -ENOMEM ;
drivers/infiniband/core/nldev.c static int nldev_get_doit(struct sk_buff *skb, struct nlmsghdr *nlh, · line 153
Quoted 10 lines
drivers/infiniband/core/nldev.c +2
-3- err =nlmsg_parse (nlh,0 , tb,RDMA_NLDEV_ATTR_MAX -1 , + ret =nlmsg_parse (nlh,0 , tb,RDMA_NLDEV_ATTR_MAX -1 , nldev_policy, extack); -if (err || !tb[RDMA_NLDEV_ATTR_DEV_INDEX ]) +if (ret || !tb[RDMA_NLDEV_ATTR_DEV_INDEX ])return -EINVAL ; index =nla_get_u32 (tb[RDMA_NLDEV_ATTR_DEV_INDEX ]); - device =__ib_device_get_by_index (index);
It is not possible to correctly use __ib_device_get_by_index without grabbing one of the locks which are static to device.c
Thus it should not be in core_priv.h and every single user must be wrong, please fix them all here and make it static again.
Jason
--
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
A message that is not in the archive (sent off-list or not yet received): 20171227230552.GL25436-uk2M96/[email protected]
Re: [PATCH rdma-next 6/8] RDMA/netlink: Protect device query from device removal
Quoted 32 lines · Jason Gunthorpe
Quoted 31 lines · Leon Romanovsky
From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>
There is a chance that device will be removed during device query operations and it will cause to kernel panic in the flows which doesn't hold
lists_rwsemsemaphore.Fixes e5c9469efcb1 ("RDMA/netlink: Add nldev device doit implementation")drivers/infiniband/core/nldev.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-)drivers/infiniband/core/nldev.c +4
-3+++ b/drivers/infiniband/core/nldev.c@@ -141,36 +141,41 @@ static int nldev_get_doit(struct sk_buff *skb, struct nlmsghdr *nlh,struct ib_device *device;struct sk_buff *msg;u32 index; -int err; +int ret = -ENOMEM ; - err =nlmsg_parse (nlh,0 , tb,RDMA_NLDEV_ATTR_MAX -1 , + ret =nlmsg_parse (nlh,0 , tb,RDMA_NLDEV_ATTR_MAX -1 , nldev_policy, extack); -if (err || !tb[RDMA_NLDEV_ATTR_DEV_INDEX ]) +if (ret || !tb[RDMA_NLDEV_ATTR_DEV_INDEX ])return -EINVAL ; index =nla_get_u32 (tb[RDMA_NLDEV_ATTR_DEV_INDEX ]);
Quoted 7 lines
drivers/infiniband/core/nldev.c static int nldev_get_doit(struct sk_buff *skb, struct nlmsghdr *nlh, · line 153
Quoted 1 line
drivers/infiniband/core/nldev.c +0
-1- device =__ib_device_get_by_index (index);It is not possible to correctly use
__ib_device_get_by_indexwithout grabbing one of the locks which are static todevice.cThus it should not be in
core_priv.hand every single user must be wrong, please fix them all here and make it static again.
Ok, I'll squash patch 6 & 7 and remove the declaration from core_priv.h
Thanks
Quoted 2 lines
Jason
PATCH 7/8 RDMA/nldev: Protect port query from accidental device removal
In reply to a message not in the archiveFrom: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>
There is a chance that device will be removed during port query operations and it will cause to kernel panic in the flows which doesn't hold lists_rwsem semaphore.
--- drivers/infiniband/core/nldev.c | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-)
drivers/infiniband/core/nldev.c +23 -14
@@ -223,41 +223,48 @@ static int nldev_port_get_doit(struct sk_buff *skb, struct nlmsghdr *nlh,struct sk_buff *msg;u32 index;u32 port; -int err; +int ret = -EINVAL ; - err =nlmsg_parse (nlh,0 , tb,RDMA_NLDEV_ATTR_MAX -1 , + ret =nlmsg_parse (nlh,0 , tb,RDMA_NLDEV_ATTR_MAX -1 , nldev_policy, extack); -if (err || +if (ret || !tb[RDMA_NLDEV_ATTR_DEV_INDEX ] || !tb[RDMA_NLDEV_ATTR_PORT_INDEX ])return -EINVAL ; index =nla_get_u32 (tb[RDMA_NLDEV_ATTR_DEV_INDEX ]); - device =__ib_device_get_by_index (index); + device =ib_device_get_by_index (index);if (!device)return -EINVAL ; port =nla_get_u32 (tb[RDMA_NLDEV_ATTR_PORT_INDEX ]);if (!rdma_is_port_valid (device, port)) -return -EINVAL ; + goto err; msg =nlmsg_new (NLMSG_DEFAULT_SIZE ,GFP_KERNEL ); -if (!msg) -return -ENOMEM ; +if (!msg) { + ret = -ENOMEM ; + goto err; + } nlh =nlmsg_put (msg,NETLINK_CB (skb).portid, nlh->nlmsg_seq,RDMA_NL_GET_TYPE (RDMA_NL_NLDEV ,RDMA_NLDEV_CMD_GET ),0 ,0 ); - err =fill_port_info (msg, device, port); -if (err) { -nlmsg_free (msg); -return err; - } + ret =fill_port_info (msg, device, port); +if (ret) + goto err_free;nlmsg_end (msg, nlh); +put_device (&device->dev);return rdma_nl_unicast (msg,NETLINK_CB (skb).portid); + +err_free: +nlmsg_free (msg); +err: +put_device (&device->dev); +return ret; } static int nldev_port_get_dumpit(struct sk_buff *skb,
@@ -278,7 +285,7 @@ static int nldev_port_get_dumpit(struct sk_buff *skb,return -EINVAL ; ifindex =nla_get_u32 (tb[RDMA_NLDEV_ATTR_DEV_INDEX ]); - device =__ib_device_get_by_index (ifindex); + device =ib_device_get_by_index (ifindex);if (!device)return -EINVAL ;
@@ -312,7 +319,9 @@ static int nldev_port_get_dumpit(struct sk_buff *skb,nlmsg_end (skb, nlh); } -out: cb->args[0 ] = idx; +out: +put_device (&device->dev); + cb->args[0 ] = idx;return skb->len; }
Signature · 6 lines
2.15.1 -- 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
PATCH 8/8 RDMA/cma: Mark end of CMA ID messages
In reply to a message not in the archiveFrom: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>
The commit 1a1c116f3dcf ("RDMA/netlink: Simplify the put_msg and put_attr") removes nlmsg_len calculation in ibnl_put_attr causing netlink messages and caused to miss source and destination addresses.
--- drivers/infiniband/core/cma.c | 1 + 1 file changed, 1 insertion(+)
drivers/infiniband/core/cma.c +1 -0
@@ -4439,6 +4439,7 @@ static int cma_get_id_stats(struct sk_buff *skb, struct netlink_callback *cb) id_stats->qp_type = id->qp_type; i_id++; +nlmsg_end (skb, nlh); } cb->args[1 ] =0 ;
--
2.15.1
--
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