netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	chien.yen@oracle.com, rds-devel@oss.oracle.com, zab@zabbo.net,
	ajaykumar.hotchandani@oracle.com
Subject: Re: [PATCH v4 3/3] RDS: make sure not to loop forever inside rds_send_xmit
Date: Tue, 7 Apr 2015 17:56:05 -0400	[thread overview]
Message-ID: <20150407215605.GN29504@oracle.com> (raw)
In-Reply-To: <20150407.172607.869971800253661690.davem@davemloft.net>

On (04/07/15 17:26), David Miller wrote:
> >  	/*
> > +	 * we record the send generation after doing the xmit acquire.
> > +	 * if someone else manages to jump in and do some work, we'll use
> > +	 * this to avoid a goto restart farther down.
> > +	 *
> > +	 * we don't need a lock because the counter is only incremented
> > +	 * while we have the in_xmit bit held.
> > +	 */
> > +	conn->c_send_gen++;
> > +	send_gen = conn->c_send_gen;
> 
> This increment does need to either be changed to be an atomic_t
> or covered by a lock.
> 
> Otherwise two concurrent callers can both try to increment it at
> the same time, and it only effectively increments once.  That's
> corrupted state and will break all of the new logic added here.
I'm afraid I dont follow what race condiiton you are seeing? Prior
to this line, the "acquire_in_xmit" check would have only allowed
one thread to successfully increment c_send_gen, right? What did I
miss?


> Still very unhappy with this patch series submission, as I still find
> new problems every time I look at these changes.  Are you evaluating
> them and double checking all of the claims in the commit log message
> and comments, and logic in these, or are you just passing them off
> upstream after testing and leaving the checking to people like me?

I am sorry about the aggravation this is causing. But I'm trying to do
the right thing here, and fix someone else's lapse in failing to
properly commit things that were recognized as upstream issues.

Thus all I'm left with is visual inspection, and to run whatever
regression tests we have for these commits. 

--Sowmini

[I had to truncate recipient list, because it does not make it past
rds-devel moderator otherwise]

  reply	other threads:[~2015-04-07 21:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-07 20:38 [PATCH v4 0/3] RDS: RDS-core fixes Sowmini Varadhan
2015-04-07 20:38 ` [PATCH v4 1/3] Document AF_RDS, PF_RDS and SOL_RDS correctly Sowmini Varadhan
2015-04-07 20:38 ` [PATCH v4 2/3] RDS: only use passive connections when addresses match Sowmini Varadhan
2015-04-07 20:38 ` [PATCH v4 3/3] RDS: make sure not to loop forever inside rds_send_xmit Sowmini Varadhan
2015-04-07 21:26   ` David Miller
2015-04-07 21:56     ` Sowmini Varadhan [this message]
2015-04-07 22:27       ` David Miller

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=20150407215605.GN29504@oracle.com \
    --to=sowmini.varadhan@oracle.com \
    --cc=ajaykumar.hotchandani@oracle.com \
    --cc=chien.yen@oracle.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rds-devel@oss.oracle.com \
    --cc=zab@zabbo.net \
    /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;
as well as URLs for NNTP newsgroup(s).