[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] [PATCH] 2.4, 2.5: dm-ioctl.c: fix align_ptr() parameter



Change the "align" parameter to align_ptr() to an unsigned long.

On IA-64, the returned pointer looses it's upper half, which causes a
copy_to_user() call in results_to_user() to fail, which eventually
causes DM_TARGET_STATUS ioctls to fail.

Patch is against 2.4.20-dm-10, but also applies cleanly to 2.5.66.

--- linux-2.4.20a/drivers/md/dm-ioctl.c	Fri Mar 28 15:27:32 2003
+++ linux-2.4.20b/drivers/md/dm-ioctl.c	Fri Mar 28 15:26:38 2003
@@ -401,7 +401,7 @@
  * Round up the ptr to the next 'align' boundary.  Obviously
  * 'align' must be a power of 2.
  */
-static inline void *align_ptr(void *ptr, unsigned int align)
+static inline void *align_ptr(void *ptr, unsigned long align)
 {
 	align--;
 	return (void *) (((unsigned long) (ptr + align)) & ~align);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]