Re: [PATCH rdma-next 2/6] IB/cm: Remove "mad_agent" parameter of ib_cancel_mad

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 18, 2021 at 12:03:05PM +0200, Leon Romanovsky wrote:

> +/**
> + * ib_cancel_mad - Cancels an outstanding send MAD operation.
> + * @send_buf: Indicates the MAD to cancel.
> + *
> + * MADs will be returned to the user through the corresponding
> + * ib_mad_send_handler.
> + */
> +static inline void ib_cancel_mad(struct ib_mad_send_buf *send_buf)
> +{
> +	ib_modify_mad(send_buf->mad_agent, send_buf, 0);

This needs to check for a NULL send_buf, most of the calls are just
blindly passing cm_priv_id->msg which can become NULL in a racey way
in a few places.

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux