All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] cgroup: Fix sock_cgroup_data on big-endian.
@ 2020-07-09 23:32 David Miller
  2020-07-10  0:01 ` Cong Wang
  2020-07-10  0:03 ` Jakub Kicinski
  0 siblings, 2 replies; 6+ messages in thread
From: David Miller @ 2020-07-09 23:32 UTC (permalink / raw)
  To: netdev; +Cc: xiyou.wangcong, linux


From: Cong Wang <xiyou.wangcong@gmail.com>

In order for no_refcnt and is_data to be the lowest order two
bits in the 'val' we have to pad out the bitfield of the u8.

Fixes: ad0f75e5f57c ("cgroup: fix cgroup_sk_alloc() for sk_clone_lock()")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 include/linux/cgroup-defs.h | 2 ++
 1 file changed, 2 insertions(+)

Applied and queued up for -stable.

diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h
index 4f1cd0edc57d..fee0b5547cd0 100644
--- a/include/linux/cgroup-defs.h
+++ b/include/linux/cgroup-defs.h
@@ -792,6 +792,7 @@ struct sock_cgroup_data {
 		struct {
 			u8	is_data : 1;
 			u8	no_refcnt : 1;
+			u8	unused : 6;
 			u8	padding;
 			u16	prioidx;
 			u32	classid;
@@ -801,6 +802,7 @@ struct sock_cgroup_data {
 			u32	classid;
 			u16	prioidx;
 			u8	padding;
+			u8	unused : 6;
 			u8	no_refcnt : 1;
 			u8	is_data : 1;
 		} __packed;
-- 
2.26.2


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

* Re: [PATCH net] cgroup: Fix sock_cgroup_data on big-endian.
  2020-07-09 23:32 [PATCH net] cgroup: Fix sock_cgroup_data on big-endian David Miller
@ 2020-07-10  0:01 ` Cong Wang
  2020-07-10  0:03 ` Jakub Kicinski
  1 sibling, 0 replies; 6+ messages in thread
From: Cong Wang @ 2020-07-10  0:01 UTC (permalink / raw)
  To: David Miller; +Cc: Linux Kernel Network Developers, Guenter Roeck

On Thu, Jul 9, 2020 at 4:32 PM David Miller <davem@davemloft.net> wrote:
>
>
> From: Cong Wang <xiyou.wangcong@gmail.com>
>
> In order for no_refcnt and is_data to be the lowest order two
> bits in the 'val' we have to pad out the bitfield of the u8.
>
> Fixes: ad0f75e5f57c ("cgroup: fix cgroup_sk_alloc() for sk_clone_lock()")
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: David S. Miller <davem@davemloft.net>

Thanks a lot for sending this out (and correcting a stupid syntax
error from me)!

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

* Re: [PATCH net] cgroup: Fix sock_cgroup_data on big-endian.
  2020-07-09 23:32 [PATCH net] cgroup: Fix sock_cgroup_data on big-endian David Miller
  2020-07-10  0:01 ` Cong Wang
@ 2020-07-10  0:03 ` Jakub Kicinski
  2020-07-10 20:47   ` David Miller
  1 sibling, 1 reply; 6+ messages in thread
From: Jakub Kicinski @ 2020-07-10  0:03 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, xiyou.wangcong, linux

On Thu, 09 Jul 2020 16:32:35 -0700 (PDT) David Miller wrote:
> From: Cong Wang <xiyou.wangcong@gmail.com>
> 
> In order for no_refcnt and is_data to be the lowest order two
> bits in the 'val' we have to pad out the bitfield of the u8.
> 
> Fixes: ad0f75e5f57c ("cgroup: fix cgroup_sk_alloc() for sk_clone_lock()")
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: David S. Miller <davem@davemloft.net>

FWIW Cong's listed in From: but there's no sign-off from him so the
signoff checking script may get upset about this one.

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

* Re: [PATCH net] cgroup: Fix sock_cgroup_data on big-endian.
  2020-07-10  0:03 ` Jakub Kicinski
@ 2020-07-10 20:47   ` David Miller
  2020-07-10 20:54     ` Jakub Kicinski
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2020-07-10 20:47 UTC (permalink / raw)
  To: kuba; +Cc: netdev, xiyou.wangcong, linux

From: Jakub Kicinski <kuba@kernel.org>
Date: Thu, 9 Jul 2020 17:03:20 -0700

> On Thu, 09 Jul 2020 16:32:35 -0700 (PDT) David Miller wrote:
>> From: Cong Wang <xiyou.wangcong@gmail.com>
>> 
>> In order for no_refcnt and is_data to be the lowest order two
>> bits in the 'val' we have to pad out the bitfield of the u8.
>> 
>> Fixes: ad0f75e5f57c ("cgroup: fix cgroup_sk_alloc() for sk_clone_lock()")
>> Reported-by: Guenter Roeck <linux@roeck-us.net>
>> Signed-off-by: David S. Miller <davem@davemloft.net>
> 
> FWIW Cong's listed in From: but there's no sign-off from him so the
> signoff checking script may get upset about this one.

I wonder how I should handle that situation though?  I want to give
Cong credit for the change, and not take full credit for it myself.

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

* Re: [PATCH net] cgroup: Fix sock_cgroup_data on big-endian.
  2020-07-10 20:47   ` David Miller
@ 2020-07-10 20:54     ` Jakub Kicinski
  2020-07-10 21:44       ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Jakub Kicinski @ 2020-07-10 20:54 UTC (permalink / raw)
  To: David Miller, xiyou.wangcong; +Cc: netdev, linux

On Fri, 10 Jul 2020 13:47:47 -0700 (PDT) David Miller wrote:
> From: Jakub Kicinski <kuba@kernel.org>
> Date: Thu, 9 Jul 2020 17:03:20 -0700
> 
> > On Thu, 09 Jul 2020 16:32:35 -0700 (PDT) David Miller wrote:  
> >> From: Cong Wang <xiyou.wangcong@gmail.com>
> >> 
> >> In order for no_refcnt and is_data to be the lowest order two
> >> bits in the 'val' we have to pad out the bitfield of the u8.
> >> 
> >> Fixes: ad0f75e5f57c ("cgroup: fix cgroup_sk_alloc() for sk_clone_lock()")
> >> Reported-by: Guenter Roeck <linux@roeck-us.net>
> >> Signed-off-by: David S. Miller <davem@davemloft.net>  
> > 
> > FWIW Cong's listed in From: but there's no sign-off from him so the
> > signoff checking script may get upset about this one.  
> 
> I wonder how I should handle that situation though?  I want to give
> Cong credit for the change, and not take full credit for it myself.

Cong, would you mind responding with a Sign-off for the patch?

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

* Re: [PATCH net] cgroup: Fix sock_cgroup_data on big-endian.
  2020-07-10 20:54     ` Jakub Kicinski
@ 2020-07-10 21:44       ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2020-07-10 21:44 UTC (permalink / raw)
  To: kuba; +Cc: xiyou.wangcong, netdev, linux

From: Jakub Kicinski <kuba@kernel.org>
Date: Fri, 10 Jul 2020 13:54:24 -0700

> On Fri, 10 Jul 2020 13:47:47 -0700 (PDT) David Miller wrote:
>> From: Jakub Kicinski <kuba@kernel.org>
>> Date: Thu, 9 Jul 2020 17:03:20 -0700
>> 
>> > On Thu, 09 Jul 2020 16:32:35 -0700 (PDT) David Miller wrote:  
>> >> From: Cong Wang <xiyou.wangcong@gmail.com>
>> >> 
>> >> In order for no_refcnt and is_data to be the lowest order two
>> >> bits in the 'val' we have to pad out the bitfield of the u8.
>> >> 
>> >> Fixes: ad0f75e5f57c ("cgroup: fix cgroup_sk_alloc() for sk_clone_lock()")
>> >> Reported-by: Guenter Roeck <linux@roeck-us.net>
>> >> Signed-off-by: David S. Miller <davem@davemloft.net>  
>> > 
>> > FWIW Cong's listed in From: but there's no sign-off from him so the
>> > signoff checking script may get upset about this one.  
>> 
>> I wonder how I should handle that situation though?  I want to give
>> Cong credit for the change, and not take full credit for it myself.
> 
> Cong, would you mind responding with a Sign-off for the patch?

That's not useful for two reasons:

1) This commit is in my tree and the commit message is immutable.

2) I needed to apply this patch because I didn't have time to wait for
   a turn-around from Cong or anyone else.  That's the situation where
   I'm asking "what should I do in this situation?"  I don't have the
   luxury of waiting for the author to reply and add a signoff because
   I'm trying to get a pull request out to Linus with the fix or
   similar.

Is it more clear now? :-)

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

end of thread, other threads:[~2020-07-10 21:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 23:32 [PATCH net] cgroup: Fix sock_cgroup_data on big-endian David Miller
2020-07-10  0:01 ` Cong Wang
2020-07-10  0:03 ` Jakub Kicinski
2020-07-10 20:47   ` David Miller
2020-07-10 20:54     ` Jakub Kicinski
2020-07-10 21:44       ` David Miller

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.