diff mbox

[3.5.y.z,extended,stable] Patch "net: fix *_DIAG_MAX constants" has been added to staging queue

Message ID 1365081929-14542-1-git-send-email-luis.henriques@canonical.com
State New
Headers show

Commit Message

Luis Henriques April 4, 2013, 1:25 p.m. UTC
This is a note to let you know that I have just added a patch titled

    net: fix *_DIAG_MAX constants

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

From c55d74e5038e641a709cda2044e0b145e71cb8cc Mon Sep 17 00:00:00 2001
From: Andrey Vagin <avagin@openvz.org>
Date: Thu, 21 Mar 2013 20:33:46 +0400
Subject: [PATCH] net: fix *_DIAG_MAX constants

commit ae5fc98728c8bbbd6d7cab0b9781671fc4419c1b upstream.

Follow the common pattern and define *_DIAG_MAX like:

        [...]
        __XXX_DIAG_MAX,
};

Because everyone is used to do:

        struct nlattr *attrs[XXX_DIAG_MAX+1];

        nla_parse([...], XXX_DIAG_MAX, [...]

Reported-by: Thomas Graf <tgraf@suug.ch>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ luis: backport to 3.5:
  - fix unix_diag.h path
  - packet_diag.h does not exist ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 include/linux/unix_diag.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--
1.8.1.2
diff mbox

Patch

diff --git a/include/linux/unix_diag.h b/include/linux/unix_diag.h
index b1d2bf1..0ff4d32 100644
--- a/include/linux/unix_diag.h
+++ b/include/linux/unix_diag.h
@@ -38,9 +38,11 @@  enum {
 	UNIX_DIAG_RQLEN,
 	UNIX_DIAG_MEMINFO,

-	UNIX_DIAG_MAX,
+	__UNIX_DIAG_MAX,
 };

+#define UNIX_DIAG_MAX (__UNIX_DIAG_MAX - 1)
+
 struct unix_diag_vfs {
 	__u32	udiag_vfs_ino;
 	__u32	udiag_vfs_dev;