search for: nl_set_err_msg

Displaying 6 results from an estimated 6 matches for "nl_set_err_msg".

Did you mean: genl_set_err_msg
2023 Jan 29
3
[Bridge] [PATCH net-next v2] netlink: provide an ability to set default extack message
In netdev common pattern, extack pointer is forwarded to the drivers to be filled with error message. However, the caller can easily overwrite the filled message. Instead of adding multiple "if (!extack->_msg)" checks before any NL_SET_ERR_MSG() call, which appears after call to the driver, let's add new macro to common code. [1] https://lore.kernel.org/all/Y9Irgrgf3uxOjwUm at unreal Signed-off-by: Leon Romanovsky <leonro at nvidia.com> --- Changelog: v2: * Removed () brackets around msg to fix compilation error. v1: https://...
2023 Jan 26
2
[Bridge] [PATCH net-next] netlink: provide an ability to set default extack message
...r is forwarded to the drivers ~~~~~~ extack > to be filled with error message. However, the caller can easily > overwrite the filled message. > > Instead of adding multiple "if (!extack->_msg)" checks before any > NL_SET_ERR_MSG() call, which appears after call to the driver, let's > add this check to common code. > > [1] https://lore.kernel.org/all/Y9Irgrgf3uxOjwUm at unreal > Signed-off-by: Leon Romanovsky <leonro at nvidia.com> > --- I would somewhat prefer not doing this, and instead introduc...
2023 Jan 31
1
[Bridge] [PATCH net-next v2] netlink: provide an ability to set default extack message
...00, Leon Romanovsky wrote: > In netdev common pattern, extack pointer is forwarded to the drivers > to be filled with error message. However, the caller can easily > overwrite the filled message. > > Instead of adding multiple "if (!extack->_msg)" checks before any > NL_SET_ERR_MSG() call, which appears after call to the driver, let's > add new macro to common code. > > [1] https://lore.kernel.org/all/Y9Irgrgf3uxOjwUm at unreal > Signed-off-by: Leon Romanovsky <leonro at nvidia.com> I'm sorry for nit-picking, but checkpatch complains the author (le...
2023 Jan 27
1
[Bridge] [PATCH net-next] netlink: provide an ability to set default extack message
...~~~~~~ > extack > > > to be filled with error message. However, the caller can easily > > overwrite the filled message. > > > > Instead of adding multiple "if (!extack->_msg)" checks before any > > NL_SET_ERR_MSG() call, which appears after call to the driver, let's > > add this check to common code. > > > > [1] https://lore.kernel.org/all/Y9Irgrgf3uxOjwUm at unreal > > Signed-off-by: Leon Romanovsky <leonro at nvidia.com> > > --- > > I would somewhat prefer n...
2023 Jan 26
2
[Bridge] [PATCH net-next] netlink: provide an ability to set default extack message
...~~~~~~ > extack > > > to be filled with error message. However, the caller can easily > > overwrite the filled message. > > > > Instead of adding multiple "if (!extack->_msg)" checks before any > > NL_SET_ERR_MSG() call, which appears after call to the driver, let's > > add this check to common code. > > > > [1] https://lore.kernel.org/all/Y9Irgrgf3uxOjwUm at unreal > > Signed-off-by: Leon Romanovsky <leonro at nvidia.com> > > --- > > I would somewhat prefer...
2023 Jan 26
1
[Bridge] [PATCH net-next] netlink: provide an ability to set default extack message
From: Leon Romanovsky <leonro at nvidia.com> In netdev common pattern, xxtack pointer is forwarded to the drivers to be filled with error message. However, the caller can easily overwrite the filled message. Instead of adding multiple "if (!extack->_msg)" checks before any NL_SET_ERR_MSG() call, which appears after call to the driver, let's add this check to common code. [1] https://lore.kernel.org/all/Y9Irgrgf3uxOjwUm at unreal Signed-off-by: Leon Romanovsky <leonro at nvidia.com> --- include/linux/netlink.h | 4 ++-- net/bridge/br_switchdev.c | 10 ++++------ net/d...