Re: [PATCH-2.4] drivers/char/pcwd.c

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Sun Feb 10 2002 - 20:43:10 EST


> a) backports a 2.5 fix that closes what looks like a very small/minor
> race opportunity

I don't know what that "2.5 fix" is but I suggest someone replaces it
with code that might actually work. Whoever put the 2.5 patch in please
fix it, or pull it back out again.

> case WDIOC_GETSUPPORT:
> - i = copy_to_user((void*)arg, &ident, sizeof(ident));
> - return i ? -EFAULT : 0;
> + return copy_to_user((void*)arg, &ident, sizeof(ident)) ? -EFAULT : 0;

Ugly pointless change

> - is_open = 0;
> + set_bit(0, &open_allowed);

You can't mix set_bit with atomic operations

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



This archive was generated by hypermail 2b29 : Fri Feb 15 2002 - 21:00:35 EST