All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Vaibhav Jain <vaibhav@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org,
	Frederic Barrat <fbarrat@linux.ibm.com>,
	Andrew Donnellan <andrew.donnellan@au1.ibm.com>,
	Dan Carpenter <dan.carpenter@oracle.com>
Cc: Philippe Bergheaud <philippe.bergheaud@fr.ibm.com>,
	Vaibhav Jain <vaibhav@linux.ibm.com>,
	Alastair D'Silva <alastair@linux.ibm.com>,
	Christophe Lombard <christophe_lombard@fr.ibm.com>,
	stable@vger.kernel.org
Subject: Re: cxl: Fix wrong comparison in cxl_adapter_context_get()
Date: Tue, 24 Jul 2018 01:11:16 +1000 (AEST)	[thread overview]
Message-ID: <41Z4h41040z9s0R@ozlabs.org> (raw)
In-Reply-To: <20180704152833.2288-1-vaibhav@linux.ibm.com>

On Wed, 2018-07-04 at 15:28:33 UTC, Vaibhav Jain wrote:
> Function atomic_inc_unless_negative() returns a bool to indicate
> success/failure. However cxl_adapter_context_get() wrongly compares
> the return value against '>=0' which will always be true. The patch
> fixes this comparison to '==0' there by also fixing this compile time
> warning:
> 
> 	drivers/misc/cxl/main.c:290 cxl_adapter_context_get()
> 	warn: 'atomic_inc_unless_negative(&adapter->contexts_num)' is unsigned
> 
> Cc: stable@vger.kernel.org
> Fixes: 70b565bbdb91 ("cxl: Prevent adapter reset if an active context exists")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
> Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
> Acked-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/ef6cb5f1a048fdf91ccee6d63d2bfa

cheers

      parent reply	other threads:[~2018-07-23 15:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-04 15:28 [PATCH] cxl: Fix wrong comparison in cxl_adapter_context_get() Vaibhav Jain
2018-07-05  1:51 ` Andrew Donnellan
2018-07-05  7:29 ` Frederic Barrat
2018-07-23 15:11 ` Michael Ellerman [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=41Z4h41040z9s0R@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=alastair@linux.ibm.com \
    --cc=andrew.donnellan@au1.ibm.com \
    --cc=christophe_lombard@fr.ibm.com \
    --cc=dan.carpenter@oracle.com \
    --cc=fbarrat@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=philippe.bergheaud@fr.ibm.com \
    --cc=stable@vger.kernel.org \
    --cc=vaibhav@linux.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.