Bug 58214

Summary: [patch] Align smallbits properly in poll()
Product: Base System Reporter: Stefan Farfeleder <stefan>
Component: kernAssignee: Andre Oppermann <andre>
Status: Closed FIXED    
Severity: Affects Only Me CC: stefan
Priority: Normal    
Version: 5.1-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
poll.diff none

Description Stefan Farfeleder 2003-10-18 17:20:17 UTC
Poll() uses the array smallbits that is big enough to hold 32 struct pollfd's
to avoid calling malloc() on small numbers of fds.  Because smalltype's members
have type char, its address might be misaligned for a struct pollfd.

Fix: Additionally, bits' type is changed to void * to avoid a cast and allows to get
rid of another one.
Comment 1 Andre Oppermann freebsd_committer freebsd_triage 2003-12-27 17:14:30 UTC
Responsible Changed
From-To: freebsd-bugs->andre

Take over.
Comment 2 Andre Oppermann freebsd_committer freebsd_triage 2003-12-28 23:46:46 UTC
State Changed
From-To: open->analyzed

BDE sent me an more detailed explanation of what to do.  I'll 
have a more correct patch soon.
Comment 3 Stefan Farfeleder 2004-08-17 14:20:25 UTC
On Sun, Dec 28, 2003 at 03:48:02PM -0800, Andre Oppermann wrote:
> BDE sent me an more detailed explanation of what to do.  I'll
> have a more correct patch soon.

Any news on this PR?

Thanks,
Stefan
Comment 4 Andre Oppermann freebsd_committer freebsd_triage 2004-08-27 22:24:13 UTC
State Changed
From-To: analyzed->patched

The fix with a small change from BDE has been committed and is in rev. 1.133 of 
kern/sys_generic.c.
Comment 5 Andre Oppermann freebsd_committer freebsd_triage 2004-09-13 20:47:17 UTC
State Changed
From-To: patched->closed

MFC'd the fix to RELENG_4.  Case closed.  Thanks to all who helped.