All of lore.kernel.org
 help / color / mirror / Atom feed
From: Serge Hallyn <serue@us.ibm.com>
To: selinux@tycho.nsa.gov
Subject: dcache_lock deadlock due to auditing
Date: Wed, 13 Apr 2005 12:36:20 -0500	[thread overview]
Message-ID: <1113413781.25428.31.camel@serge> (raw)

Hi,

a team running some tcp benchmarks on new hardware found a recursive
spinlock(dcache_lock) deadlock.  It seems to always be caused by:

 A process is doing a d_alloc() which does a spin_lock(dcache_lock).
 It is interrupted to receive a packet
 selinux_sock_rcv_skb gets called
 it calls avc_has_perm
 this calls avc_audit
 this calls audit_log_d_path
 this calls d_path which does spin_lock(dcache_lock)

Deferring the actual audit work to the audit subsystem in a manner
similar to what Stephen's recent audit_log_exit() patch did seems one
possible way to solve this problem.  Another might be to determine our
context before the audit_log_d_path( vma->vm_file->f_dentry ), and, if
we can determine that we were called from interrupt, simply print out
the f_dentry->d_name.name itself.

Are there other solutions?

Currently the team is testing Stephen's patch (from march 31) to see
whether it is sufficient.

thanks,
-serge



-- 
Serge Hallyn <serue@us.ibm.com>

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

             reply	other threads:[~2005-04-14 13:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-13 17:36 Serge Hallyn [this message]
2005-04-14 14:30 ` dcache_lock deadlock due to auditing Stephen Smalley
2005-04-14 16:06   ` Karl MacMillan
2005-04-14 16:15     ` Stephen Smalley
2005-04-14 19:09       ` Daniel H Jones
2005-04-14 19:37       ` Karl MacMillan
2005-04-15 13:09       ` serue
2005-04-15 13:28         ` Stephen Smalley
2005-04-15 14:38           ` serue
  -- strict thread matches above, loose matches on Subject: below --
2005-04-14 20:35 Steve G
2005-04-14 20:47 ` Stephen Smalley

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=1113413781.25428.31.camel@serge \
    --to=serue@us.ibm.com \
    --cc=selinux@tycho.nsa.gov \
    /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.