errno for in-kernel syscalls not SMP safe

From: Ulrich Weigand (Ulrich.Weigand@de.ibm.com)
Date: Tue Jul 31 2001 - 11:28:16 EST


Hi,

we just noticed that the 'errno' variable used for in-kernel
syscalls (linux/unistd.h) is not SMP safe.

What would you suggest is the proper way to fix this?

- Use a per-CPU (or maybe per-task) errno value?
- Protect all errno uses with a lock?
- Don't use errno at all, return negative error codes directly?
- anything else I've overlooked?

Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand
  Linux for S/390 Design & Development
  IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
  Phone: +49-7031/16-3727   ---   Email: Ulrich.Weigand@de.ibm.com

- 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 : Tue Jul 31 2001 - 21:00:52 EST