mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Santosh Shilimkar <santosh.shilimkar@oracle.com>
To: David Miller <davem@davemloft.net>, leon@kernel.org
Cc: keescook@chromium.org, honli@redhat.com,
	linux-kernel@vger.kernel.org, sowmini.varadhan@oracle.com,
	sbeattie@ubuntu.com, apw@canonical.com, fenlason@redhat.com,
	netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	rds-devel@oss.oracle.com
Subject: Re: [PATCH] RDS: Fix rds-ping inducing kernel panic
Date: Mon, 22 Jan 2018 09:04:28 -0800	[thread overview]
Message-ID: <2cf712c8-3c1f-17de-743f-0fe26331da2e@oracle.com> (raw)
In-Reply-To: <20180122.104730.362327971778717733.davem@davemloft.net>

On 1/22/2018 7:47 AM, David Miller wrote:
> From: Leon Romanovsky <leon@kernel.org>
> Date: Mon, 22 Jan 2018 17:10:54 +0200
> 
>> On Mon, Jan 22, 2018 at 03:24:15AM -0800, Kees Cook wrote:
>>> diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c
>>> index 8557a1cae041..5fbf635d17cb 100644
>>> --- a/net/rds/ib_send.c
>>> +++ b/net/rds/ib_send.c
>>> @@ -506,7 +506,7 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm,
>>>   	int flow_controlled = 0;
>>>   	int nr_sig = 0;
>>>
>>> -	BUG_ON(off % RDS_FRAG_SIZE);
>>> +	BUG_ON(!conn->c_loopback && off % RDS_FRAG_SIZE);
>>>   	BUG_ON(hdr_off != 0 && hdr_off != sizeof(struct rds_header));
>>
>> To be honest this function full of BUG_ONs and it looks fishy to have them there.
>> Why don't we return EINVAL instead of crashing system?
> 
> I completely agree that these assertions should just cause an error-out
> rather than trigger a BUG().

Andy did remove bunch of them but there are still few more left overs.
Will have a look at remainder set since most of them were added during
early development and remained there. Thanks Dave/Leon.

Regards,
Santosh

  reply	other threads:[~2018-01-22 17:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22 11:24 Kees Cook
2018-01-22 15:10 ` Leon Romanovsky
2018-01-22 15:47   ` David Miller
2018-01-22 17:04     ` Santosh Shilimkar [this message]
2018-01-22 17:01 ` Santosh Shilimkar
2018-01-22 22:17   ` Kees Cook
2018-01-22 22:25     ` Santosh Shilimkar

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=2cf712c8-3c1f-17de-743f-0fe26331da2e@oracle.com \
    --to=santosh.shilimkar@oracle.com \
    --cc=apw@canonical.com \
    --cc=davem@davemloft.net \
    --cc=fenlason@redhat.com \
    --cc=honli@redhat.com \
    --cc=keescook@chromium.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rds-devel@oss.oracle.com \
    --cc=sbeattie@ubuntu.com \
    --cc=sowmini.varadhan@oracle.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

Powered by JetHome