Re: [PATCH net v5 1/3] net/smc: bound the wire-controlled producer cursor to the RMB
Paolo Abeni <[email protected]> Tue, 28 Jul 2026 15:50:02 +0200
| Newsgroups | org.kernel.vger.linux-rdma,org.kernel.vger.linux-kernel,org.kernel.vger.linux-s390,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On 7/24/26 2:23 AM, Bryam Vargas via B4 Relay wrote: > @@ -246,8 +256,13 @@ static inline void smcr_cdc_msg_to_host(struct smc_host_cdc_msg *local, > local->len = peer->len; > local->seqno = ntohs(peer->seqno); > local->token = ntohl(peer->token); > - smc_cdc_cursor_to_host(&local->prod, &peer->prod, conn); > - smc_cdc_cursor_to_host(&local->cons, &peer->cons, conn); > + /* bound the wire-controlled producer cursor to our RMB (used as a raw > + * index by the urgent path); leave the consumer cursor unbounded -- it > + * indexes the peer's RMB and is bounded by peer_rmbe_size. > + */ > + smc_cdc_cursor_to_host(&local->prod, &peer->prod, conn, > + conn->rmb_desc->len); Sashiko gemini suspects the above may cause a Null ptr dereference: https://sashiko.dev/#/patchset/20260723-b4-disp-0d07164f-v5-0-6a9e235dbc4e%40proton.me /P