Re: [PATCH RFC 1/5] vringfd syscall

From: Jeremy Fitzhardinge
Date: Wed Apr 09 2008 - 15:28:52 EST


Rusty Russell wrote:
+asmlinkage long sys_vringfd(void __user *addr,
+ unsigned num_descs,
+ u16 __user *last_used)
+{
+ int fd, err;
+ struct file *filp;
+ struct vring_info *vr;
+
+ /* Must be a power of two, and representable by u16 */
+ if (!num_descs || (num_descs & (num_descs-1)) || num_descs > 65536) {

65536 doesn't fit in u16.

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