linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Chuck Lever <chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Chien Yen <chien.yen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] IB/core: Make ib_dealloc_pd return void
Date: Fri, 14 Aug 2015 20:27:47 -0600	[thread overview]
Message-ID: <20150815022747.GA30693@obsidianresearch.com> (raw)
In-Reply-To: <55CE9043.1030804-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On Fri, Aug 14, 2015 at 09:05:07PM -0400, Doug Ledford wrote:

> I'm not sure I like this patch.  I have my concerns that this will
> make debugging and catching problems more difficult.
[..]
> The change you put in here will make note of the driver that fails to
> return a clean return, but the error happens elsewhere.

Eh? I don't understand your comments.

Nothing is lost, in your specific example instead of seeing the little
one line printk from IPoIB, you'd get instead a full blown WARN_ON
with a stack trace from here:

+	   WARN_ON(atomic_read(&pd->usecnt));

The stack trace still fingers IPoIB as the culprit, and a WARN_ON
strongly motivates bug reports.

If the above WARN_ON triggers it unconditionally represents a bug in
the caller. There is no correct way to use the old error return.

> It serves as a final check on the ULP, and to me that has value.

Yes, which is why this patch extends that same basic check to all ~50
call sites and every single ULP instead of only having it in only two
places.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-08-15  2:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-05 20:34 [PATCH] IB/core: Make ib_dealloc_pd return void Jason Gunthorpe
     [not found] ` <20150805203431.GB30271-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-08-05 20:50   ` Chuck Lever
     [not found]     ` <C771535C-C9AD-4AC1-81BF-2A4122D5EDAE-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-08-05 21:00       ` Anna Schumaker
     [not found]         ` <55C2795C.7060700-ZwjVKphTwtPQT0dZR+AlfA@public.gmane.org>
2015-08-05 21:08           ` Chuck Lever
2015-08-06 17:56           ` Chuck Lever
2015-08-06 17:31   ` Sagi Grimberg
     [not found]     ` <55C39A0E.6020008-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-08-11  5:57       ` Jason Gunthorpe
     [not found]         ` <20150811055731.GD13314-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-08-11  6:57           ` Sagi Grimberg
2015-08-15  1:05   ` Doug Ledford
     [not found]     ` <55CE9043.1030804-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-08-15  2:27       ` Jason Gunthorpe [this message]
     [not found]         ` <20150815022747.GA30693-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-08-15  3:13           ` Doug Ledford

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=20150815022747.GA30693@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=chien.yen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    /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).