diff options
author | David S. Miller <davem@davemloft.net> | 2018-01-12 05:27:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-12 06:13:42 +0300 |
commit | 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b (patch) | |
tree | 0584a3a4639424733bad7714796f858aa7addee7 /net/caif/caif_dev.c | |
parent | 8c2e6c904fd8701a8d02d2bdb86871dc3ec4e85b (diff) | |
parent | 1545dec46db3858bbce84c2065b579e2925706ab (diff) | |
download | linux-19d28fbd306e7ae7c1acf05c3e6968b56f0d196b.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
BPF alignment tests got a conflict because the registers
are output as Rn_w instead of just Rn in net-next, and
in net a fixup for a testcase prohibits logical operations
on pointers before using them.
Also, we should attempt to patch BPF call args if JIT always on is
enabled. Instead, if we fail to JIT the subprogs we should pass
an error back up and fail immediately.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif/caif_dev.c')
-rw-r--r-- | net/caif/caif_dev.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c index 2d38b6e34203..e0adcd123f48 100644 --- a/net/caif/caif_dev.c +++ b/net/caif/caif_dev.c @@ -334,9 +334,8 @@ void caif_enroll_dev(struct net_device *dev, struct caif_dev_common *caifdev, mutex_lock(&caifdevs->lock); list_add_rcu(&caifd->list, &caifdevs->list); - strncpy(caifd->layer.name, dev->name, - sizeof(caifd->layer.name) - 1); - caifd->layer.name[sizeof(caifd->layer.name) - 1] = 0; + strlcpy(caifd->layer.name, dev->name, + sizeof(caifd->layer.name)); caifd->layer.transmit = transmit; cfcnfg_add_phy_layer(cfg, dev, |