Skip to content
Snippets Groups Projects
user avatar
Nguyen Dinh Phi authored
Commit 63346650 ("netrom: switch to sock timer API") switched to use
sock timer API. It replaces mod_timer() by sk_reset_timer(), and
del_timer() by sk_stop_timer().

Function sk_reset_timer() will increase the refcount of sock if it is
called on an inactive timer, hence, in case the timer expires, we need to
decrease the refcount ourselves in the handler, otherwise, the sock
refcount will be unbalanced and the sock will never be freed.

Signed-off-by: default avatarNguyen Dinh Phi <phind.uet@gmail.com>
Reported-by: default avatar <syzbot+10f1194569953b72f1ae@syzkaller.appspotmail.com>
Fixes: 63346650 ("netrom: switch to sock timer API")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
517a16b1
History
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.