ko-count overflow
Lars Ellenberg
maintainerQuoted 11 lines · Apollonskiy Evgeniy
Hello,
There is a strange code fragment in
drbd_main.c:drop_it = !--mdev->ko_count; if (!drop_it) { dev_err(DEV, "[%s/%d] sock_sendmsg time expired, ko = %u\n", current->comm, current->pid, mdev->ko_count); request_ping(mdev); }
Quoted 2 lines
Default value of
ko_countis 0, so --mdev->ko_count will be equal to 4294967295 (ko_countis unsigned int).
That is intentional.
Configuring "0" should be equivalent to "disabled",
but we still want the recurring log message with the "count down".
Signature · 3 lines
: Lars Ellenberg : LINBIT | Your Way to High Availability : DRBD/HA support and consulting http://www.linbit.com
Hello,
There is a strange code fragment in drbd_main.c:
drop_it = !--mdev->ko_count;
if (!drop_it) {
dev_err(DEV, "[%s/%d] sock_sendmsg time expired, ko = %u\n",
current->comm, current->pid, mdev->ko_count);
request_ping(mdev);
}Default value of ko_count is 0, so --mdev->ko_count will be equal to 4294967295 (ko_count is unsigned int).