* + include-net-sockh-squelch-compiler-warning-in-sk_rmem_schedule.patch added to -mm tree
@ 2012-09-04 20:44 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2012-09-04 20:44 UTC (permalink / raw)
To: mm-commits; +Cc: chuck.lever, davem, js1304, mgorman, penberg, rientjes
The patch titled
Subject: include/net/sock.h: squelch compiler warning in sk_rmem_schedule()
has been added to the -mm tree. Its filename is
include-net-sockh-squelch-compiler-warning-in-sk_rmem_schedule.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Chuck Lever <chuck.lever@oracle.com>
Subject: include/net/sock.h: squelch compiler warning in sk_rmem_schedule()
In file included from linux/include/linux/tcp.h:227:0,
from linux/include/linux/ipv6.h:221,
from linux/include/net/ipv6.h:16,
from linux/include/linux/sunrpc/clnt.h:26,
from linux/net/sunrpc/stats.c:22:
linux/include/net/sock.h: In function `sk_rmem_schedule':
linux/nfs-2.6/include/net/sock.h:1339:13: warning: comparison between
signed and unsigned integer expressions [-Wsign-compare]
Seen with gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2) using the
-Wextra option.
c76562b6 ("netvm: prevent a stream-specific deadlock") accidentally
replaced the "size" parameter of sk_rmem_schedule() with an unsigned int.
This changes the semantics of the comparison in the return statement.
In sk_wmem_schedule we have syntactically the same comparison, but "size"
is a signed integer. In addition, __sk_mem_schedule() takes a signed
integer for its "size" parameter, so there is an implicit type conversion
in sk_rmem_schedule() anyway.
Revert the "size" parameter back to a signed integer so that the semantics
of the expressions in both sk_[rw]mem_schedule() are exactly the same.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Cc: David Miller <davem@davemloft.net>
Cc: Joonsoo Kim <js1304@gmail.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/net/sock.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN include/net/sock.h~include-net-sockh-squelch-compiler-warning-in-sk_rmem_schedule include/net/sock.h
--- a/include/net/sock.h~include-net-sockh-squelch-compiler-warning-in-sk_rmem_schedule
+++ a/include/net/sock.h
@@ -1332,7 +1332,7 @@ static inline bool sk_wmem_schedule(stru
}
static inline bool
-sk_rmem_schedule(struct sock *sk, struct sk_buff *skb, unsigned int size)
+sk_rmem_schedule(struct sock *sk, struct sk_buff *skb, int size)
{
if (!sk_has_account(sk))
return true;
_
Patches currently in -mm which might be from chuck.lever@oracle.com are
slab-do-clearslabpfmemalloc-for-all-pages-of-slab.patch
slab-fix-starting-index-for-finding-another-object.patch
slub-consider-pfmemalloc_match-in-get_partial_node.patch
include-net-sockh-squelch-compiler-warning-in-sk_rmem_schedule.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-09-04 20:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-04 20:44 + include-net-sockh-squelch-compiler-warning-in-sk_rmem_schedule.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.