Skip to content

Commit 0a2d4e3

Browse files
committed
Merge tag 'v6.12.71' into 6.12-main
This is the 6.12.71 stable release # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCgAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmmNxEcACgkQONu9yGCS # aT5ZCBAAw0j8ZikAaYLpYLpA7MUM0i5lmyxWHd40cClQ0Jh3e0iO0zMr5+6lzlph # MdVgYSPwEjOvxU4hJHOB2D4wbtM9NC/eYJQky+U4XoyVFktKSTbygYFNY6s+HxVi # 9/4qcoe1UdcptyFNBv1qCtZpIT2gWrfYYZ0jqo12P7HgEL8hd8JPNxNPgg2TwQc0 # b9Nuo5cFjK82SQ4jXmSTd5ikUkByqcOgyYXnCppnZDykh6xh/oC9zQGcpkzkX41D # 4qgLJhjAmSrJcRomVDTC29swFb9Qjc7he4FCMHhJofrBN/GZlpgAH2XyjbK6akCA # pKli0rusntAK1YWpBAB4sLkXyiYQ2CiRWcMN4o0M76A6KlJKygBiDptUnSJ0ZC2t # xc0cpdqN47WCVC46WdDuO1P544V1uhghAeyIczJPhsUu0F8aZ96suOwiMwcy2lx7 # n96ndzD9e5pYmKgbOBWOyR+GICdMxNgfvMpandCXxdmG7SiWeRu2yZAKjOH3ECmo # ce/FHOKEWO/za7BgIO3RrBtudbbsEzkS5yZWgmSiL3efxrADIUy19GlCloV0fm56 # K3Vl0qj51KaN3A4DNJpcJaG98Lppr6zMOvIIix/XdXx2jIhrd997X8+8NPaMoB6f # XGdP8TXyRn1foiaGWFbsDqATi+Fmju+LllxG32zjnOsZneRr5jo= # =t7kb # -----END PGP SIGNATURE----- # gpg: Signature made Thu Feb 12 13:15:03 2026 CET # gpg: using RSA key 647F28654894E3BD457199BE38DBBDC86092693E # gpg: Can't check signature: No public key
2 parents 7f6bdeb + ae59117 commit 0a2d4e3

15 files changed

Lines changed: 197 additions & 64 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 6
33
PATCHLEVEL = 12
4-
SUBLEVEL = 70
4+
SUBLEVEL = 71
55
EXTRAVERSION =
66
NAME = Baby Opossum Posse
77

drivers/net/bareudp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ static int bareudp_xmit_skb(struct sk_buff *skb, struct net_device *dev,
317317
__be32 saddr;
318318
int err;
319319

320-
if (!skb_vlan_inet_prepare(skb, skb->protocol != htons(ETH_P_TEB)))
320+
if (skb_vlan_inet_prepare(skb, skb->protocol != htons(ETH_P_TEB)))
321321
return -EINVAL;
322322

323323
if (!sock)
@@ -387,7 +387,7 @@ static int bareudp6_xmit_skb(struct sk_buff *skb, struct net_device *dev,
387387
__be16 sport;
388388
int err;
389389

390-
if (!skb_vlan_inet_prepare(skb, skb->protocol != htons(ETH_P_TEB)))
390+
if (skb_vlan_inet_prepare(skb, skb->protocol != htons(ETH_P_TEB)))
391391
return -EINVAL;
392392

393393
if (!sock)

drivers/net/geneve.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ static int geneve_xmit_skb(struct sk_buff *skb, struct net_device *dev,
827827
__be16 sport;
828828
int err;
829829

830-
if (!skb_vlan_inet_prepare(skb, inner_proto_inherit))
830+
if (skb_vlan_inet_prepare(skb, inner_proto_inherit))
831831
return -EINVAL;
832832

833833
if (!gs4)
@@ -937,7 +937,7 @@ static int geneve6_xmit_skb(struct sk_buff *skb, struct net_device *dev,
937937
__be16 sport;
938938
int err;
939939

940-
if (!skb_vlan_inet_prepare(skb, inner_proto_inherit))
940+
if (skb_vlan_inet_prepare(skb, inner_proto_inherit))
941941
return -EINVAL;
942942

943943
if (!gs6)

drivers/net/vxlan/vxlan_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2381,7 +2381,7 @@ void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
23812381
__be32 vni = 0;
23822382

23832383
no_eth_encap = flags & VXLAN_F_GPE && skb->protocol != htons(ETH_P_TEB);
2384-
if (!skb_vlan_inet_prepare(skb, no_eth_encap))
2384+
if (skb_vlan_inet_prepare(skb, no_eth_encap))
23852385
goto drop;
23862386

23872387
old_iph = ip_hdr(skb);

include/net/ip_tunnels.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,12 @@ static inline bool pskb_inet_may_pull(struct sk_buff *skb)
467467

468468
/* Variant of pskb_inet_may_pull().
469469
*/
470-
static inline bool skb_vlan_inet_prepare(struct sk_buff *skb,
471-
bool inner_proto_inherit)
470+
static inline enum skb_drop_reason
471+
skb_vlan_inet_prepare(struct sk_buff *skb, bool inner_proto_inherit)
472472
{
473473
int nhlen = 0, maclen = inner_proto_inherit ? 0 : ETH_HLEN;
474474
__be16 type = skb->protocol;
475+
enum skb_drop_reason reason;
475476

476477
/* Essentially this is skb_protocol(skb, true)
477478
* And we get MAC len.
@@ -492,11 +493,13 @@ static inline bool skb_vlan_inet_prepare(struct sk_buff *skb,
492493
/* For ETH_P_IPV6/ETH_P_IP we make sure to pull
493494
* a base network header in skb->head.
494495
*/
495-
if (!pskb_may_pull(skb, maclen + nhlen))
496-
return false;
496+
reason = pskb_may_pull_reason(skb, maclen + nhlen);
497+
if (reason)
498+
return reason;
497499

498500
skb_set_network_header(skb, maclen);
499-
return true;
501+
502+
return SKB_NOT_DROPPED_YET;
500503
}
501504

502505
static inline int ip_encap_hlen(struct ip_tunnel_encap *e)

io_uring/rw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,8 @@ int io_read(struct io_kiocb *req, unsigned int issue_flags)
953953
if (ret >= 0)
954954
return kiocb_done(req, ret, issue_flags);
955955

956+
if (req->flags & REQ_F_BUFFERS_COMMIT)
957+
io_kbuf_recycle(req, issue_flags);
956958
return ret;
957959
}
958960

tools/testing/vsock/control.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
#include "timeout.h"
2929
#include "control.h"
30+
#include "util.h"
3031

3132
static int control_fd = -1;
3233

@@ -50,7 +51,6 @@ void control_init(const char *control_host,
5051

5152
for (ai = result; ai; ai = ai->ai_next) {
5253
int fd;
53-
int val = 1;
5454

5555
fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
5656
if (fd < 0)
@@ -65,11 +65,8 @@ void control_init(const char *control_host,
6565
break;
6666
}
6767

68-
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
69-
&val, sizeof(val)) < 0) {
70-
perror("setsockopt");
71-
exit(EXIT_FAILURE);
72-
}
68+
setsockopt_int_check(fd, SOL_SOCKET, SO_REUSEADDR, 1,
69+
"setsockopt SO_REUSEADDR");
7370

7471
if (bind(fd, ai->ai_addr, ai->ai_addrlen) < 0)
7572
goto next;

tools/testing/vsock/msg_zerocopy_common.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@
1414

1515
#include "msg_zerocopy_common.h"
1616

17-
void enable_so_zerocopy(int fd)
18-
{
19-
int val = 1;
20-
21-
if (setsockopt(fd, SOL_SOCKET, SO_ZEROCOPY, &val, sizeof(val))) {
22-
perror("setsockopt");
23-
exit(EXIT_FAILURE);
24-
}
25-
}
26-
2717
void vsock_recv_completion(int fd, const bool *zerocopied)
2818
{
2919
struct sock_extended_err *serr;

tools/testing/vsock/msg_zerocopy_common.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#define VSOCK_RECVERR 1
1313
#endif
1414

15-
void enable_so_zerocopy(int fd);
1615
void vsock_recv_completion(int fd, const bool *zerocopied);
1716

1817
#endif /* MSG_ZEROCOPY_COMMON_H */

tools/testing/vsock/util.c

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,3 +663,145 @@ void free_test_iovec(const struct iovec *test_iovec,
663663

664664
free(iovec);
665665
}
666+
667+
/* Set "unsigned long long" socket option and check that it's indeed set */
668+
void setsockopt_ull_check(int fd, int level, int optname,
669+
unsigned long long val, char const *errmsg)
670+
{
671+
unsigned long long chkval;
672+
socklen_t chklen;
673+
int err;
674+
675+
err = setsockopt(fd, level, optname, &val, sizeof(val));
676+
if (err) {
677+
fprintf(stderr, "setsockopt err: %s (%d)\n",
678+
strerror(errno), errno);
679+
goto fail;
680+
}
681+
682+
chkval = ~val; /* just make storage != val */
683+
chklen = sizeof(chkval);
684+
685+
err = getsockopt(fd, level, optname, &chkval, &chklen);
686+
if (err) {
687+
fprintf(stderr, "getsockopt err: %s (%d)\n",
688+
strerror(errno), errno);
689+
goto fail;
690+
}
691+
692+
if (chklen != sizeof(chkval)) {
693+
fprintf(stderr, "size mismatch: set %zu got %d\n", sizeof(val),
694+
chklen);
695+
goto fail;
696+
}
697+
698+
if (chkval != val) {
699+
fprintf(stderr, "value mismatch: set %llu got %llu\n", val,
700+
chkval);
701+
goto fail;
702+
}
703+
return;
704+
fail:
705+
fprintf(stderr, "%s val %llu\n", errmsg, val);
706+
exit(EXIT_FAILURE);
707+
;
708+
}
709+
710+
/* Set "int" socket option and check that it's indeed set */
711+
void setsockopt_int_check(int fd, int level, int optname, int val,
712+
char const *errmsg)
713+
{
714+
int chkval;
715+
socklen_t chklen;
716+
int err;
717+
718+
err = setsockopt(fd, level, optname, &val, sizeof(val));
719+
if (err) {
720+
fprintf(stderr, "setsockopt err: %s (%d)\n",
721+
strerror(errno), errno);
722+
goto fail;
723+
}
724+
725+
chkval = ~val; /* just make storage != val */
726+
chklen = sizeof(chkval);
727+
728+
err = getsockopt(fd, level, optname, &chkval, &chklen);
729+
if (err) {
730+
fprintf(stderr, "getsockopt err: %s (%d)\n",
731+
strerror(errno), errno);
732+
goto fail;
733+
}
734+
735+
if (chklen != sizeof(chkval)) {
736+
fprintf(stderr, "size mismatch: set %zu got %d\n", sizeof(val),
737+
chklen);
738+
goto fail;
739+
}
740+
741+
if (chkval != val) {
742+
fprintf(stderr, "value mismatch: set %d got %d\n", val, chkval);
743+
goto fail;
744+
}
745+
return;
746+
fail:
747+
fprintf(stderr, "%s val %d\n", errmsg, val);
748+
exit(EXIT_FAILURE);
749+
}
750+
751+
static void mem_invert(unsigned char *mem, size_t size)
752+
{
753+
size_t i;
754+
755+
for (i = 0; i < size; i++)
756+
mem[i] = ~mem[i];
757+
}
758+
759+
/* Set "timeval" socket option and check that it's indeed set */
760+
void setsockopt_timeval_check(int fd, int level, int optname,
761+
struct timeval val, char const *errmsg)
762+
{
763+
struct timeval chkval;
764+
socklen_t chklen;
765+
int err;
766+
767+
err = setsockopt(fd, level, optname, &val, sizeof(val));
768+
if (err) {
769+
fprintf(stderr, "setsockopt err: %s (%d)\n",
770+
strerror(errno), errno);
771+
goto fail;
772+
}
773+
774+
/* just make storage != val */
775+
chkval = val;
776+
mem_invert((unsigned char *)&chkval, sizeof(chkval));
777+
chklen = sizeof(chkval);
778+
779+
err = getsockopt(fd, level, optname, &chkval, &chklen);
780+
if (err) {
781+
fprintf(stderr, "getsockopt err: %s (%d)\n",
782+
strerror(errno), errno);
783+
goto fail;
784+
}
785+
786+
if (chklen != sizeof(chkval)) {
787+
fprintf(stderr, "size mismatch: set %zu got %d\n", sizeof(val),
788+
chklen);
789+
goto fail;
790+
}
791+
792+
if (memcmp(&chkval, &val, sizeof(val)) != 0) {
793+
fprintf(stderr, "value mismatch: set %ld:%ld got %ld:%ld\n",
794+
val.tv_sec, val.tv_usec, chkval.tv_sec, chkval.tv_usec);
795+
goto fail;
796+
}
797+
return;
798+
fail:
799+
fprintf(stderr, "%s val %ld:%ld\n", errmsg, val.tv_sec, val.tv_usec);
800+
exit(EXIT_FAILURE);
801+
}
802+
803+
void enable_so_zerocopy_check(int fd)
804+
{
805+
setsockopt_int_check(fd, SOL_SOCKET, SO_ZEROCOPY, 1,
806+
"setsockopt SO_ZEROCOPY");
807+
}

0 commit comments

Comments
 (0)