From: Ursula Braun <ubr...@linux.vnet.ibm.com> Date: Tue, 9 Aug 2016 12:13:00 +0200
> + sock_hold(&smc->sk); ... > +out_line: > + seq_putc(m, '\n'); > + sock_put(&smc->sk); You hold the smc_proc_list_lock during this function's execution, therefore the table cannot change and therefore the socket cannot go away. Therefore taking a reference count here is unnecessary overhead, please remove it.