public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: roms@lpg.ticalc.org, linux-kernel@vger.kernel.org
Subject: Re: BKL in tiglusb release function
Date: Fri, 05 Apr 2002 08:58:00 -0800	[thread overview]
Message-ID: <3CADD798.20203@us.ibm.com> (raw)
In-Reply-To: <3CACF1FF.2000508@us.ibm.com> <3CAD74DA.58561BF7@free.fr>

Romain Liévin wrote:
 > I have followed examples from other codes such as dabusb.c &
 > printer.c (2.4.14). After a further look: - dabusb.c from 2.4.14
 > contains a kernel_lock/unlock couple only in _release but it has
 > been removed in 2.5.7 - printer.c contains a kernel_lock/unlock
 > couple in _open & _release in both 2.4.14 and 2.5.7

I was probably responsible for the removal from dabusb.c.  In almost all
cases that I found (over 60 of them), the BKL is not needed in the 
release function.

The use of s->mutex confuses me.  In tiglusb_disconnect(), there is an 
up().  Where is the matching down?  The comment for the mutex just says, 
"locks this struct".  However, it is clear that it doesn't protect the 
whole structure.  There are many places where structure members are 
accessed without the lock being held.

-- 
Dave Hansen
haveblue@us.ibm.com


      parent reply	other threads:[~2002-04-05 16:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-05  0:38 BKL in tiglusb release function Dave Hansen
     [not found] ` <3CAD74DA.58561BF7@free.fr>
2002-04-05 16:58   ` Dave Hansen [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=3CADD798.20203@us.ibm.com \
    --to=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roms@lpg.ticalc.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