suspicious code in net/rxrpc/ar-error.c
Subsystems (2)
While looking through old coverity reports, I came across this..
84 if (mtu == 0) {
85 /* they didn't give us a size, estimate one */
86 if (mtu > 1500) {
87 mtu >>= 1;
88 if (mtu < 1500)
89 mtu = 1500;
90 } else {
91 mtu -= 100;
92 if (mtu < peer->hdrsize)
93 mtu = peer->hdrsize + 4;
94 }
95 }
What was intended here ? Perhaps one of those mtu comparisons should be comparing peer->mtu ?
Dave
Quoted 2 lines · Dave Jones
What was intended here ? Perhaps one of those mtu comparisons should be comparing
peer->mtu?
Good spot, thanks. Yeah, I should be loading mtu with peer->mtu immediately after the comment.
David