Commit 3c8e39d4 authored by Andrew Victor's avatar Andrew Victor Committed by Russell King

[SERIAL PATCH] 1672/1: Restore sizeof(struct serial_struct)

Patch from SAN People

Patch 2.4.21-rmk1 added a "iomap_base" field to the serial_struct
structure (include/linux/serial.h).

Since that structure is exported to user-space it should be
consistent between revisions of the stable 2.4 kernels.

This patch removes 4 bytes (were "reserved") to restore the size
of the structure.

Without this patch, ioctl(TIOCGSERIAL) will copy_to_user() 4
bytes more than expected and possibly corrupt the application's
stack/heap.
parent edf12049
...@@ -49,7 +49,6 @@ struct serial_struct { ...@@ -49,7 +49,6 @@ struct serial_struct {
unsigned short iomem_reg_shift; unsigned short iomem_reg_shift;
unsigned int port_high; unsigned int port_high;
unsigned long iomap_base; /* cookie passed into ioremap */ unsigned long iomap_base; /* cookie passed into ioremap */
int reserved[1];
}; };
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment