Hi all,
After merging the net-next tree, today's linux-next build (sparc64
defconfig) failed like this:
net/core/sock.c: In function 'sock_setsockopt':
net/core/sock.c:1417:7: error: 'SO_RESERVE_MEM' undeclared (first use in this function); did you mean 'IORESOURCE_MEM'?
case SO_RESERVE_MEM:
^~~~~~~~~~~~~~
IORESOURCE_MEM
net/core/sock.c:1417:7: note: each undeclared identifier is reported only once for each function it appears in
net/core/sock.c: In function 'sock_getsockopt':
net/core/sock.c:1817:7: error: 'SO_RESERVE_MEM' undeclared (first use in this function); did you mean 'IORESOURCE_MEM'?
case SO_RESERVE_MEM:
^~~~~~~~~~~~~~
IORESOURCE_MEM
Caused by commit
2bb2f5fb21b0 ("net: add new socket option SO_RESERVE_MEM")
arch/sparc/include/uapi/socket.h does not include uapi/asm/socket.h and
some other architectures do not as well.
I have added the following patch for today (I searched for SO_BUF_LOCK
and, of these architectures, I have only compile tested sparc64 and
sparc):
From: Stephen Rothwell <[email protected]>
Date: Fri, 1 Oct 2021 15:51:50 +1000
Subject: [PATCH] fix up for "net: add new socket option SO_RESERVE_MEM"
Some architectures do not include uapi/asm/socket.h
Fixes: 2bb2f5fb21b0 ("net: add new socket option SO_RESERVE_MEM")
Signed-off-by: Stephen Rothwell <[email protected]>
---
arch/alpha/include/uapi/asm/socket.h | 2 ++
arch/mips/include/uapi/asm/socket.h | 2 ++
arch/parisc/include/uapi/asm/socket.h | 2 ++
arch/sparc/include/uapi/asm/socket.h | 2 ++
4 files changed, 8 insertions(+)
diff --git a/arch/alpha/include/uapi/asm/socket.h b/arch/alpha/include/uapi/asm/socket.h
index 1dd9baf4a6c2..284d28755b8d 100644
--- a/arch/alpha/include/uapi/asm/socket.h
+++ b/arch/alpha/include/uapi/asm/socket.h
@@ -131,6 +131,8 @@
#define SO_BUF_LOCK 72
+#define SO_RESERVE_MEM 73
+
#if !defined(__KERNEL__)
#if __BITS_PER_LONG == 64
diff --git a/arch/mips/include/uapi/asm/socket.h b/arch/mips/include/uapi/asm/socket.h
index 1eaf6a1ca561..24e0efb360f6 100644
--- a/arch/mips/include/uapi/asm/socket.h
+++ b/arch/mips/include/uapi/asm/socket.h
@@ -142,6 +142,8 @@
#define SO_BUF_LOCK 72
+#define SO_RESERVE_MEM 73
+
#if !defined(__KERNEL__)
#if __BITS_PER_LONG == 64
diff --git a/arch/parisc/include/uapi/asm/socket.h b/arch/parisc/include/uapi/asm/socket.h
index 8baaad52d799..845ddc63c882 100644
--- a/arch/parisc/include/uapi/asm/socket.h
+++ b/arch/parisc/include/uapi/asm/socket.h
@@ -123,6 +123,8 @@
#define SO_BUF_LOCK 0x4046
+#define SO_RESERVE_MEM 0x4047
+
#if !defined(__KERNEL__)
#if __BITS_PER_LONG == 64
diff --git a/arch/sparc/include/uapi/asm/socket.h b/arch/sparc/include/uapi/asm/socket.h
index e80ee8641ac3..9e9ceee6358f 100644
--- a/arch/sparc/include/uapi/asm/socket.h
+++ b/arch/sparc/include/uapi/asm/socket.h
@@ -124,6 +124,8 @@
#define SO_BUF_LOCK 0x0051
+#define SO_RESERVE_MEM 0x0052
+
#if !defined(__KERNEL__)
--
2.33.0
--
Cheers,
Stephen Rothwell
From: Stephen Rothwell <[email protected]>
Date: Fri, 1 Oct 2021 16:18:49 +1000
> Hi all,
>
> After merging the net-next tree, today's linux-next build (sparc64
> defconfig) failed like this:
>
> net/core/sock.c: In function 'sock_setsockopt':
> net/core/sock.c:1417:7: error: 'SO_RESERVE_MEM' undeclared (first use in this function); did you mean 'IORESOURCE_MEM'?
> case SO_RESERVE_MEM:
> ^~~~~~~~~~~~~~
> IORESOURCE_MEM
> net/core/sock.c:1417:7: note: each undeclared identifier is reported only once for each function it appears in
> net/core/sock.c: In function 'sock_getsockopt':
> net/core/sock.c:1817:7: error: 'SO_RESERVE_MEM' undeclared (first use in this function); did you mean 'IORESOURCE_MEM'?
> case SO_RESERVE_MEM:
> ^~~~~~~~~~~~~~
> IORESOURCE_MEM
>
> Caused by commit
>
> 2bb2f5fb21b0 ("net: add new socket option SO_RESERVE_MEM")
>
> arch/sparc/include/uapi/socket.h does not include uapi/asm/socket.h and
> some other architectures do not as well.
>
> I have added the following patch for today (I searched for SO_BUF_LOCK
> and, of these architectures, I have only compile tested sparc64 and
> sparc):
I committed the sparc part into net-next today, thanks.
From: David Miller <[email protected]>
Date: Fri, 01 Oct 2021 14:40:46 +0100 (BST)
> I committed the sparc part into net-next today, thanks.
I put the rest into the tree now too, thank you.
Hi Dave,
On Fri, 01 Oct 2021 14:40:46 +0100 (BST) David Miller <[email protected]> wrote:
>
> From: Stephen Rothwell <[email protected]>
> Date: Fri, 1 Oct 2021 16:18:49 +1000
>
> > Hi all,
> >
> > After merging the net-next tree, today's linux-next build (sparc64
> > defconfig) failed like this:
> >
> > net/core/sock.c: In function 'sock_setsockopt':
> > net/core/sock.c:1417:7: error: 'SO_RESERVE_MEM' undeclared (first use in this function); did you mean 'IORESOURCE_MEM'?
> > case SO_RESERVE_MEM:
> > ^~~~~~~~~~~~~~
> > IORESOURCE_MEM
> > net/core/sock.c:1417:7: note: each undeclared identifier is reported only once for each function it appears in
> > net/core/sock.c: In function 'sock_getsockopt':
> > net/core/sock.c:1817:7: error: 'SO_RESERVE_MEM' undeclared (first use in this function); did you mean 'IORESOURCE_MEM'?
> > case SO_RESERVE_MEM:
> > ^~~~~~~~~~~~~~
> > IORESOURCE_MEM
> >
> > Caused by commit
> >
> > 2bb2f5fb21b0 ("net: add new socket option SO_RESERVE_MEM")
> >
> > arch/sparc/include/uapi/socket.h does not include uapi/asm/socket.h and
> > some other architectures do not as well.
> >
> > I have added the following patch for today (I searched for SO_BUF_LOCK
> > and, of these architectures, I have only compile tested sparc64 and
> > sparc):
>
> I committed the sparc part into net-next today, thanks.
Unfortunately, there is a typo in what you committed in bfaf03935f74
("sparc: add SO_RESERVE_MEM definition."), SO_RESEVE_MEM instead of
SO_RESERVE_MEM ...
--
Cheers,
Stephen Rothwell
On Mon, Oct 4, 2021 at 6:12 PM Stephen Rothwell <[email protected]> wrote:
>
> Hi Dave,
>
> On Fri, 01 Oct 2021 14:40:46 +0100 (BST) David Miller <[email protected]> wrote:
> >
> > From: Stephen Rothwell <[email protected]>
> > Date: Fri, 1 Oct 2021 16:18:49 +1000
> >
> > > Hi all,
> > >
> > > After merging the net-next tree, today's linux-next build (sparc64
> > > defconfig) failed like this:
> > >
> > > net/core/sock.c: In function 'sock_setsockopt':
> > > net/core/sock.c:1417:7: error: 'SO_RESERVE_MEM' undeclared (first use in this function); did you mean 'IORESOURCE_MEM'?
> > > case SO_RESERVE_MEM:
> > > ^~~~~~~~~~~~~~
> > > IORESOURCE_MEM
> > > net/core/sock.c:1417:7: note: each undeclared identifier is reported only once for each function it appears in
> > > net/core/sock.c: In function 'sock_getsockopt':
> > > net/core/sock.c:1817:7: error: 'SO_RESERVE_MEM' undeclared (first use in this function); did you mean 'IORESOURCE_MEM'?
> > > case SO_RESERVE_MEM:
> > > ^~~~~~~~~~~~~~
> > > IORESOURCE_MEM
> > >
> > > Caused by commit
> > >
> > > 2bb2f5fb21b0 ("net: add new socket option SO_RESERVE_MEM")
> > >
> > > arch/sparc/include/uapi/socket.h does not include uapi/asm/socket.h and
> > > some other architectures do not as well.
> > >
> > > I have added the following patch for today (I searched for SO_BUF_LOCK
> > > and, of these architectures, I have only compile tested sparc64 and
> > > sparc):
> >
> > I committed the sparc part into net-next today, thanks.
>
> Unfortunately, there is a typo in what you committed in bfaf03935f74
> ("sparc: add SO_RESERVE_MEM definition."), SO_RESEVE_MEM instead of
> SO_RESERVE_MEM ...
>
Thanks Stephen for the report and thanks a lot David for submitting
the fix. Let me know if I need to do the fix.
> --
> Cheers,
> Stephen Rothwell
From: Stephen Rothwell <[email protected]>
Date: Tue, 5 Oct 2021 12:11:54 +1100
> Unfortunately, there is a typo in what you committed in bfaf03935f74
> ("sparc: add SO_RESERVE_MEM definition."), SO_RESEVE_MEM instead of
> SO_RESERVE_MEM ...
Thanks for catching that. Should be fixed now.
Thanks again.