From: Francois Romieu <romieu@cogenit.fr>
To: Alan Cox <alan@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linux 2.4.4-ac13
Date: Wed, 23 May 2001 00:09:00 +0200 [thread overview]
Message-ID: <20010523000900.A17869@se1.cogenit.fr> (raw)
In-Reply-To: <20010522154501.A7645@lightning.swansea.linux.org.uk>
In-Reply-To: <20010522223048.A9649@lightning.swansea.linux.org.uk>; from laughing@shared-source.org on Tue, May 22, 2001 at 03:45:01PM +0100
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 1950 bytes --]
Alan Cox <laughing@shared-source.org> écrit :
[...]
> o Add missing locking to stradis driver (me)
- unbalanced returns after down();
- 1770: if the initial version isn't racy with saa7146_irq (line 534), this
one is equivalent and shorter.
init_saa7146:2185
if ((saa->dmadebi = kmalloc(32768 + 4096, GFP_KERNEL)) == NULL)
[...]
looks suspect if the next vmalloc fail. Btw, I don't get the author
idea behind the whole "if (foo->bar == null) { foo->bar = vmalloc(...)}"
thing (chainsaw ?).
Fine against 2.4.4-ac14.
--- linux-2.4.4-ac13.orig/drivers/media/video/stradis.c Tue May 22 16:40:01 2001
+++ linux-2.4.4-ac13/drivers/media/video/stradis.c Tue May 22 17:31:48 2001
@@ -1513,8 +1513,10 @@ out:
SAA7146_MC1);
} else {
if (saa->win.vidadr == 0 || saa->win.width == 0
- || saa->win.height == 0)
+ || saa->win.height == 0) {
+ up(&saa->sem);
return -EINVAL;
+ }
saa->cap |= 1;
saawrite((SAA7146_MC1_TR_E_1 << 16) | 0xffff,
SAA7146_MC1);
@@ -1770,16 +1772,18 @@ out:
if (saa->endmarktail <
saa->endmarkhead) {
if (saa->endmarkhead -
- saa->endmarktail < 2)
+ saa->endmarktail < 2) {
+ up(&saa->sem);
return -ENOSPC;
- } else if (saa->endmarkhead <=
- saa->endmarktail) {
+ }
+ } else {
if (saa->endmarktail -
saa->endmarkhead >
- (MAX_MARKS - 2))
+ (MAX_MARKS - 2)) {
+ up(&saa->sem);
return -ENOSPC;
- } else
- return -ENOSPC;
+ }
+ }
saa->endmark[saa->endmarktail] =
saa->audtail;
saa->endmarktail++;
@@ -1928,8 +1932,10 @@ static long saa_write(struct video_devic
saa->audtail = 0;
}
if (copy_from_user(saa->audbuf + saa->audtail, buf,
- blocksize))
- return -EFAULT;
+ blocksize)) {
+ count = -EFAULT;
+ goto out;
+ }
saa->audtail += blocksize;
todo -= blocksize;
buf += blocksize;
next prev parent reply other threads:[~2001-05-22 22:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-22 14:45 Linux 2.4.4-ac13 Alan Cox
2001-05-22 21:30 ` Linux 2.4.4-ac14 Alan Cox
2001-05-22 22:09 ` Francois Romieu [this message]
2001-05-23 2:05 ` Keith Owens
2001-05-23 7:17 ` Geert Uytterhoeven
2001-05-23 9:07 ` Keith Owens
2001-05-23 9:36 ` Olivier Galibert
2001-05-23 10:03 ` Keith Owens
2001-05-23 16:42 ` Geert Uytterhoeven
2001-05-23 10:08 ` David Weinehall
2001-05-24 17:43 ` Thomas Dodd
2001-05-23 9:07 ` 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=20010523000900.A17869@se1.cogenit.fr \
--to=romieu@cogenit.fr \
--cc=alan@redhat.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