netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] Labeled networking fixes for 2.6.28
@ 2008-10-30 17:10 Paul Moore
  2008-10-30 17:10 ` [PATCH 1/3] cipso: unsigned buf_len cannot be negative Paul Moore
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Paul Moore @ 2008-10-30 17:10 UTC (permalink / raw)
  To: netdev

Three small fixes to solve compiler warnings and a possible run-time issue,
please pull from the following tree:

 git://git.infradead.org/users/pcmoore/lblnet-2.6

Thanks.

---

Manish Katiyar (1):
      netlabel: Fix compilation warnings in net/netlabel/netlabel_addrlist.c

Paul Moore (1):
      netlabel: Fix compiler warnings in netlabel_mgmt.c

roel kluin (1):
      cipso: unsigned buf_len cannot be negative


 net/ipv4/cipso_ipv4.c            |    7 ++++---
 net/netlabel/netlabel_addrlist.c |    2 ++
 net/netlabel/netlabel_addrlist.h |   22 ++++++++++++++++++++++
 net/netlabel/netlabel_mgmt.c     |    2 +-
 4 files changed, 29 insertions(+), 4 deletions(-)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] cipso: unsigned buf_len cannot be negative
  2008-10-30 17:10 [GIT PULL] Labeled networking fixes for 2.6.28 Paul Moore
@ 2008-10-30 17:10 ` Paul Moore
  2008-10-30 17:10 ` [PATCH 2/3] netlabel: Fix compiler warnings in netlabel_mgmt.c Paul Moore
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Moore @ 2008-10-30 17:10 UTC (permalink / raw)
  To: netdev

From: roel kluin <roel.kluin@gmail.com>

unsigned buf_len cannot be negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Moore <paul.moore@hp.com>
---

 net/ipv4/cipso_ipv4.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c
index 490e035..2e78f6b 100644
--- a/net/ipv4/cipso_ipv4.c
+++ b/net/ipv4/cipso_ipv4.c
@@ -2063,9 +2063,10 @@ int cipso_v4_skbuff_setattr(struct sk_buff *skb,
 	u32 opt_len;
 	int len_delta;
 
-	buf_len = cipso_v4_genopt(buf, buf_len, doi_def, secattr);
-	if (buf_len < 0)
-		return buf_len;
+	ret_val = cipso_v4_genopt(buf, buf_len, doi_def, secattr);
+	if (ret_val < 0)
+		return ret_val;
+	buf_len = ret_val;
 	opt_len = (buf_len + 3) & ~3;
 
 	/* we overwrite any existing options to ensure that we have enough


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] netlabel: Fix compiler warnings in netlabel_mgmt.c
  2008-10-30 17:10 [GIT PULL] Labeled networking fixes for 2.6.28 Paul Moore
  2008-10-30 17:10 ` [PATCH 1/3] cipso: unsigned buf_len cannot be negative Paul Moore
@ 2008-10-30 17:10 ` Paul Moore
  2008-10-30 17:10 ` [PATCH 3/3] netlabel: Fix compilation warnings in net/netlabel/netlabel_addrlist.c Paul Moore
  2008-10-31  6:57 ` [GIT PULL] Labeled networking fixes for 2.6.28 David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Moore @ 2008-10-30 17:10 UTC (permalink / raw)
  To: netdev

Fix the compiler warnings below, thanks to Andrew Morton for finding them.

 net/netlabel/netlabel_mgmt.c: In function `netlbl_mgmt_listentry':
 net/netlabel/netlabel_mgmt.c:268: warning: 'ret_val' might be used
  uninitialized in this function

Signed-off-by: Paul Moore <paul.moore@hp.com>
---

 net/netlabel/netlabel_mgmt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c
index ee769ec..0a0ef17 100644
--- a/net/netlabel/netlabel_mgmt.c
+++ b/net/netlabel/netlabel_mgmt.c
@@ -265,7 +265,7 @@ add_failure:
 static int netlbl_mgmt_listentry(struct sk_buff *skb,
 				 struct netlbl_dom_map *entry)
 {
-	int ret_val;
+	int ret_val = 0;
 	struct nlattr *nla_a;
 	struct nlattr *nla_b;
 	struct netlbl_af4list *iter4;


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] netlabel: Fix compilation warnings in net/netlabel/netlabel_addrlist.c
  2008-10-30 17:10 [GIT PULL] Labeled networking fixes for 2.6.28 Paul Moore
  2008-10-30 17:10 ` [PATCH 1/3] cipso: unsigned buf_len cannot be negative Paul Moore
  2008-10-30 17:10 ` [PATCH 2/3] netlabel: Fix compiler warnings in netlabel_mgmt.c Paul Moore
@ 2008-10-30 17:10 ` Paul Moore
  2008-10-31  6:57 ` [GIT PULL] Labeled networking fixes for 2.6.28 David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Moore @ 2008-10-30 17:10 UTC (permalink / raw)
  To: netdev

From: Manish Katiyar <mkatiyar@gmail.com>

Enable netlabel auditing functions only when CONFIG_AUDIT is set

Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Signed-off-by: Paul Moore <paul.moore@hp.com>
---

 net/netlabel/netlabel_addrlist.c |    2 ++
 net/netlabel/netlabel_addrlist.h |   22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/net/netlabel/netlabel_addrlist.c b/net/netlabel/netlabel_addrlist.c
index b0925a3..249f6b9 100644
--- a/net/netlabel/netlabel_addrlist.c
+++ b/net/netlabel/netlabel_addrlist.c
@@ -315,6 +315,7 @@ struct netlbl_af6list *netlbl_af6list_remove(const struct in6_addr *addr,
  * Audit Helper Functions
  */
 
+#ifdef CONFIG_AUDIT
 /**
  * netlbl_af4list_audit_addr - Audit an IPv4 address
  * @audit_buf: audit buffer
@@ -386,3 +387,4 @@ void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
 	}
 }
 #endif /* IPv6 */
+#endif /* CONFIG_AUDIT */
diff --git a/net/netlabel/netlabel_addrlist.h b/net/netlabel/netlabel_addrlist.h
index 0242bea..07ae7fd 100644
--- a/net/netlabel/netlabel_addrlist.h
+++ b/net/netlabel/netlabel_addrlist.h
@@ -120,9 +120,19 @@ struct netlbl_af4list *netlbl_af4list_search(__be32 addr,
 struct netlbl_af4list *netlbl_af4list_search_exact(__be32 addr,
 						   __be32 mask,
 						   struct list_head *head);
+
+#ifdef CONFIG_AUDIT
 void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
 			       int src, const char *dev,
 			       __be32 addr, __be32 mask);
+#else
+static inline void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
+					     int src, const char *dev,
+					     __be32 addr, __be32 mask)
+{
+	return;
+}
+#endif
 
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 
@@ -179,11 +189,23 @@ struct netlbl_af6list *netlbl_af6list_search(const struct in6_addr *addr,
 struct netlbl_af6list *netlbl_af6list_search_exact(const struct in6_addr *addr,
 						   const struct in6_addr *mask,
 						   struct list_head *head);
+
+#ifdef CONFIG_AUDIT
 void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
 			       int src,
 			       const char *dev,
 			       const struct in6_addr *addr,
 			       const struct in6_addr *mask);
+#else
+static inline void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
+					     int src,
+					     const char *dev,
+					     const struct in6_addr *addr,
+					     const struct in6_addr *mask)
+{
+	return;
+}
+#endif
 #endif /* IPV6 */
 
 #endif


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [GIT PULL] Labeled networking fixes for 2.6.28
  2008-10-30 17:10 [GIT PULL] Labeled networking fixes for 2.6.28 Paul Moore
                   ` (2 preceding siblings ...)
  2008-10-30 17:10 ` [PATCH 3/3] netlabel: Fix compilation warnings in net/netlabel/netlabel_addrlist.c Paul Moore
@ 2008-10-31  6:57 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2008-10-31  6:57 UTC (permalink / raw)
  To: paul.moore; +Cc: netdev

From: Paul Moore <paul.moore@hp.com>
Date: Thu, 30 Oct 2008 13:10:13 -0400

> Three small fixes to solve compiler warnings and a possible run-time issue,
> please pull from the following tree:
> 
>  git://git.infradead.org/users/pcmoore/lblnet-2.6

Pulled, thanks a lot Paul.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-31  6:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-30 17:10 [GIT PULL] Labeled networking fixes for 2.6.28 Paul Moore
2008-10-30 17:10 ` [PATCH 1/3] cipso: unsigned buf_len cannot be negative Paul Moore
2008-10-30 17:10 ` [PATCH 2/3] netlabel: Fix compiler warnings in netlabel_mgmt.c Paul Moore
2008-10-30 17:10 ` [PATCH 3/3] netlabel: Fix compilation warnings in net/netlabel/netlabel_addrlist.c Paul Moore
2008-10-31  6:57 ` [GIT PULL] Labeled networking fixes for 2.6.28 David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).