* [PATCH -stable 3.10 3.12 3.13] core, nfqueue, openvswitch: fix compilation warning
@ 2015-04-13 14:41 Jiri Slaby
2015-04-13 16:26 ` Kamal Mostafa
0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2015-04-13 14:41 UTC (permalink / raw)
To: stable
Cc: linux-kernel, Jiri Slaby, Zoltan Kiss, David S. Miller,
Ben Hutchings, Greg Kroah-Hartman, Kamal Mostafa
Stable commit "core, nfqueue, openvswitch: Orphan frags in
skb_zerocopy and handle errors", upstream commit
36d5fe6a000790f56039afe26834265db0a3ad4c, was not correctly backported
and missed to change a const 'from' parameter to non-const. This
results in a new batch of warnings:
net/netfilter/nfnetlink_queue_core.c: In function ‘nfqnl_zcopy’:
net/netfilter/nfnetlink_queue_core.c:272:2: warning: passing argument 1 of ‘skb_orphan_frags’ discards ‘const’ qualifier from pointer target type [enabled by default]
if (unlikely(skb_orphan_frags(from, GFP_ATOMIC))) {
^
In file included from net/netfilter/nfnetlink_queue_core.c:18:0:
include/linux/skbuff.h:1822:19: note: expected ‘struct sk_buff *’ but argument is of type ‘const struct sk_buff *’
static inline int skb_orphan_frags(struct sk_buff *skb, gfp_t gfp_mask)
^
net/netfilter/nfnetlink_queue_core.c:273:3: warning: passing argument 1 of ‘skb_tx_error’ discards ‘const’ qualifier from pointer target type [enabled by default]
skb_tx_error(from);
^
In file included from net/netfilter/nfnetlink_queue_core.c:18:0:
include/linux/skbuff.h:630:13: note: expected ‘struct sk_buff *’ but argument is of type ‘const struct sk_buff *’
extern void skb_tx_error(struct sk_buff *skb);
Remove const from the 'from' parameter, the same as in the upstream
commit.
As far as I can see, this leaked into 3.10, 3.12, and 3.13 already.
Cc: Zoltan Kiss <zoltan.kiss@citrix.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Kamal Mostafa <kamal.mostafa@canonical.com>
Cc: stable@vger.kernel.org # v3.10, v3.12, v3.13
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
net/netfilter/nfnetlink_queue_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c
index f5c34db24498..8abb522ec322 100644
--- a/net/netfilter/nfnetlink_queue_core.c
+++ b/net/netfilter/nfnetlink_queue_core.c
@@ -236,7 +236,7 @@ nfqnl_flush(struct nfqnl_instance *queue, nfqnl_cmpfn cmpfn, unsigned long data)
}
static int
-nfqnl_zcopy(struct sk_buff *to, const struct sk_buff *from, int len, int hlen)
+nfqnl_zcopy(struct sk_buff *to, struct sk_buff *from, int len, int hlen)
{
int i, j = 0;
int plen = 0; /* length of skb->head fragment */
--
2.3.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -stable 3.10 3.12 3.13] core, nfqueue, openvswitch: fix compilation warning
2015-04-13 14:41 [PATCH -stable 3.10 3.12 3.13] core, nfqueue, openvswitch: fix compilation warning Jiri Slaby
@ 2015-04-13 16:26 ` Kamal Mostafa
2015-04-14 8:13 ` Jiri Slaby
0 siblings, 1 reply; 3+ messages in thread
From: Kamal Mostafa @ 2015-04-13 16:26 UTC (permalink / raw)
To: Jiri Slaby
Cc: stable, linux-kernel, Zoltan Kiss, David S. Miller,
Ben Hutchings, Greg Kroah-Hartman, Kamal Mostafa
On Mon, 2015-04-13 at 16:41 +0200, Jiri Slaby wrote:
> Stable commit "core, nfqueue, openvswitch: Orphan frags in
> skb_zerocopy and handle errors", upstream commit
> 36d5fe6a000790f56039afe26834265db0a3ad4c, was not correctly backported
> and missed to change a const 'from' parameter to non-const. This
> results in a new batch of warnings:
Just FYI, the backport in 3.13-stable[0] -- Ben Hutchings' work --
actually does not exhibit this problem. nfqnl_zcopy() already has the
const removed and the file yields no compile warnings.
Thanks very much for the heads-up anyway, Jiri!
-Kamal
[0] http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=commitdiff;h=f2287ffc0e9c3d39cbc4ea9e2312640758201dfc
> net/netfilter/nfnetlink_queue_core.c: In function ‘nfqnl_zcopy’:
> net/netfilter/nfnetlink_queue_core.c:272:2: warning: passing argument 1 of ‘skb_orphan_frags’ discards ‘const’ qualifier from pointer target type [enabled by default]
> if (unlikely(skb_orphan_frags(from, GFP_ATOMIC))) {
> ^
> In file included from net/netfilter/nfnetlink_queue_core.c:18:0:
> include/linux/skbuff.h:1822:19: note: expected ‘struct sk_buff *’ but argument is of type ‘const struct sk_buff *’
> static inline int skb_orphan_frags(struct sk_buff *skb, gfp_t gfp_mask)
> ^
> net/netfilter/nfnetlink_queue_core.c:273:3: warning: passing argument 1 of ‘skb_tx_error’ discards ‘const’ qualifier from pointer target type [enabled by default]
> skb_tx_error(from);
> ^
> In file included from net/netfilter/nfnetlink_queue_core.c:18:0:
> include/linux/skbuff.h:630:13: note: expected ‘struct sk_buff *’ but argument is of type ‘const struct sk_buff *’
> extern void skb_tx_error(struct sk_buff *skb);
>
> Remove const from the 'from' parameter, the same as in the upstream
> commit.
>
> As far as I can see, this leaked into 3.10, 3.12, and 3.13 already.
>
> Cc: Zoltan Kiss <zoltan.kiss@citrix.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Ben Hutchings <ben@decadent.org.uk>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Kamal Mostafa <kamal.mostafa@canonical.com>
> Cc: stable@vger.kernel.org # v3.10, v3.12, v3.13
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> ---
> net/netfilter/nfnetlink_queue_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c
> index f5c34db24498..8abb522ec322 100644
> --- a/net/netfilter/nfnetlink_queue_core.c
> +++ b/net/netfilter/nfnetlink_queue_core.c
> @@ -236,7 +236,7 @@ nfqnl_flush(struct nfqnl_instance *queue, nfqnl_cmpfn cmpfn, unsigned long data)
> }
>
> static int
> -nfqnl_zcopy(struct sk_buff *to, const struct sk_buff *from, int len, int hlen)
> +nfqnl_zcopy(struct sk_buff *to, struct sk_buff *from, int len, int hlen)
> {
> int i, j = 0;
> int plen = 0; /* length of skb->head fragment */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -stable 3.10 3.12 3.13] core, nfqueue, openvswitch: fix compilation warning
2015-04-13 16:26 ` Kamal Mostafa
@ 2015-04-14 8:13 ` Jiri Slaby
0 siblings, 0 replies; 3+ messages in thread
From: Jiri Slaby @ 2015-04-14 8:13 UTC (permalink / raw)
To: Kamal Mostafa
Cc: stable, linux-kernel, Zoltan Kiss, David S. Miller,
Ben Hutchings, Greg Kroah-Hartman, Kamal Mostafa
On 04/13/2015, 06:26 PM, Kamal Mostafa wrote:
> On Mon, 2015-04-13 at 16:41 +0200, Jiri Slaby wrote:
>> Stable commit "core, nfqueue, openvswitch: Orphan frags in
>> skb_zerocopy and handle errors", upstream commit
>> 36d5fe6a000790f56039afe26834265db0a3ad4c, was not correctly backported
>> and missed to change a const 'from' parameter to non-const. This
>> results in a new batch of warnings:
>
> Just FYI, the backport in 3.13-stable[0] -- Ben Hutchings' work --
> actually does not exhibit this problem. nfqnl_zcopy() already has the
> const removed and the file yields no compile warnings.
That is quite interesting, because 3.10's version supposed to be the
Ben's 3.13 backport too, according to the commit log. Maybe a
wrong/older version was merged to 3.10 (and 3.12)?
> [0] http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=commitdiff;h=f2287ffc0e9c3d39cbc4ea9e2312640758201dfc
thanks,
--
js
suse labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-04-14 8:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-13 14:41 [PATCH -stable 3.10 3.12 3.13] core, nfqueue, openvswitch: fix compilation warning Jiri Slaby
2015-04-13 16:26 ` Kamal Mostafa
2015-04-14 8:13 ` Jiri Slaby
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.