All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, R.E.Wolff@BitWizard.nl,
	Amit Gud <gud@eth.net>
Subject: Re: [PATCH 1/1] Char: correct pci_get_device changes
Date: Sat, 14 Oct 2006 20:52:06 -0700	[thread overview]
Message-ID: <20061015035206.GA28623@suse.de> (raw)
In-Reply-To: <1966866271061818079@wsc.cz>

On Sun, Oct 15, 2006 at 01:36:45AM +0200, Jiri Slaby wrote:
> correct pci_get_device changes
> 
> Commits 881a8c120acf7ec09c90289e2996b7c70f51e996 and
> efe1ec27837d6639eae82e1f5876910ba6433c3f are totally wrong and
> "Replace pci_find_device() with more safer pci_get_device()." holds only for a
> very short time until next iteration of pci_get_device is called (and
> refcount is decreased again there).
> 
> Whenever pci_find_device -> pci_get_device change is performed, also
> pci_dev_get and pci_dev_put should be in most cases called. If not, it's
> not easy to find such issues and this is example of such case. Here it
> was made safer in no way but a moment during initialization, weird.
> 
> It affects moxa and rio char drivers. (All this stuff deserves to be
> converted to pci_probing, though.)
> 
> Cc: <R.E.Wolff@BitWizard.nl>
> Cc: Amit Gud <gud@eth.net>
> Cc: Greg Kroah-Hartman <gregkh@suse.de>
> Signed-off-by: Jiri Slaby <jirislaby@gmail.com>

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>


  parent reply	other threads:[~2006-10-15  3:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-14 23:36 [PATCH 1/1] Char: correct pci_get_device changes Jiri Slaby
2006-10-15  0:20 ` Alan Cox
2006-10-15  3:52 ` Greg KH [this message]
2006-10-16 22:36 ` Andrew Morton
2006-10-16 22:38   ` Jiri Slaby

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=20061015035206.GA28623@suse.de \
    --to=gregkh@suse.de \
    --cc=R.E.Wolff@BitWizard.nl \
    --cc=akpm@osdl.org \
    --cc=gud@eth.net \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@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 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.