Guvenc Gulce 17081633e2 net/smc: Ensure correct state of the socket in send path
When smc_sendmsg() is called before the SMC socket initialization has
completed, smc_tx_sendmsg() will access un-initialized fields of the
SMC socket which results in a null-pointer dereference.
Fix this by checking the socket state first in smc_tx_sendmsg().

Fixes: e0e4b8fa5338 ("net/smc: Add SMC statistics support")
Reported-by: syzbot+5dda108b672b54141857@syzkaller.appspotmail.com
Reviewed-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-06-25 11:53:51 -07:00
..
2021-06-02 14:01:55 -07:00
2021-03-30 16:54:50 -07:00
2021-06-03 13:24:23 -07:00
2021-06-02 14:01:55 -07:00
2021-06-07 14:08:30 -07:00
2021-06-22 14:36:01 -07:00
2021-06-07 14:08:30 -07:00
2021-06-22 10:47:32 -07:00
2021-06-02 14:01:55 -07:00
2021-05-27 08:46:19 -04:00
2021-06-03 15:13:56 -07:00