On Tue, 31 Oct 2006, Andreas Gruenbacher wrote: > > > w should be an unsigned int. > > > > Makes sense. > > No, this breaks the while loop further below: with an unsigned int, the loop > counter underflows and wraps. > This is not a problem with w being an unsigned int, it's a problem with the while loop. nfsacl_size() returns unsigned int as it should and the while loop can be written to respect that since integer division in C truncates: for (n = w / PAGE_SIZE; n > 0; n--) if (!rqstp->rq_respages[rqstp->rq_resused++]; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] NFS: nfsaclsvc_encode_getaclres() - Fix potential NULL deref and tiny optimization.
- From: Andreas Gruenbacher <[email protected]>
- Re: [PATCH] NFS: nfsaclsvc_encode_getaclres() - Fix potential NULL deref and tiny optimization.
- References:
- [PATCH] NFS: nfsaclsvc_encode_getaclres() - Fix potential NULL deref and tiny optimization.
- From: Jesper Juhl <[email protected]>
- Re: [PATCH] NFS: nfsaclsvc_encode_getaclres() - Fix potential NULL deref and tiny optimization.
- From: David Rientjes <[email protected]>
- Re: [PATCH] NFS: nfsaclsvc_encode_getaclres() - Fix potential NULL deref and tiny optimization.
- From: Jesper Juhl <[email protected]>
- Re: [PATCH] NFS: nfsaclsvc_encode_getaclres() - Fix potential NULL deref and tiny optimization.
- From: Andreas Gruenbacher <[email protected]>
- [PATCH] NFS: nfsaclsvc_encode_getaclres() - Fix potential NULL deref and tiny optimization.
- Prev by Date: Re: Cooling the cache
- Next by Date: Re: [ANNOUNCE] pahole and other DWARF2 utilities
- Previous by thread: Re: Small optimization for nfs3acl. (was: Re: [PATCH] NFS: nfsaclsvc_encode_getaclres() - Fix potential NULL deref and tiny optimization.)
- Next by thread: Re: [PATCH] NFS: nfsaclsvc_encode_getaclres() - Fix potential NULL deref and tiny optimization.
- Index(es):