From: Leon Romanovsky <leon@kernel.org>
To: Jia-Ju Bai <baijiaju1990@163.com>
Cc: monis@mellanox.com, sean.hefty@intel.com, dledford@redhat.com,
hal.rosenstock@gmail.com, yuval.shaia@oracle.com,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V5] rxe: Fix a sleep-in-atomic bug in post_one_send
Date: Mon, 5 Jun 2017 15:49:43 +0300 [thread overview]
Message-ID: <20170605124943.GL6868@mtr-leonro.local> (raw)
In-Reply-To: <1496665420-8100-1-git-send-email-baijiaju1990@163.com>
[-- Attachment #1: Type: text/plain, Size: 554 bytes --]
On Mon, Jun 05, 2017 at 08:23:40PM +0800, Jia-Ju Bai wrote:
> The driver may sleep under a spin lock, and the function call path is:
> post_one_send (acquire the lock by spin_lock_irqsave)
> init_send_wqe
> copy_from_user --> may sleep
>
> There is no flow that makes "qp->is_user" true, and copy_from_user may
> cause bug when a non-user pointer is used. So the lines of copy_from_user
> and check of "qp->is_user" are removed.
>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
> ---
Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-06-05 12:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-05 12:23 [PATCH V5] rxe: Fix a sleep-in-atomic bug in post_one_send Jia-Ju Bai
2017-06-05 12:49 ` Leon Romanovsky [this message]
2017-06-05 15:06 ` Moni Shoua
2017-06-13 21:01 ` 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=20170605124943.GL6868@mtr-leonro.local \
--to=leon@kernel.org \
--cc=baijiaju1990@163.com \
--cc=dledford@redhat.com \
--cc=hal.rosenstock@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=monis@mellanox.com \
--cc=sean.hefty@intel.com \
--cc=yuval.shaia@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