Re: [PATCH net] af_smc: fix NULL pointer dereference on sock_create_kern() error path

2018-02-27 Thread Ursula Braun
On 02/27/2018 02:49 PM, Davide Caratti wrote: > when sock_create_kern(..., a) returns an error, 'a' might not be a valid > pointer, so it shouldn't be dereferenced to read a->sk->sk_sndbuf and > and a->sk->sk_rcvbuf; not doing that caused the following crash: > > general protection fault: [

[PATCH net] af_smc: fix NULL pointer dereference on sock_create_kern() error path

2018-02-27 Thread Davide Caratti
when sock_create_kern(..., a) returns an error, 'a' might not be a valid pointer, so it shouldn't be dereferenced to read a->sk->sk_sndbuf and and a->sk->sk_rcvbuf; not doing that caused the following crash: general protection fault: [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer em