From: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
To: Vaibhav Jain <vaibhav@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org,
Frederic Barrat <fbarrat@linux.ibm.com>,
Dan Carpenter <dan.carpenter@oracle.com>
Cc: Christophe Lombard <christophe_lombard@fr.ibm.com>,
Philippe Bergheaud <philippe.bergheaud@fr.ibm.com>,
"Alastair D'Silva" <alastair@linux.ibm.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] cxl: Fix wrong comparison in cxl_adapter_context_get()
Date: Thu, 5 Jul 2018 11:51:58 +1000 [thread overview]
Message-ID: <8ee7ba2c-3de4-5659-0be0-e41aa8aaec80@au1.ibm.com> (raw)
In-Reply-To: <20180704152833.2288-1-vaibhav@linux.ibm.com>
On 05/07/18 01:28, 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>
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited
next prev parent reply other threads:[~2018-07-05 1:52 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 [this message]
2018-07-05 7:29 ` Frederic Barrat
2018-07-23 15:11 ` Michael Ellerman
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=8ee7ba2c-3de4-5659-0be0-e41aa8aaec80@au1.ibm.com \
--to=andrew.donnellan@au1.ibm.com \
--cc=alastair@linux.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.