]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sdp: Fix for warning message when receiving with MSG_PEEK flag, and free skb that...
authorEldad Zinger <eldadz@mellanox.co.il>
Thu, 17 Jun 2010 06:57:57 +0000 (09:57 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:05:05 +0000 (05:05 -0700)
commit54ac60f478a8d54db360943cc2c8a76e05277e07
tree90fd1138c9396374a07f619aad3c674d580448e6
parent3f7faaf56f3e4a96f67031d02478d2da471fe51c
sdp: Fix for warning message when receiving with MSG_PEEK flag, and free skb that is not needed any more after all data was read from it.

'rx_sa->used', unlike 'offset', was not updated when MSG_PEEK flag was up and
that lead to the behavior that bytes considered to be available to copy while
the sequence offset showed that the bytes already consumed.
The solution is to discard any use of 'rx_sa->used' and use 'offset' instead.

An skb of SDP_MID_SRCAVAIL is not needed anymore when all its inline data was
consumed and the RDMA operation was canceled (due to MSG_PEEK flag).
This fix eliminates the warning message: "Trying to read beyond SKB".

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp.h
drivers/infiniband/ulp/sdp/sdp_main.c
drivers/infiniband/ulp/sdp/sdp_rx.c
drivers/infiniband/ulp/sdp/sdp_zcopy.c