mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gal Pressman <galpress@amazon.com>
To: Aditya Pakki <pakki001@umn.edu>
Cc: <kjlu@umn.edu>, Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
	Parav Pandit <parav@mellanox.com>,
	Dennis Dalessandro <dennis.dalessandro@intel.com>,
	<linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [v2]RDMA: add checks for the status of nla_put in ib_nl_send_msg
Date: Tue, 8 Jan 2019 12:25:56 +0200	[thread overview]
Message-ID: <018c208a-9bcb-0c4c-7001-5447b06b1d84@amazon.com> (raw)
In-Reply-To: <20190105170928.4086-1-pakki001@umn.edu>

On 05-Jan-19 19:09, Aditya Pakki wrote:
>  
>  static int ib_nl_get_path_rec_attrs_len(ib_sa_comp_mask comp_mask)
> @@ -856,7 +873,10 @@ static int ib_nl_send_msg(struct ib_sa_query *query, gfp_t gfp_mask)
>  	}
>  
>  	/* Add attributes */
> -	ib_nl_set_path_rec_attrs(skb, query);
> +	if (ib_nl_set_path_rec_attrs(skb, query, nlh)) {
> +		nlmsg_free(skb);
> +		return -EMSGSIZE;
> +	}

IMO, it's better to return the error code of ib_nl_set_path_rec_attrs instead of
an explicit -EMSGSIZE.

      reply	other threads:[~2019-01-08 10:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-05 17:09 Aditya Pakki
2019-01-08 10:25 ` Gal Pressman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=018c208a-9bcb-0c4c-7001-5447b06b1d84@amazon.com \
    --to=galpress@amazon.com \
    --cc=dennis.dalessandro@intel.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=kjlu@umn.edu \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=pakki001@umn.edu \
    --cc=parav@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®