netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: manivannan.sadhasivam@linaro.org
Cc: kuba@kernel.org, bjorn.andersson@linaro.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	dianders@chromium.org, elder@linaro.org
Subject: Re: [PATCH v3] net: qrtr: ns: Fix the incorrect usage of rcu_read_lock()
Date: Tue, 06 Oct 2020 06:02:47 -0700 (PDT)	[thread overview]
Message-ID: <20201006.060247.672466449778345455.davem@davemloft.net> (raw)
In-Reply-To: <20201005071642.9621-1-manivannan.sadhasivam@linaro.org>

From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Date: Mon,  5 Oct 2020 12:46:42 +0530

> The rcu_read_lock() is not supposed to lock the kernel_sendmsg() API
> since it has the lock_sock() in qrtr_sendmsg() which will sleep. Hence,
> fix it by excluding the locking for kernel_sendmsg().
> 
> While at it, let's also use radix_tree_deref_retry() to confirm the
> validity of the pointer returned by radix_tree_deref_slot() and use
> radix_tree_iter_resume() to resume iterating the tree properly before
> releasing the lock as suggested by Doug.
> 
> Fixes: a7809ff90ce6 ("net: qrtr: ns: Protect radix_tree_deref_slot() using rcu read locks")
> Reported-by: Douglas Anderson <dianders@chromium.org>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
> Tested-by: Douglas Anderson <dianders@chromium.org>
> Tested-by: Alex Elder <elder@linaro.org>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Applied, thank you.

      reply	other threads:[~2020-10-06 13:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05  7:16 [PATCH v3] net: qrtr: ns: Fix the incorrect usage of rcu_read_lock() Manivannan Sadhasivam
2020-10-06 13:02 ` David Miller [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=20201006.060247.672466449778345455.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=bjorn.andersson@linaro.org \
    --cc=dianders@chromium.org \
    --cc=elder@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=netdev@vger.kernel.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).