Re: [net v3] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-08-05 Thread Willem de Bruijn
On Wed, Aug 5, 2020 at 10:57 AM Xie He wrote: > > On Tue, Aug 4, 2020 at 10:23 PM Martin Schiller wrote: > > > > > Adding skb_cow before these skb_push calls would indeed help > > > preventing kernel panics, but that might not be the essential issue > > > here, and it might also prevent us from d

Re: [net v3] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-08-05 Thread Xie He
On Tue, Aug 4, 2020 at 10:23 PM Martin Schiller wrote: > > > Adding skb_cow before these skb_push calls would indeed help > > preventing kernel panics, but that might not be the essential issue > > here, and it might also prevent us from discovering the real issue. (I > > guess this is also the re

Re: [net v3] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-08-04 Thread Martin Schiller
On 2020-08-04 21:20, Xie He wrote: On Tue, Aug 4, 2020 at 5:43 AM Martin Schiller wrote: I'm not an expert in the field, but after reading the commit message and the previous comments, I'd say that makes sense. Thanks! Shouldn't this kernel panic be intercepted by a skb_cow() before the

Re: [net v3] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-08-04 Thread Xie He
On Tue, Aug 4, 2020 at 5:43 AM Martin Schiller wrote: > > I'm not an expert in the field, but after reading the commit message and > the previous comments, I'd say that makes sense. Thanks! > Shouldn't this kernel panic be intercepted by a skb_cow() before the > skb_push() in lapbeth_data_transm

Re: [net v3] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-08-04 Thread Martin Schiller
On 2020-08-02 21:50, Xie He wrote: In net/packet/af_packet.c, the function packet_snd first reserves a headroom of length (dev->hard_header_len + dev->needed_headroom). Then if the socket is a SOCK_DGRAM socket, it calls dev_hard_header, which calls dev->header_ops->create, to create the link lay

Re: [net v3] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-08-03 Thread Xie He
Thanks! On Mon, Aug 3, 2020 at 2:50 AM Willem de Bruijn wrote: > > It's [PATCH net v3], not [net v3] Sorry. My mistake. I'll pay attention next time. I'm currently thinking about changing the subject to reflect that we added a "skb->len" check. Should I number the new patch as v1 or continue to

Re: [net v3] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-08-03 Thread Willem de Bruijn
On Sun, Aug 2, 2020 at 9:51 PM Xie He wrote: > > In net/packet/af_packet.c, the function packet_snd first reserves a > headroom of length (dev->hard_header_len + dev->needed_headroom). > Then if the socket is a SOCK_DGRAM socket, it calls dev_hard_header, > which calls dev->header_ops->create, to

[net v3] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-08-02 Thread Xie He
In net/packet/af_packet.c, the function packet_snd first reserves a headroom of length (dev->hard_header_len + dev->needed_headroom). Then if the socket is a SOCK_DGRAM socket, it calls dev_hard_header, which calls dev->header_ops->create, to create the link layer header. If the socket is a SOCK_RA