lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081007041349.GB1626@kroah.com>
Date:	Mon, 6 Oct 2008 21:13:49 -0700
From:	Greg KH <greg@...ah.com>
To:	Alan Cox <alan@...hat.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 38/76] tty: usb-serial krefs

On Mon, Oct 06, 2008 at 05:02:46AM -0400, Alan Cox wrote:
> On Sun, Oct 05, 2008 at 10:36:58PM -0700, Greg KH wrote:
> > Should we be calling kref_get() and kref_put() in interrupt context?
> > Could we just get the reference in open and then put in close when we
> > are done with it for each driver?
> 
> That depends how you handle hangups and interrupt synchronization. If you
> can be sure you will get no more interrupts before you drop the reference
> in close/hangup then yes that should be fine. In particular watch out for
> the fact that hangup/close/re-open can run pretty much in parallel with
> cases like
> 
> 		close called by user
> 		interrupted by carrier drop causing hangup
> 
> 		in parallel another open begins and blocks waiting a close
> 
> (Obviously for hotplug some further care is needed on the unplug paths)
> 
> Right now USB serial doesn't actually address all those cases anyway I suspect.
> I wasn't going to attack that until I had a common tty_port and tty_port code
> to do all that work rather than trying to fix each group of drivers.

Ok, fair enough, we can do further refinement later.  All of these
changes look great to me, thanks for doing them.  Feel free to put a:
	Acked-by: Greg Kroah-Hartman <gregkh@...e.de>
on the usb-serial ones if you want it.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ