Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Fun set of conflict resolutions here...
For the mac80211 stuff, these were fortunately just parallel
adds. Trivially resolved.
In drivers/net/phy/phy.c we had a bug fix in 'net' that moved the
function phy_disable_interrupts() earlier in the file, whilst in
'net-next' the phy_error() call from this function was removed.
In net/ipv4/xfrm4_policy.c, David Ahern's changes to remove the
'rt_table_id' member of rtable collided with a bug fix in 'net' that
added a new struct member "rt_mtu_locked" which needs to be copied
over here.
The mlxsw driver conflict consisted of net-next separating
the span code and definitions into separate files, whilst
a 'net' bug fix made some changes to that moved code.
The mlx5 infiniband conflict resolution was quite non-trivial,
the RDMA tree's merge commit was used as a guide here, and
here are their notes:
====================
Due to bug fixes found by the syzkaller bot and taken into the for-rc
branch after development for the 4.17 merge window had already started
being taken into the for-next branch, there were fairly non-trivial
merge issues that would need to be resolved between the for-rc branch
and the for-next branch. This merge resolves those conflicts and
provides a unified base upon which ongoing development for 4.17 can
be based.
Conflicts:
drivers/infiniband/hw/mlx5/main.c - Commit 42cea83f95
(IB/mlx5: Fix cleanup order on unload) added to for-rc and
commit b5ca15ad7e (IB/mlx5: Add proper representors support)
add as part of the devel cycle both needed to modify the
init/de-init functions used by mlx5. To support the new
representors, the new functions added by the cleanup patch
needed to be made non-static, and the init/de-init list
added by the representors patch needed to be modified to
match the init/de-init list changes made by the cleanup
patch.
Updates:
drivers/infiniband/hw/mlx5/mlx5_ib.h - Update function
prototypes added by representors patch to reflect new function
names as changed by cleanup patch
drivers/infiniband/hw/mlx5/ib_rep.c - Update init/de-init
stage list to match new order from cleanup patch
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -5423,6 +5423,7 @@ err:
|
||||
static void nf_tables_flowtable_destroy(struct nft_flowtable *flowtable)
|
||||
{
|
||||
cancel_delayed_work_sync(&flowtable->data.gc_work);
|
||||
kfree(flowtable->ops);
|
||||
kfree(flowtable->name);
|
||||
flowtable->data.type->free(&flowtable->data);
|
||||
rhashtable_destroy(&flowtable->data.rhashtable);
|
||||
|
||||
@@ -674,7 +674,7 @@ static const struct nft_set_ops *
|
||||
nft_hash_select_ops(const struct nft_ctx *ctx, const struct nft_set_desc *desc,
|
||||
u32 flags)
|
||||
{
|
||||
if (desc->size) {
|
||||
if (desc->size && !(flags & NFT_SET_TIMEOUT)) {
|
||||
switch (desc->klen) {
|
||||
case 4:
|
||||
return &nft_hash_fast_ops;
|
||||
|
||||
@@ -423,6 +423,36 @@ textify_hooks(char *buf, size_t size, unsigned int mask, uint8_t nfproto)
|
||||
return buf;
|
||||
}
|
||||
|
||||
/**
|
||||
* xt_check_proc_name - check that name is suitable for /proc file creation
|
||||
*
|
||||
* @name: file name candidate
|
||||
* @size: length of buffer
|
||||
*
|
||||
* some x_tables modules wish to create a file in /proc.
|
||||
* This function makes sure that the name is suitable for this
|
||||
* purpose, it checks that name is NUL terminated and isn't a 'special'
|
||||
* name, like "..".
|
||||
*
|
||||
* returns negative number on error or 0 if name is useable.
|
||||
*/
|
||||
int xt_check_proc_name(const char *name, unsigned int size)
|
||||
{
|
||||
if (name[0] == '\0')
|
||||
return -EINVAL;
|
||||
|
||||
if (strnlen(name, size) == size)
|
||||
return -ENAMETOOLONG;
|
||||
|
||||
if (strcmp(name, ".") == 0 ||
|
||||
strcmp(name, "..") == 0 ||
|
||||
strchr(name, '/'))
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(xt_check_proc_name);
|
||||
|
||||
int xt_check_match(struct xt_mtchk_param *par,
|
||||
unsigned int size, u_int8_t proto, bool inv_proto)
|
||||
{
|
||||
|
||||
@@ -917,8 +917,9 @@ static int hashlimit_mt_check_v1(const struct xt_mtchk_param *par)
|
||||
struct hashlimit_cfg3 cfg = {};
|
||||
int ret;
|
||||
|
||||
if (info->name[sizeof(info->name) - 1] != '\0')
|
||||
return -EINVAL;
|
||||
ret = xt_check_proc_name(info->name, sizeof(info->name));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = cfg_copy(&cfg, (void *)&info->cfg, 1);
|
||||
|
||||
@@ -935,8 +936,9 @@ static int hashlimit_mt_check_v2(const struct xt_mtchk_param *par)
|
||||
struct hashlimit_cfg3 cfg = {};
|
||||
int ret;
|
||||
|
||||
if (info->name[sizeof(info->name) - 1] != '\0')
|
||||
return -EINVAL;
|
||||
ret = xt_check_proc_name(info->name, sizeof(info->name));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = cfg_copy(&cfg, (void *)&info->cfg, 2);
|
||||
|
||||
@@ -950,9 +952,11 @@ static int hashlimit_mt_check_v2(const struct xt_mtchk_param *par)
|
||||
static int hashlimit_mt_check(const struct xt_mtchk_param *par)
|
||||
{
|
||||
struct xt_hashlimit_mtinfo3 *info = par->matchinfo;
|
||||
int ret;
|
||||
|
||||
if (info->name[sizeof(info->name) - 1] != '\0')
|
||||
return -EINVAL;
|
||||
ret = xt_check_proc_name(info->name, sizeof(info->name));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return hashlimit_mt_check_common(par, &info->hinfo, &info->cfg,
|
||||
info->name, 3);
|
||||
|
||||
@@ -361,9 +361,9 @@ static int recent_mt_check(const struct xt_mtchk_param *par,
|
||||
info->hit_count, XT_RECENT_MAX_NSTAMPS - 1);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (info->name[0] == '\0' ||
|
||||
strnlen(info->name, XT_RECENT_NAME_LEN) == XT_RECENT_NAME_LEN)
|
||||
return -EINVAL;
|
||||
ret = xt_check_proc_name(info->name, sizeof(info->name));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (ip_pkt_list_tot && info->hit_count < ip_pkt_list_tot)
|
||||
nstamp_mask = roundup_pow_of_two(ip_pkt_list_tot) - 1;
|
||||
|
||||
Reference in New Issue
Block a user