Skip to content

Commit c82acce

Browse files
committed
PATCH: kernel 4.4.192-193
1 parent 1ab3bd8 commit c82acce

File tree

16 files changed

+45
-29
lines changed

16 files changed

+45
-29
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 4
3-
SUBLEVEL = 192
3+
SUBLEVEL = 193
44
EXTRAVERSION =
55
NAME = Blurry Fish Butt
66

arch/x86/boot/compressed/misc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include "misc.h"
1313
#include "../string.h"
14+
#include <asm/bootparam_utils.h>
1415

1516
/* WARNING!!
1617
* This code is compiled with -fPIC and it is relocated dynamically

arch/x86/boot/compressed/misc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include <asm/page.h>
2020
#include <asm/boot.h>
2121
#include <asm/bootparam.h>
22-
#include <asm/bootparam_utils.h>
2322

2423
#define BOOT_BOOT_H
2524
#include "../ctype.h"

drivers/clk/clk-s2mps11.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ MODULE_DEVICE_TABLE(platform, s2mps11_clk_id);
307307
* This requires of_device_id table. In the same time this will not change the
308308
* actual *device* matching so do not add .of_match_table.
309309
*/
310-
static const struct of_device_id s2mps11_dt_match[] = {
310+
static const struct of_device_id s2mps11_dt_match[] __used = {
311311
{
312312
.compatible = "samsung,s2mps11-clk",
313313
.data = (void *)S2MPS11X,

drivers/vhost/test.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
* Using this limit prevents one virtqueue from starving others. */
2424
#define VHOST_TEST_WEIGHT 0x80000
2525

26+
/* Max number of packets transferred before requeueing the job.
27+
* Using this limit prevents one virtqueue from starving others with
28+
* pkts.
29+
*/
30+
#define VHOST_TEST_PKT_WEIGHT 256
31+
2632
enum {
2733
VHOST_TEST_VQ = 0,
2834
VHOST_TEST_VQ_MAX = 1,
@@ -81,10 +87,8 @@ static void handle_vq(struct vhost_test *n)
8187
}
8288
vhost_add_used_and_signal(&n->dev, vq, head, 0);
8389
total_len += len;
84-
if (unlikely(total_len >= VHOST_TEST_WEIGHT)) {
85-
vhost_poll_queue(&vq->poll);
90+
if (unlikely(vhost_exceeds_weight(vq, 0, total_len)))
8691
break;
87-
}
8892
}
8993

9094
mutex_unlock(&vq->mutex);
@@ -116,7 +120,8 @@ static int vhost_test_open(struct inode *inode, struct file *f)
116120
dev = &n->dev;
117121
vqs[VHOST_TEST_VQ] = &n->vqs[VHOST_TEST_VQ];
118122
n->vqs[VHOST_TEST_VQ].handle_kick = handle_vq_kick;
119-
vhost_dev_init(dev, vqs, VHOST_TEST_VQ_MAX);
123+
vhost_dev_init(dev, vqs, VHOST_TEST_VQ_MAX,
124+
VHOST_TEST_PKT_WEIGHT, VHOST_TEST_WEIGHT);
120125

121126
f->private_data = n;
122127

drivers/vhost/vhost.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@ static int get_indirect(struct vhost_virtqueue *vq,
13241324
/* If this is an input descriptor, increment that count. */
13251325
if (desc.flags & cpu_to_vhost16(vq, VRING_DESC_F_WRITE)) {
13261326
*in_num += ret;
1327-
if (unlikely(log)) {
1327+
if (unlikely(log && ret)) {
13281328
log[*log_num].addr = vhost64_to_cpu(vq, desc.addr);
13291329
log[*log_num].len = vhost32_to_cpu(vq, desc.len);
13301330
++*log_num;
@@ -1453,7 +1453,7 @@ int vhost_get_vq_desc(struct vhost_virtqueue *vq,
14531453
/* If this is an input descriptor,
14541454
* increment that count. */
14551455
*in_num += ret;
1456-
if (unlikely(log)) {
1456+
if (unlikely(log && ret)) {
14571457
log[*log_num].addr = vhost64_to_cpu(vq, desc.addr);
14581458
log[*log_num].len = vhost32_to_cpu(vq, desc.len);
14591459
++*log_num;

include/net/xfrm.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,6 +1304,23 @@ static inline int xfrm_state_kern(const struct xfrm_state *x)
13041304
return atomic_read(&x->tunnel_users);
13051305
}
13061306

1307+
static inline bool xfrm_id_proto_valid(u8 proto)
1308+
{
1309+
switch (proto) {
1310+
case IPPROTO_AH:
1311+
case IPPROTO_ESP:
1312+
case IPPROTO_COMP:
1313+
#if IS_ENABLED(CONFIG_IPV6)
1314+
case IPPROTO_ROUTING:
1315+
case IPPROTO_DSTOPTS:
1316+
#endif
1317+
return true;
1318+
default:
1319+
return false;
1320+
}
1321+
}
1322+
1323+
/* IPSEC_PROTO_ANY only matches 3 IPsec protocols, 0 could match all. */
13071324
static inline int xfrm_id_proto_match(u8 proto, u8 userproto)
13081325
{
13091326
return (!userproto || proto == userproto ||

net/key/af_key.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1969,8 +1969,10 @@ parse_ipsecrequest(struct xfrm_policy *xp, struct sadb_x_ipsecrequest *rq)
19691969

19701970
if (rq->sadb_x_ipsecrequest_mode == 0)
19711971
return -EINVAL;
1972+
if (!xfrm_id_proto_valid(rq->sadb_x_ipsecrequest_proto))
1973+
return -EINVAL;
19721974

1973-
t->id.proto = rq->sadb_x_ipsecrequest_proto; /* XXX check proto */
1975+
t->id.proto = rq->sadb_x_ipsecrequest_proto;
19741976
if ((mode = pfkey_mode_to_xfrm(rq->sadb_x_ipsecrequest_mode)) < 0)
19751977
return -EINVAL;
19761978
t->mode = mode;

net/packet/af_packet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4176,7 +4176,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
41764176

41774177
/* Opening a Tx-ring is NOT supported in TPACKET_V3 */
41784178
if (!closing && tx_ring && (po->tp_version > TPACKET_V2)) {
4179-
WARN(1, "Tx-ring is not supported.\n");
4179+
net_warn_ratelimited("Tx-ring is not supported.\n");
41804180
goto out;
41814181
}
41824182

net/xfrm/xfrm_state.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2142,7 +2142,7 @@ void xfrm_state_fini(struct net *net)
21422142
unsigned int sz;
21432143

21442144
flush_work(&net->xfrm.state_hash_work);
2145-
xfrm_state_flush(net, IPSEC_PROTO_ANY, false);
2145+
xfrm_state_flush(net, 0, false);
21462146
flush_work(&net->xfrm.state_gc_work);
21472147

21482148
WARN_ON(!list_empty(&net->xfrm.state_all));

0 commit comments

Comments
 (0)