From: Arnd Bergmann <arnd@arndb.de>
To: Alan Cox <alan@linux.intel.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 05/14] stallion: prune lock_kernel calls
Date: Thu, 29 Apr 2010 23:29:27 +0200 [thread overview]
Message-ID: <201004292329.27799.arnd@arndb.de> (raw)
In-Reply-To: <20100401160504.8882.37742.stgit@localhost.localdomain>
On Thursday 01 April 2010 18:05:19 Alan Cox wrote:
> @@ -4009,6 +4010,8 @@ static int stli_getbrdstats(combrd_t __user *bp)
> return -ENODEV;
>
> memset(&stli_brdstats, 0, sizeof(combrd_t));
> +
> + mutex_lock(&portp->port.mutex);
> stli_brdstats.brd = brdp->brdnr;
> stli_brdstats.type = brdp->brdtype;
> stli_brdstats.hwid = 0;
> @@ -4022,6 +4025,7 @@ static int stli_getbrdstats(combrd_t __user *bp)
> stli_brdstats.panels[i].hwid = brdp->panelids[i];
> stli_brdstats.panels[i].nrports = brdp->panels[i];
> }
> + mutex_unlock(&portp->port.mutex);
>
> if (copy_to_user(bp, &stli_brdstats, sizeof(combrd_t)))
> return -EFAULT;
I just tried porting my patches on top of yours (yes, it's been
some time). This one doesn't work, because there is no portp variable
in stli_getbrdstats.
On a related topic, in patch 06/14 "istallion: use bit ops for the board flags",
you have
> @@ -817,7 +817,7 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
> brdp = stli_brds[brdnr];
> if (brdp == NULL)
> return -ENODEV;
> - if ((brdp->state & BST_STARTED) == 0)
> + if (!(test_bit(BST_STARTED, &brdp->state))
> return -ENODEV;
> portnr = MINOR2PORT(minordev);
> if (portnr > brdp->nrports)
This won't work because brdp->state is an 'unsigned int' variable, while
bitops only work on 'unsigned long'.
Maybe you sent out a wrong version of this file?
Arnd
next prev parent reply other threads:[~2010-04-30 18:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-01 16:04 [RFC PATCH 00/14] Some BKL killing in the serial drivers Alan Cox
2010-04-01 16:04 ` [PATCH 01/14] tty: serial - fix tty referencing in set_ldisc Alan Cox
2010-04-01 16:04 ` [PATCH 02/14] tty: serial - fix tty back references in termios Alan Cox
2010-04-01 16:04 ` [PATCH 03/14] tty: serial - fix various misuses/mishandlings of port->tty Alan Cox
2010-04-01 16:04 ` [PATCH 04/14] vc: Locking clean up Alan Cox
2010-04-30 20:30 ` Arnd Bergmann
2010-04-01 16:05 ` [PATCH 05/14] stallion: prune lock_kernel calls Alan Cox
2010-04-29 21:29 ` Arnd Bergmann [this message]
2010-04-30 19:32 ` Alan Cox
2010-04-01 16:05 ` [PATCH 06/14] istallion: use bit ops for the board flags Alan Cox
2010-04-01 16:05 ` [PATCH 07/14] riscom8: kill use of lock_kernel Alan Cox
2010-04-01 16:05 ` [PATCH 08/14] isicom: kill off the BKL Alan Cox
2010-04-01 16:06 ` [PATCH 09/14] rocket: kill BKL Alan Cox
2010-04-01 16:06 ` [PATCH 10/14] synclink: kill the big kernel lock Alan Cox
2010-04-01 16:06 ` [PATCH 11/14] cyclades: Kill off BKL usage Alan Cox
2010-04-01 16:06 ` [PATCH 12/14] epca: Kill the big kernel lock Alan Cox
2010-04-01 16:07 ` [PATCH 13/14] specialix; Kill the BKL Alan Cox
2010-04-01 16:07 ` [PATCH 14/14] synclink: reworking locking a bit Alan Cox
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=201004292329.27799.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=alan@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox