Re: [PATCH 07/17] net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

2018-06-16 Thread David Woodhouse
On Sat, 2018-06-16 at 03:44 +, Kevin Darbyshire-Bryant wrote: > > I can confirm that PPPoA with both vc & llc encapsulations work.  > BR2684 with PPPoE and both vc & llc encapsulations also work.  No > nasty messages noted in dmesg. Thanks. >   I’m actually gobsmacked at how tolerant TalkTal

Re: [PATCH 07/17] net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

2018-06-15 Thread Kevin Darbyshire-Bryant
> On 15 Jun 2018, at 21:57, David Woodhouse wrote: > > > > On Fri, 2018-06-15 at 20:49 +, Kevin Darbyshire-Bryant wrote: >> >>> That does end up being quite hairy. I don't think it's worth doing. >>> >>> This should probably suffice to fix it... >>> >>> Kevin this is going to conflict

Re: [PATCH 07/17] net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

2018-06-15 Thread David Woodhouse
On Fri, 2018-06-15 at 20:49 +, Kevin Darbyshire-Bryant wrote: > > > That does end up being quite hairy. I don't think it's worth doing. > >  > > This should probably suffice to fix it... > >  > > Kevin this is going to conflict with the ifx_atm_alloc_skb() hack in > > the tree you're working

Re: [PATCH 07/17] net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

2018-06-15 Thread Kevin Darbyshire-Bryant
> On 15 Jun 2018, at 21:00, David Woodhouse wrote: > > On Fri, 2018-06-15 at 14:44 +0100, David Woodhouse wrote: >> >>> Or simply use a new field in ATM_SKB(skb) to remember a stable >>> truesize used in both sides (add/sub) >> >> Right, that was my second suggestion ("copy the accounted valu

Re: [PATCH 07/17] net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

2018-06-15 Thread David Woodhouse
On Fri, 2018-06-15 at 14:44 +0100, David Woodhouse wrote: > > > Or simply use a new field in ATM_SKB(skb) to remember a stable > > truesize used in both sides (add/sub) > > Right, that was my second suggestion ("copy the accounted value..."). > > It's a bit of a hack, and I think that actually *

Re: [PATCH 07/17] net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

2018-06-15 Thread David Woodhouse
On Fri, 2018-06-15 at 06:39 -0700, Eric Dumazet wrote: > > On 06/15/2018 06:27 AM, Eric Dumazet wrote: > > > > > > > > On 06/15/2018 05:29 AM, David Woodhouse wrote: > > > > > > On Fri, 2017-06-30 at 13:08 +0300, Elena Reshetova wrote: > > > > > > > > diff --git a/include/linux/atmdev.h b/i

Re: [PATCH 07/17] net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

2018-06-15 Thread Eric Dumazet
On 06/15/2018 06:27 AM, Eric Dumazet wrote: > > > On 06/15/2018 05:29 AM, David Woodhouse wrote: >> On Fri, 2017-06-30 at 13:08 +0300, Elena Reshetova wrote: >>> diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h >>> index c1da539..4d97a89 100644 >>> --- a/include/linux/atmdev.h >>>

Re: [PATCH 07/17] net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

2018-06-15 Thread Eric Dumazet
On 06/15/2018 05:29 AM, David Woodhouse wrote: > On Fri, 2017-06-30 at 13:08 +0300, Elena Reshetova wrote: >> diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h >> index c1da539..4d97a89 100644 >> --- a/include/linux/atmdev.h >> +++ b/include/linux/atmdev.h >> @@ -254,7 +254,7 @@ stati

Re: [PATCH 07/17] net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

2018-06-15 Thread David Woodhouse
On Fri, 2017-06-30 at 13:08 +0300, Elena Reshetova wrote: > diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h > index c1da539..4d97a89 100644 > --- a/include/linux/atmdev.h > +++ b/include/linux/atmdev.h > @@ -254,7 +254,7 @@ static inline void atm_return(struct atm_vcc *vcc,int > trues

[PATCH 07/17] net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

2017-06-30 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-

[PATCH 07/17] net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

2017-06-28 Thread Elena Reshetova
refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-