public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <jhovold@gmail.com>
To: Stefani Seibold <stefani@seibold.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: USB: serial: kfifo_len locking
Date: Mon, 4 Jan 2010 18:43:52 +0100	[thread overview]
Message-ID: <20100104174352.GA26606@localhost> (raw)

Hi Stefani,

I noticed that the locking that used to protect kfifo_len in
usb_serial_generic_chars_in_buffer was removed when the kifo api changed
to not use internal locking (c1e13f25674ed564948ecb7dfe5f83e578892896 -- 
kfifo: move out spinlock). 

Was this intentional?

I found a related discussion here

	http://lkml.org/lkml/2009/12/18/433

where you seem to say that no such locking is required as long as
kfifo_reset is never called (and that one could use kfifo_reset_out
instead)?

However, kfifo_reset was still being called when the locking was removed
and not until later was it changed to kfifo_reset_out
(119eecc831a42bd090543568932e440c6831f1bb -- Fix usb_serial_probe()
problem introduced by the recent kfifo changes).  

Does this last change imply that no locking in
usb_serial_generic_chars_in_buffer is required? If this is the case,
perhaps such locking guidelines could be added to kfifo.h?

Thanks,
Johan


             reply	other threads:[~2010-01-04 17:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-04 17:43 Johan Hovold [this message]
2010-01-04 19:20 ` USB: serial: kfifo_len locking Stefani Seibold
2010-01-05  7:43   ` Pete Zaitcev
2010-01-05  7:51     ` Stefani Seibold
2010-01-05 11:04     ` Johan Hovold
2010-01-05 11:09       ` Stefani Seibold
2010-01-05 11:14         ` Johan Hovold
2010-01-05 11:25           ` Stefani Seibold
2010-01-05 11:35             ` Johan Hovold
2010-01-05 12:01               ` Stefani Seibold
2010-01-05 12:10                 ` Johan Hovold
2010-01-05 13:30                 ` [tip:urgent] fix USB serial fix " Stefani Seibold
2010-01-05 14:32                   ` Greg KH
2010-01-05 13:38                 ` [tip:urgent] fix kfifo_out_locked race bug Stefani Seibold
2010-01-08 23:18                   ` Andrew Morton
2010-01-05 17:00         ` USB: serial: kfifo_len locking Pete Zaitcev

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=20100104174352.GA26606@localhost \
    --to=jhovold@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stefani@seibold.net \
    /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