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 (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2006-12-12 18:20 UTC by Peter Jeremy
Modified: 2022-10-17 12:40 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
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:40:40 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>