Bug 106646 - [nfs] [patch] Pointer incorrectly cast to ulong
Summary: [nfs] [patch] Pointer incorrectly cast to ulong
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 6.2-PRERELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-12 18:20 UTC by Peter Jeremy
Modified: 2017-12-31 22:29 UTC (History)
0 users

See Also:


Attachments
file.diff (549 bytes, patch)
2006-12-12 18:20 UTC, Peter Jeremy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Jeremy 2006-12-12 18:20:02 UTC
	sys/nfs/nfs_common.h defines a macro nfsm_aligned()
	to test if a particular address is sufficiently aligned
	for the architecture.  It does this by casting the address
	to u_long.  For portability, it should cast to intptr_t.

	The existing code will fail on an architecture with strict
	alignment where sizeof(void *) > sizeof(u_long)

Fix: The following (untested) patch should work
How-To-Repeat: 	Code inspection
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2012-03-25 04:35:17 UTC
Responsible Changed
From-To: freebsd-bugs->eadler

simple enough - take
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2012-09-02 18:05:29 UTC
Responsible Changed
From-To: eadler->freebsd-bugs

I won't be looking at this PR for a while and I need to clear some out 
of my queue
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:56 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped