• Andrew Morton's avatar
    [PATCH] compat ioctl_table fix · 1022068b
    Andrew Morton authored
    The arch ioctl tables are doing this:
    
    	struct foo ioctl_start[] = {
    		...
    	};
    	struct foo ioctl_end[0];
    
    and fs/compat.c expects that the table lies between &ioctl_end and
    &ioctl_start.
    
    Problem is, gcc-3.3 puts ioctl_end into bss, even if it is initialised.  It
    doesn't work.
    
    So we do away with the ioctl_end thing and add
    
    	int ioctl_table_length = ARRAY_SIZE(ioctl_start);
    
    to each architecture.
    1022068b
ioctl32.c 18.6 KB