diff options
| author | Xin Long <lucien.xin@gmail.com> | 2026-09-21 14:03:45 -0400 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-09-22 18:36:36 -0700 |
| commit | cae23ae3f7887a1cf8a75da38edcebeef695040f (patch) | |
| tree | dfcb78d79287809ab77eb803ea4694fe5a552d45 /tools/lib/python/kdoc/python_version.py | |
| parent | 6836807c5f685f83975e45c77c937eb5e79da31e (diff) | |
| download | linux-next-cae23ae3f7887a1cf8a75da38edcebeef695040f.tar.gz linux-next-cae23ae3f7887a1cf8a75da38edcebeef695040f.zip | |
sctp: hold asoc or transport before mod_timer() in timer handlers
Take the association or transport reference before rearming a timer in the
timer handlers.
The existing code calls mod_timer() before taking the reference needed by
the rearmed timer without holding the sock lock. This creates a race with
timer cleanup: if the timer is deleted after mod_timer() returns but before
the reference is taken, the cleanup path can drop the timer's reference and
destroy the transport or association. The timer handler then takes a
reference on the already freed object and eventually drops it, causing a
refcount underflow.
Hold the object before mod_timer() and drop the reference if mod_timer()
reports that the timer was already pending in timer handlers. Apply the
same ordering to the proto-unreachable path, which can rearm a transport
timer outside the timer handlers without holding the sock lock.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: Tangxin Xie <xietangxin@h-partners.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/c31b5e3ee2b7274e804f5eba2f21e2412e7eef7a.1790013825.git.lucien.xin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
