OSDN Git Service

linux-kernel-docs/linux-2.4.36.git
17 years ago[GCC4] fix build error in drivers/sound/wavfront.c
Willy Tarreau [Sun, 13 Aug 2006 14:00:26 +0000 (16:00 +0200)]
[GCC4] fix build error in drivers/sound/wavfront.c

This patch fixes this error with gcc 4 :

wavfront.c:2490: error: static declaration of 'errno' follows non-static declaration
/usr/src/git/linux-2.4/include/linux/unistd.h:4: error: previous declaration of 'errno' was here

The solution is to workaround errno the same way as in sound_firmware :

17 years ago[GCC4] fix build error in drivers/media/video/bttvp.h
Willy Tarreau [Sun, 13 Aug 2006 10:38:41 +0000 (12:38 +0200)]
[GCC4] fix build error in drivers/media/video/bttvp.h

This patch fixes this error with gcc 4 :

In file included from bttv-driver.c:49:
bttvp.h:61: error: array type has incomplete element type

17 years ago[GCC4] fix build error in drivers/ieee1394/highlevel.c
Willy Tarreau [Sun, 13 Aug 2006 09:12:38 +0000 (11:12 +0200)]
[GCC4] fix build error in drivers/ieee1394/highlevel.c

This patch fixes these errors with gcc 4 :

highlevel.c: In function 'highlevel_read':
highlevel.c:503: error: invalid lvalue in assignment
highlevel.c: In function 'highlevel_write':
highlevel.c:549: error: invalid lvalue in assignment

17 years ago[GCC4] fix build error in drivers/usb/audio.c
Willy Tarreau [Sat, 12 Aug 2006 22:20:16 +0000 (00:20 +0200)]
[GCC4] fix build error in drivers/usb/audio.c

This patch fixes this error with gcc 4 :

audio.c:466: error: static declaration of 'abs' follows non-static declaration
make[2]: *** [audio.o] Error 1
make[2]: Leaving directory `/usr/src/git/linux-2.4/drivers/usb'
make[1]: *** [_modsubdir_usb] Error 2
make[1]: Leaving directory `/usr/src/git/linux-2.4/drivers'
make: *** [_mod_drivers] Error 2

17 years ago[GCC4] fix build error in drivers/media/video/videodev.c
Willy Tarreau [Sat, 12 Aug 2006 16:54:55 +0000 (18:54 +0200)]
[GCC4] fix build error in drivers/media/video/videodev.c

This patch fixes this error :
videodev.c:636: error: static declaration of 'video_fops' follows non-static declaration
videodev.c:492: error: previous declaration of 'video_fops' was here
make[4]: *** [videodev.o] Error 1
make[4]: Leaving directory `/usr/src/git/linux-2.4/drivers/media/video'
make[3]: *** [first_rule] Error 2
make[3]: Leaving directory `/usr/src/git/linux-2.4/drivers/media/video'
make[2]: *** [_subdir_video] Error 2
make[2]: Leaving directory `/usr/src/git/linux-2.4/drivers/media'
make[1]: *** [_subdir_media] Error 2
make[1]: Leaving directory `/usr/src/git/linux-2.4/drivers'
make: *** [_dir_drivers] Error 2

17 years ago[GCC4] fix build error in drivers/i2c/i2c-proc.c
Willy Tarreau [Sat, 12 Aug 2006 16:50:41 +0000 (18:50 +0200)]
[GCC4] fix build error in drivers/i2c/i2c-proc.c

This patch fixes this error with gcc 4 :

i2c-proc.c: In function 'i2c_deregister_entry':
i2c-proc.c:208: error: invalid lvalue in assignment
i2c-proc.c: In function 'i2c_proc_chips':
i2c-proc.c:290: error: invalid lvalue in assignment
i2c-proc.c: In function 'i2c_sysctl_chips':
i2c-proc.c:322: error: invalid lvalue in assignment
i2c-proc.c: In function 'i2c_parse_reals':
i2c-proc.c:476: error: invalid lvalue in increment
i2c-proc.c:495: error: invalid lvalue in increment
i2c-proc.c:506: error: invalid lvalue in increment
i2c-proc.c:520: error: invalid lvalue in increment
i2c-proc.c:529: error: invalid lvalue in increment
i2c-proc.c:545: error: invalid lvalue in increment
i2c-proc.c: In function 'i2c_write_reals':
i2c-proc.c:577: error: invalid lvalue in increment
i2c-proc.c:618: error: invalid lvalue in assignment

17 years ago[GCC4] fix build error in drivers/i2c/i2c-core.c
Willy Tarreau [Sat, 12 Aug 2006 16:49:36 +0000 (18:49 +0200)]
[GCC4] fix build error in drivers/i2c/i2c-core.c

This patch fixes this error :
In file included from i2c-core.c:32:
/usr/src/git/linux-2.4/include/linux/i2c.h:73: error: array type has incomplete element type
/usr/src/git/linux-2.4/include/linux/i2c.h:200: error: array type has incomplete element type
i2c-core.c: In function 'i2c_transfer':
i2c-core.c:732: error: type of formal parameter 2 is incomplete
i2c-core.c: In function 'i2c_master_send':
i2c-core.c:753: error: invalid lvalue in assignment
i2c-core.c:759: error: type of formal parameter 2 is incomplete
i2c-core.c: In function 'i2c_master_recv':
i2c-core.c:789: error: type of formal parameter 2 is incomplete

17 years ago[GCC4] fix build error in drivers/isdn/hisax/hfc_pci.c
Willy Tarreau [Sun, 13 Aug 2006 09:44:18 +0000 (11:44 +0200)]
[GCC4] fix build error in drivers/isdn/hisax/hfc_pci.c

This patch fixes this error with gcc 4 :

hfc_pci.c: In function 'setup_hfcpci':
hfc_pci.c:1745: error: invalid lvalue in assignment

17 years ago[GCC4] fix build error in drivers/isdn/eicon/eicon.h
Willy Tarreau [Sun, 13 Aug 2006 09:41:11 +0000 (11:41 +0200)]
[GCC4] fix build error in drivers/isdn/eicon/eicon.h

This patch fixes this error with gcc 4 :

eicon_mod.c:44: error: static declaration of 'cards' follows non-static declaration
eicon.h:347: error: previous declaration of 'cards' was here

17 years ago[GCC4] fix build error in drivers/atm/fore200e.c
Willy Tarreau [Sun, 13 Aug 2006 08:45:32 +0000 (10:45 +0200)]
[GCC4] fix build error in drivers/atm/fore200e.c

This patch fixes this error with gcc 4 :

fore200e.c:3175: error: static declaration of 'fore200e_ops' follows non-static declaration
fore200e.c:115: error: previous declaration of 'fore200e_ops' was here
fore200e.c:3198: error: static declaration of 'fore200e_bus' follows non-static declaration
fore200e.c:116: error: previous declaration of 'fore200e_bus' was here

17 years ago[GCC4] fix build error in drivers/atm/iphase.c
Willy Tarreau [Sun, 13 Aug 2006 08:44:04 +0000 (10:44 +0200)]
[GCC4] fix build error in drivers/atm/iphase.c

This patch fixes these errors with gcc 4 :

iphase.c:89: error: static declaration of 'IADebugFlag' follows non-static declaration
iphase.h:71: error: previous declaration of 'IADebugFlag' was here
iphase.c: In function 'ia_que_tx':
iphase.c:630: error: invalid storage class for function 'ia_pkt_tx'
iphase.c:644: warning: implicit declaration of function 'ia_pkt_tx'
iphase.c: At top level:
iphase.c:2934: error: static declaration of 'ia_pkt_tx' follows non-static declaration
iphase.c:644: error: previous implicit declaration of 'ia_pkt_tx' was here

17 years ago[GCC4] fix build error in drivers/md/lvm-internal.h
Willy Tarreau [Sun, 13 Aug 2006 10:39:38 +0000 (12:39 +0200)]
[GCC4] fix build error in drivers/md/lvm-internal.h

This patch fixes this error with gcc 4 :

lvm.c:397: error: static declaration of 'vg_count' follows non-static declaration
lvm-internal.h:48: error: previous declaration of 'vg_count' was here

17 years ago[GCC4] fix build error in drivers/cdrom/sbpcd.c
Willy Tarreau [Sun, 13 Aug 2006 08:49:36 +0000 (10:49 +0200)]
[GCC4] fix build error in drivers/cdrom/sbpcd.c

This patch fixes these errors with gcc 4 :

sbpcd.c: In function 'get_state_T':
sbpcd.c:1216: error: invalid storage class for function 'cmd_out_T'
sbpcd.c:1221: warning: implicit declaration of function 'cmd_out_T'
sbpcd.c: At top level:
sbpcd.c:1360: error: static declaration of 'cmd_out_T' follows non-static declaration
sbpcd.c:1221: error: previous implicit declaration of 'cmd_out_T' was here
sbpcd.c: In function 'cmd_out_T':
sbpcd.c:1365: error: invalid storage class for function 'cc_DriveReset'
sbpcd.c:1501: warning: implicit declaration of function 'cc_DriveReset'
sbpcd.c: At top level:
sbpcd.c:1996: error: static declaration of 'cc_DriveReset' follows non-static declaration
sbpcd.c:1501: error: previous implicit declaration of 'cc_DriveReset' was here

17 years ago[GCC4] fix build error in drivers/ide/legacy/hd.c
Willy Tarreau [Sun, 13 Aug 2006 08:34:54 +0000 (10:34 +0200)]
[GCC4] fix build error in drivers/ide/legacy/hd.c

This patch fixes this error with gcc 4 :

hd.c:721: error: static declaration of 'hd_fops' follows non-static declaration
hd.c:697: error: previous declaration of 'hd_fops' was here
make[4]: *** [hd.o] Error 1
make[4]: Leaving directory `/usr/src/git/linux-2.4/drivers/ide/legacy'
make[3]: *** [first_rule] Error 2
make[3]: Leaving directory `/usr/src/git/linux-2.4/drivers/ide/legacy'
make[2]: *** [_subdir_legacy] Error 2
make[2]: Leaving directory `/usr/src/git/linux-2.4/drivers/ide'
make[1]: *** [_subdir_ide] Error 2
make[1]: Leaving directory `/usr/src/git/linux-2.4/drivers'
make: *** [_dir_drivers] Error 2

17 years ago[GCC4] fix build error in drivers/scsi/cpqfcTS*
Willy Tarreau [Sun, 13 Aug 2006 13:51:11 +0000 (15:51 +0200)]
[GCC4] fix build error in drivers/scsi/cpqfcTS*

This patch fixes this error with gcc 4 :

cpqfcTSworker.c:2566: error: static declaration of 'valid_al_pa' follows non-static declaration
cpqfcTSstructs.h:968: error: previous declaration of 'valid_al_pa' was here

17 years ago[GCC4] fix build error in drivers/scsi/atp870u.c
Willy Tarreau [Sun, 13 Aug 2006 13:49:55 +0000 (15:49 +0200)]
[GCC4] fix build error in drivers/scsi/atp870u.c

This patch fixes these errors with gcc 4 :

atp870u.c: In function 'send_s870':
atp870u.c:810: error: invalid lvalue in assignment
atp870u.c:811: error: invalid lvalue in assignment
atp870u.c:812: error: invalid lvalue in assignment
atp870u.c:817: error: invalid lvalue in assignment
atp870u.c:818: error: invalid lvalue in assignment
atp870u.c:819: error: invalid lvalue in assignment
atp870u.c:822: error: invalid lvalue in assignment
atp870u.c:831: error: invalid lvalue in assignment
atp870u.c:832: error: invalid lvalue in assignment
atp870u.c:833: error: invalid lvalue in assignment
atp870u.c:838: error: invalid lvalue in assignment
atp870u.c:839: error: invalid lvalue in assignment
atp870u.c:840: error: invalid lvalue in assignment

17 years ago[GCC4] fix build error in drivers/scsi/advansys.c
Willy Tarreau [Sun, 13 Aug 2006 13:30:07 +0000 (15:30 +0200)]
[GCC4] fix build error in drivers/scsi/advansys.c

This patch fixes these errors with gcc 4 :

advansys.c: In function 'asc_isr_callback':
advansys.c:7174: warning: comparisons like X<=Y<=Z do not have their mathematical meaning
advansys.c: At top level:
advansys.c:14581: error: static declaration of 'Default_3550_EEPROM_Config' follows non-static declaration
advansys.c:3459: error: previous declaration of 'Default_3550_EEPROM_Config' was here
advansys.c:14657: error: static declaration of 'Default_38C0800_EEPROM_Config' follows non-static declaration
advansys.c:3460: error: previous declaration of 'Default_38C0800_EEPROM_Config' was here
advansys.c:14787: error: static declaration of 'Default_38C1600_EEPROM_Config' follows non-static declaration
advansys.c:3461: error: previous declaration of 'Default_38C1600_EEPROM_Config' was here

17 years ago[GCC4] fix build error in drivers/net/hamradio/soundmodem/sm.h
Willy Tarreau [Sun, 13 Aug 2006 13:28:47 +0000 (15:28 +0200)]
[GCC4] fix build error in drivers/net/hamradio/soundmodem/sm.h

This patch fixes these errors with gcc 4 :

sm.c:68: error: static declaration of 'sm_drvinfo' follows non-static declaration
sm.h:154: error: previous declaration of 'sm_drvinfo' was here
sm.c:131: error: static declaration of 'sm_hardware_table' follows non-static declaration
sm.h:356: error: previous declaration of 'sm_hardware_table' was here

17 years ago[GCC4] fix build error in drivers/net/hamradio/baycom_epp.c
Willy Tarreau [Sun, 13 Aug 2006 13:27:43 +0000 (15:27 +0200)]
[GCC4] fix build error in drivers/net/hamradio/baycom_epp.c

This patch fixes these errors with gcc 4 :

baycom_epp.c:373: error: static declaration of 'errno' follows non-static declaration
/usr/src/git/linux-2.4/include/linux/unistd.h:4: error: previous declaration of 'errno' was here
baycom_epp.c: In function 'encode_hdlc':
baycom_epp.c:530: error: jump into statement expression
baycom_epp.c:539: error: jump into statement expression
(...)

17 years ago[GCC4] fix build error in drivers/net/wan/sdla_fr.c
Willy Tarreau [Sun, 13 Aug 2006 13:20:26 +0000 (15:20 +0200)]
[GCC4] fix build error in drivers/net/wan/sdla_fr.c

This patch fixes these errors with gcc 4 (+ lots of PACKED warnings) :

sdla_fr.c: In function 'process_udp_mgmt_pkt':
sdla_fr.c:3932: error: invalid lvalue in assignment
sdla_fr.c:3983: error: invalid lvalue in assignment

17 years ago[GCC4] fix build error in drivers/net/wan/sdlamain.c
Willy Tarreau [Sun, 13 Aug 2006 13:06:49 +0000 (15:06 +0200)]
[GCC4] fix build error in drivers/net/wan/sdlamain.c

This patch fixes this error with gcc 4 :

sdlamain.c: In function 'ioctl_dump':
sdlamain.c:1030: error: invalid lvalue in assignment

17 years ago[GCC4] fix build error in drivers/net/wan/sdladrv.c
Willy Tarreau [Sun, 13 Aug 2006 11:13:58 +0000 (13:13 +0200)]
[GCC4] fix build error in drivers/net/wan/sdladrv.c

This patch fixes these errors with gcc 4 :

sdladrv.c: In function 'sdla_peek':
sdladrv.c:1005: error: invalid lvalue in assignment
sdladrv.c: In function 'sdla_poke':
sdladrv.c:1089: error: invalid lvalue in assignment
sdladrv.c: In function 'detect_s514':
sdladrv.c:2131: error: invalid lvalue in assignment
sdladrv.c:2135: error: invalid lvalue in assignment

17 years ago[GCC4] fix build error in drivers/net/wan/comx-hw-comx.c
Willy Tarreau [Sun, 13 Aug 2006 11:08:18 +0000 (13:08 +0200)]
[GCC4] fix build error in drivers/net/wan/comx-hw-comx.c

This patch fixes these errors with gcc 4 :

comx-hw-comx.c:1402: error: static declaration of 'comx_hw' follows non-static declaration
comx-hw-comx.c:96: error: previous declaration of 'comx_hw' was here
comx-hw-comx.c:1411: error: static declaration of 'cmx_hw' follows non-static declaration
comx-hw-comx.c:97: error: previous declaration of 'cmx_hw' was here
comx-hw-comx.c:1420: error: static declaration of 'hicomx_hw' follows non-static declaration
comx-hw-comx.c:95: error: previous declaration of 'hicomx_hw' was here

17 years ago[GCC4] fix build error in drivers/net/sk98lin/skvpd.c
Willy Tarreau [Sun, 13 Aug 2006 10:52:43 +0000 (12:52 +0200)]
[GCC4] fix build error in drivers/net/sk98lin/skvpd.c

This patch fixes this error with gcc 4 :

skvpd.c: In function 'VpdInit':
skvpd.c:475: error: invalid lvalue in assignment

17 years ago[GCC4] fix build error in drivers/net/irda/donauboe.c
Willy Tarreau [Sun, 13 Aug 2006 10:47:53 +0000 (12:47 +0200)]
[GCC4] fix build error in drivers/net/irda/donauboe.c

This patch fixes this error with gcc 4 :

donauboe.c:212: error: static declaration of 'irda_crc16_table' follows non-static declaration
/usr/src/git/linux-2.4/include/net/irda/crc.h:22: error: previous declaration of 'irda_crc16_table' was here

17 years ago[GCC4] fix build error in drivers/net/arlan.c
Willy Tarreau [Sun, 13 Aug 2006 10:44:07 +0000 (12:44 +0200)]
[GCC4] fix build error in drivers/net/arlan.c

This patch fixes these errors with gcc 4 :

arlan.c:15: error: static declaration of 'arlan_version' follows non-static declaration
arlan.h:54: error: previous declaration of 'arlan_version' was here
arlan.c:23: error: static declaration of 'siteName' follows non-static declaration
arlan.h:50: error: previous declaration of 'siteName' was here

17 years ago[GCC4] fix build error in drivers/net/3c507.c
Willy Tarreau [Sun, 13 Aug 2006 10:42:38 +0000 (12:42 +0200)]
[GCC4] fix build error in drivers/net/3c507.c

This patch fixes these errors with gcc 4 :

3c507.c: In function 'el16_interrupt':
3c507.c:605: error: invalid storage class for function 'init_rx_bufs'
3c507.c:611: warning: implicit declaration of function 'init_rx_bufs'
3c507.c: At top level:
3c507.c:661: warning: conflicting types for 'init_rx_bufs'
3c507.c:661: error: static declaration of 'init_rx_bufs' follows non-static declaration
3c507.c:611: error: previous implicit declaration of 'init_rx_bufs' was here

17 years ago[GCC4] fix build error in drivers/net/wan/comx.h
Willy Tarreau [Sun, 13 Aug 2006 08:37:13 +0000 (10:37 +0200)]
[GCC4] fix build error in drivers/net/wan/comx.h

This patch fixes this error with gcc 4 :

comx.c:114: error: static declaration of 'comx_root_dir' follows non-static declaration
comx.h:215: error: previous declaration of 'comx_root_dir' was here
make[4]: *** [comx.o] Error 1
make[4]: Leaving directory `/usr/src/git/linux-2.4/drivers/net/wan'
make[3]: *** [first_rule] Error 2
make[3]: Leaving directory `/usr/src/git/linux-2.4/drivers/net/wan'
make[2]: *** [_subdir_wan] Error 2
make[2]: Leaving directory `/usr/src/git/linux-2.4/drivers/net'
make[1]: *** [_subdir_net] Error 2
make[1]: Leaving directory `/usr/src/git/linux-2.4/drivers'
make: *** [_dir_drivers] Error 2

17 years ago[GCC4] fix build error in drivers/net/acenic.c
Willy Tarreau [Sat, 12 Aug 2006 17:02:28 +0000 (19:02 +0200)]
[GCC4] fix build error in drivers/net/acenic.c

This patch fixes this error with gcc 4 :
acenic.c: In function 'acenic_probe':
acenic.c:668: error: invalid storage class for function 'ace_watchdog'
acenic.c:669: error: 'ace_watchdog' undeclared (first use in this function)
acenic.c:669: error: (Each undeclared identifier is reported only once
acenic.c:669: error: for each function it appears in.)

17 years ago[GCC4] fix build error in drivers/char/rio/rio_linux.c
Willy Tarreau [Sun, 13 Aug 2006 09:09:53 +0000 (11:09 +0200)]
[GCC4] fix build error in drivers/char/rio/rio_linux.c

This patch fixes this error with gcc 4 :

rio_linux.c: In function 'rio_init':
rio_linux.c:1209: error: invalid lvalue in assignment
rio_linux.c:1281: error: invalid lvalue in assignment
rio_linux.c:1333: error: invalid lvalue in assignment

17 years ago[GCC4] fix build error in drivers/char/drm-4.0/drmP.h
Willy Tarreau [Sun, 13 Aug 2006 09:08:18 +0000 (11:08 +0200)]
[GCC4] fix build error in drivers/char/drm-4.0/drmP.h

This patch fixes these errors with gcc 4 :

gamma_drv.c: In function 'gamma_setup':
gamma_drv.c:191: error: expected ')' before '__FUNCTION__'
gamma_drv.c: In function 'gamma_takedown':
gamma_drv.c:210: error: expected ')' before '__FUNCTION__'
gamma_drv.c:258: error: expected ')' before '__FUNCTION__'
gamma_drv.c: In function 'gamma_init':
gamma_drv.c:348: error: expected ')' before '__FUNCTION__'
gamma_drv.c:361: error: expected ')' before '__FUNCTION__'
gamma_drv.c: In function 'gamma_cleanup':
gamma_drv.c:388: error: expected ')' before '__FUNCTION__'
gamma_drv.c:392: error: expected ')' before '__FUNCTION__'
gamma_drv.c: In function 'gamma_open':
gamma_drv.c:443: error: expected ')' before '__FUNCTION__'
gamma_drv.c: In function 'gamma_release':
gamma_drv.c:468: error: expected ')' before '__FUNCTION__'
gamma_drv.c:477: error: expected ')' before '__FUNCTION__'
gamma_drv.c: In function 'gamma_ioctl':
gamma_drv.c:510: error: expected ')' before '__FUNCTION__'
gamma_drv.c:520: error: expected ')' before '__FUNCTION__'
gamma_drv.c: In function 'gamma_unlock':
gamma_drv.c:546: error: expected ')' before '__FUNCTION__'
gamma_drv.c:551: error: expected ')' before '__FUNCTION__'
gamma_drv.c:562: error: expected ')' before '__FUNCTION__'

17 years ago[GCC4] fix build error in drivers/char/tpqic02.c
Willy Tarreau [Sun, 13 Aug 2006 08:58:42 +0000 (10:58 +0200)]
[GCC4] fix build error in drivers/char/tpqic02.c

This patch fixes these errors with gcc 4 :

tpqic02.c: In function 'tp_sense':
tpqic02.c:823: error: invalid storage class for function 'finish_rw'
tpqic02.c:834: warning: implicit declaration of function 'finish_rw'
tpqic02.c: At top level:
tpqic02.c:1110: warning: conflicting types for 'finish_rw'
tpqic02.c:1110: error: static declaration of 'finish_rw' follows non-static declaration
tpqic02.c:834: error: previous implicit declaration of 'finish_rw' was here
tpqic02.c: In function 'qic02_tape_open':
tpqic02.c:2179: error: invalid storage class for function 'qic02_tape_open_no_use_count'
tpqic02.c:2182: warning: implicit declaration of function 'qic02_tape_open_no_use_count'
tpqic02.c: At top level:
tpqic02.c:2188: error: static declaration of 'qic02_tape_open_no_use_count' follows non-static declaration
tpqic02.c:2182: error: previous implicit declaration of 'qic02_tape_open_no_use_count' was here

17 years ago[GCC4] fix build error in drivers/char/sonypi.h
Willy Tarreau [Sun, 13 Aug 2006 08:57:49 +0000 (10:57 +0200)]
[GCC4] fix build error in drivers/char/sonypi.h

This patch fixes these errors with gcc 4 :

In file included from sonypi.c:51:
sonypi.h: In function 'sonypi_ec_write':
sonypi.h:409: error: 'verbose' undeclared (first use in this function)
sonypi.h:409: error: (Each undeclared identifier is reported only once
sonypi.h:409: error: for each function it appears in.)
sonypi.h: In function 'sonypi_ec_read':
sonypi.h:424: error: 'verbose' undeclared (first use in this function)

17 years ago[GCC4] fix build error in drivers/char/sonypi.h
Willy Tarreau [Sun, 13 Aug 2006 08:56:16 +0000 (10:56 +0200)]
[GCC4] fix build error in drivers/char/sonypi.h

This patch fixes this error with gcc 4 :

sonypi.c:56: error: static declaration of 'verbose' follows non-static declaration
sonypi.h:404: error: previous declaration of 'verbose' was here

17 years ago[GCC4] fix build error in drivers/block/paride/pd.c
Willy Tarreau [Sun, 13 Aug 2006 08:47:31 +0000 (10:47 +0200)]
[GCC4] fix build error in drivers/block/paride/pd.c

This patch fixes this error with gcc 4 :

pd.c:358: error: static declaration of 'pd_fops' follows non-static declaration
pd.c:346: error: previous declaration of 'pd_fops' was here

17 years ago[GCC4] fix build error in drivers/block/xd.c
Willy Tarreau [Sun, 13 Aug 2006 08:46:35 +0000 (10:46 +0200)]
[GCC4] fix build error in drivers/block/xd.c

This patch fixes this error with gcc 4 :

xd.c:141: error: static declaration of 'xd_fops' follows non-static declaration
xd.c:128: error: previous declaration of 'xd_fops' was here

17 years ago[GCC4] fix build error in drivers/block/nbd.c
Willy Tarreau [Sat, 12 Aug 2006 17:01:02 +0000 (19:01 +0200)]
[GCC4] fix build error in drivers/block/nbd.c

This patch fixes this error with gcc 4 :
nbd.c:73: error: static declaration of 'requests_in' follows non-static declaration
/usr/src/git/linux-2.4/include/linux/nbd.h:33: error: previous declaration of 'requests_in' was here
nbd.c:74: error: static declaration of 'requests_out' follows non-static declaration
/usr/src/git/linux-2.4/include/linux/nbd.h:34: error: previous declaration of 'requests_out' was here

17 years ago[GCC4] fix build error in net/khttpd/prototypes.h
Willy Tarreau [Sun, 13 Aug 2006 14:15:40 +0000 (16:15 +0200)]
[GCC4] fix build error in net/khttpd/prototypes.h

This patch fixes this error with gcc 4 :

In file included from main.c:68:
prototypes.h:52: error: array type has incomplete element type

17 years ago[GCC4] fix build error in net/ipv6/sysctl_net_ipv6.c
Willy Tarreau [Sun, 13 Aug 2006 14:13:04 +0000 (16:13 +0200)]
[GCC4] fix build error in net/ipv6/sysctl_net_ipv6.c

This patch fixes these errors with gcc 4 :

sysctl_net_ipv6.c:38: error: non-static declaration of 'ipv6_root_table' follows static declaration
sysctl_net_ipv6.c:34: error: previous declaration of 'ipv6_root_table' was here
sysctl_net_ipv6.c:43: error: non-static declaration of 'ipv6_net_table' follows static declaration
sysctl_net_ipv6.c:35: error: previous declaration of 'ipv6_net_table' was here

17 years ago[GCC4] fix build error in net/ipv6/ip6_fib.c
Willy Tarreau [Sat, 12 Aug 2006 16:57:21 +0000 (18:57 +0200)]
[GCC4] fix build error in net/ipv6/ip6_fib.c

This patch fixes this error with gcc4 :
ip6_fib.c:98: error: static declaration of 'fib6_walker_list' follows non-static declaration
/usr/src/git/linux-2.4/include/net/ip6_fib.h:98: error: previous declaration of 'fib6_walker_list' was here
make[3]: *** [ip6_fib.o] Error 1
make[3]: Leaving directory `/usr/src/git/linux-2.4/net/ipv6'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/git/linux-2.4/net/ipv6'
make[1]: *** [_subdir_ipv6] Error 2
make[1]: Leaving directory `/usr/src/git/linux-2.4/net'
make: *** [_dir_net] Error 2

17 years ago[GCC4] fix build error in fs/intermezzo/presto.c
Willy Tarreau [Sun, 13 Aug 2006 14:04:03 +0000 (16:04 +0200)]
[GCC4] fix build error in fs/intermezzo/presto.c

This patch fixes these errors with gcc 4 :

presto.c: In function 'izo_mark_cache':
presto.c:347: error: invalid lvalue in assignment
presto.c:348: error: invalid lvalue in assignment
presto.c: In function 'izo_mark_fset':
presto.c:386: error: invalid lvalue in assignment
presto.c:387: error: invalid lvalue in assignment

17 years ago[GCC4] fix build error in include/asm-ppc/spinlock.h
Willy Tarreau [Sun, 13 Aug 2006 14:30:17 +0000 (16:30 +0200)]
[GCC4] fix build error in include/asm-ppc/spinlock.h

asm-ppc/spinlock.h references an extern __spin_trylock() function
which is defined as static in arch/ppc/lib/locks.c.

17 years ago[GCC4] fix build error in include/net/irda/irlan_event.h
Willy Tarreau [Sun, 13 Aug 2006 14:14:50 +0000 (16:14 +0200)]
[GCC4] fix build error in include/net/irda/irlan_event.h

This patch fixes this error with gcc 4 :

irlan_common.c:74: error: static declaration of 'irlan_state' follows non-static declaration
/usr/src/git/linux-2.4/include/net/irda/irlan_event.h:70: error: previous declaration of 'irlan_state' was here

17 years ago[GCC4] fix build error in include/net/irda/irttp.h
Willy Tarreau [Sun, 13 Aug 2006 14:13:50 +0000 (16:13 +0200)]
[GCC4] fix build error in include/net/irda/irttp.h

This patch fixes this error with gcc 4 :

irttp.c:41: error: static declaration of 'irttp' follows non-static declaration
/usr/src/git/linux-2.4/include/net/irda/irttp.h:212: error: previous declaration of 'irttp' was here

17 years ago[GCC4] fix build error in include/net/udp.h
Willy Tarreau [Sun, 13 Aug 2006 14:10:45 +0000 (16:10 +0200)]
[GCC4] fix build error in include/net/udp.h

This patch fixes this error with gcc 4 :

In file included from af_econet.c:39:
/usr/src/git/linux-2.4/include/net/udp.h:75: error: array type has incomplete element type

17 years ago[GCC4] fix build error in include/linux/intermezzo_fs.h
Willy Tarreau [Sun, 13 Aug 2006 14:04:49 +0000 (16:04 +0200)]
[GCC4] fix build error in include/linux/intermezzo_fs.h

This patch fixes these errors with gcc 4 :

super.c:339: error: static declaration of 'presto_fs_type' follows non-static declaration
/usr/src/git/linux-2.4/include/linux/intermezzo_fs.h:324: error: previous declaration of 'presto_fs_type' was here

17 years ago[GCC4] fix build error in include/linux/fsfilter.h
Willy Tarreau [Sun, 13 Aug 2006 14:02:50 +0000 (16:02 +0200)]
[GCC4] fix build error in include/linux/fsfilter.h

This patch fixes this error with gcc 4 :

methods.c:60: error: static declaration of 'filter_oppar' follows non-static declaration
/usr/src/git/linux-2.4/include/linux/fsfilter.h:73: error: previous declaration of 'filter_oppar' was here

17 years ago[GCC4] fix build error in include/net/irda/qos.h
Willy Tarreau [Sun, 13 Aug 2006 14:33:36 +0000 (16:33 +0200)]
[GCC4] fix build error in include/net/irda/qos.h

This patch fixes this error with gcc 4 :

actisys.c:65: error: static declaration of 'baud_rates' follows non-static declaration
/usr/src/git/linux-2.4/include/net/irda/qos.h:86: error: previous declaration of 'baud_rates' was here

17 years ago[GCC4] fix build error in include/linux/generic_serial.h
Willy Tarreau [Sun, 13 Aug 2006 08:54:26 +0000 (10:54 +0200)]
[GCC4] fix build error in include/linux/generic_serial.h

This patch fixes this error with gcc 4 :

generic_serial.c:36: error: static declaration of 'gs_debug' follows non-static declaration
/usr/src/git/linux-2.4/include/linux/generic_serial.h:101: error: previous declaration of 'gs_debug' was here

17 years ago[GCC4] add preliminary support for GCC 4 (Mikael Pettersson)
Willy Tarreau [Sat, 12 Aug 2006 16:31:48 +0000 (18:31 +0200)]
[GCC4] add preliminary support for GCC 4 (Mikael Pettersson)

This is the well tested part of Mikael Pettersson's GCC4 patches.
It offers support for GCC4 on x86, x86_64 and ppc. Other archs
untested. The risk of regression on older compilers at this stage
should be close to zero. At least, x86 with allmodconfig still builds
with gcc-2.95.3.

Other places have been carefully fixed but the code has not been run
yet. They will be merged individually in further patches.

17 years agoChange VERSION to 2.4.33
Marcelo Tosatti [Sun, 13 Aug 2006 01:59:54 +0000 (22:59 -0300)]
Change VERSION to 2.4.33

17 years agoChange VERSION to 2.4.33-rc3
Marcelo Tosatti [Thu, 27 Jul 2006 20:27:22 +0000 (17:27 -0300)]
Change VERSION to 2.4.33-rc3

17 years ago[PATCH-2.4] Typo in cdrom.c
Andreas Haumer [Thu, 6 Jul 2006 08:23:12 +0000 (10:23 +0200)]
[PATCH-2.4] Typo in cdrom.c

Discussion here :
  http://bugzilla.kernel.org/show_bug.cgi?id=2966

The typo seems to exist in linux-2.4 too, at least in
2.4.32, 2.4.32-hf32.6 and 2.4.33pre3. The fix for
linux-2.4 would be just like the proposed patch for
linux-2.6.

17 years ago[PATCH] ethtool: two oopses in ethtool_set_coalesce() and ethtool_set_pauseparam()
Willy Tarreau [Wed, 5 Jul 2006 20:34:52 +0000 (22:34 +0200)]
[PATCH] ethtool: two oopses in ethtool_set_coalesce() and ethtool_set_pauseparam()

The function pointers which were checked were for their get_* counterparts.
Typically a copy-paste typo.

Signed-off-by: Willy Tarreau <w@1wt.eu>
17 years ago[PATCH] EXT3: ext3 block bitmap leakage
Kirill Korotaev [Fri, 30 Jun 2006 09:41:05 +0000 (13:41 +0400)]
[PATCH] EXT3: ext3 block bitmap leakage

This patch fixes ext3 block bitmap leakage,
which leads to the following fsck messages on
_healthy_ filesystem:
Block bitmap differences:  -64159 -73707

All kernels up to 2.6.17 have this bug.

Found by
   Vasily Averin <vvs@sw.ru> and Andrey Savochkin <saw@sawoct.com>
Test case triggered the issue was created by
   Dmitry Monakhov <dmonakhov@sw.ru>

Signed-Off-By: Vasiliy Averin <vvs@sw.ru>
Signed-Off-By: Andrey Savochkin <saw@sawoct.com>
Signed-Off-By: Kirill Korotaev <dev@openvz.org>
CC: Dmitry Monakhov <dmonakhov@sw.ru>
17 years ago[PATCH] range checking for sleep states sent to /proc/acpi/sleep
Willy Tarreau [Tue, 20 Jun 2006 22:42:43 +0000 (00:42 +0200)]
[PATCH] range checking for sleep states sent to /proc/acpi/sleep

A range checking is missing in acpi_system_write_sleep() in kernel
2.4, and writing a large integer value to /proc/acpi/sleep will cause
an oops. I could reproduce one this way :

   # echo 0x800000 >/proc/acpi/sleep

Fix extracted from the PaX patch.

17 years agoChange VERSION to v2.4.33-rc2
Marcelo Tosatti [Tue, 20 Jun 2006 14:44:40 +0000 (11:44 -0300)]
Change VERSION to v2.4.33-rc2

17 years ago[PATCH] Fix vfs_unlink/NFS NULL pointer dereference
Willy Tarreau [Mon, 19 Jun 2006 23:00:07 +0000 (01:00 +0200)]
[PATCH] Fix vfs_unlink/NFS NULL pointer dereference

v2.4.33-pre introduced a fix for lack of synchronization between
link/unlink which requires vfs_unlink to grab i_zombie of both the
victim and its parent with double_down().

Problem is that NFS client deletes the victim dentry on ->unlink,
resulting in a NULL dereference when vfs_unlink() tries to up
dentry->d_inode->i_zombie.

Keep a copy of the inode pointer, incrementing its reference counter, to
fix the situation.

Signed-off-by: Marcelo Tosatti <marcelo@kvack.org>
17 years ago[NETFILTER]: Fix do_add_counters race, possible oops or info leak (CVE-2006-0039)
Solar Designer [Tue, 20 Jun 2006 06:04:17 +0000 (23:04 -0700)]
[NETFILTER]: Fix do_add_counters race, possible oops or info leak (CVE-2006-0039)

Solar Designer found a race condition in do_add_counters(). The beginning
of paddc is supposed to be the same as tmp which was sanity-checked
above, but it might not be the same in reality. In case the integer
overflow and/or the race condition are triggered, paddc->num_counters
might not match the allocation size for paddc. If the check below
(t->private->number != paddc->num_counters) nevertheless passes (perhaps
this requires the race condition to be triggered), IPT_ENTRY_ITERATE()
would read kernel memory beyond the allocation size, potentially causing
an oops or leaking sensitive data (e.g., passwords from host system or
from another VPS) via counter increments. This requires CAP_NET_ADMIN.

Signed-off-by: Solar Designer <solar@openwall.com>
Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SCTP]: Respect the real chunk length when walking parameters. (CVE-2006-1858)
Vlad Yasevich [Tue, 20 Jun 2006 05:57:28 +0000 (22:57 -0700)]
[SCTP]: Respect the real chunk length when walking parameters. (CVE-2006-1858)

When performing bound checks during the parameter processing, we
want to use the real chunk and paramter lengths for bounds instead
of the rounded ones.  This prevents us from potentially walking of
the end if the chunk length was miscalculated.  We still use rounded
lengths when advancing the pointer. This was found during a
conformance test that changed the chunk length without modifying
parameters.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SCTP]: Validate the parameter length in HB-ACK chunk. (CVE-2006-1857)
Vlad Yasevich [Tue, 20 Jun 2006 05:56:37 +0000 (22:56 -0700)]
[SCTP]: Validate the parameter length in HB-ACK chunk. (CVE-2006-1857)

If SCTP receives a badly formatted HB-ACK chunk, it is possible
that we may access invalid memory and potentially have a buffer
overflow.  We should really make sure that the chunk format is
what we expect, before attempting to touch the data.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[PATCH 2.4.33-rc1] repair __ide_dma_no_op breakage
Mikael Pettersson [Sat, 17 Jun 2006 20:47:53 +0000 (22:47 +0200)]
[PATCH 2.4.33-rc1] repair __ide_dma_no_op breakage

> Willy TARREAU:
>      ide: trying to enable DMA may cause an oops

This patch to ide-dma.c defines a function 'int __ide_dma_no_op(void)'
and stores its address in function pointer fields with type
'int (*)(ide_drive_t*)'. Thus callers will call __ide_dma_no_op() with
more parameters than it expects.

This is invalid C and it will break horribly in some valid calling
conventions (in particular, when parameters are passed on the stack
and the callee not the caller pops them).

Furtunately the fix is simple: just define __ide_dma_no_op() with
the correct prototype (taking an unused ide_drive_t* parameter),
and drop the now redundant casts from the assignments. Also make
__ide_dma_no_op() 'static' as it is local to ide-dma.c.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
17 years agoUpdate VERSION to v2.4.33-rc1
Marcelo Tosatti [Fri, 16 Jun 2006 17:39:40 +0000 (14:39 -0300)]
Update VERSION to v2.4.33-rc1

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.4
Marcelo Tosatti [Tue, 13 Jun 2006 14:39:15 +0000 (11:39 -0300)]
Merge /pub/scm/linux/kernel/git/davem/net-2.4

18 years ago[PATCH] forcedeth update to 0.50
Willy Tarreau [Tue, 30 May 2006 22:03:19 +0000 (00:03 +0200)]
[PATCH] forcedeth update to 0.50

While testing the forcedeth driver on a SunFire X2100 (Opteron Dual
Core), I encountered problems with the driver hanging after a few
megabytes while pushing traffic at Gbps speed. The driver was at 0.30.
An mostly trivial update to 0.50 fixed all the problems and brought a
huge performance boost. However, max_interrupt_work should be set to
10 not 5 above 400 kpps.

18 years ago[PATCH] i2c: Delete 2 out-of-date, colliding ioctl defines
Jean Delvare [Wed, 31 May 2006 16:28:48 +0000 (18:28 +0200)]
[PATCH] i2c: Delete 2 out-of-date, colliding ioctl defines

Delete 2 out-of-date, colliding ioctl defines

I2C_UDELAY and I2C_MDELAY are supposed to be used by i2c-algo-bit, but
actually aren't (and I suspect never were). That wouldn't be a major
issue, but it happens that their values are the same as I2C_FUNCS and
I2C_SLAVE_FORCE, respectively, which *are* widely used. It might cause
unnecessary confusion, thus I think it's better to get rid of them,
as was already done in Linux 2.6 and i2c-CVS 7 months ago.

http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=80ce3b7d0f52877b80cddc3ace8b332d888f0131

Signed-off-by: Jean Delvare <khali@linux-fr.org>
18 years ago[PATCH] scx200_acb: Fix resource name use after free
Jean Delvare [Wed, 31 May 2006 15:16:16 +0000 (17:16 +0200)]
[PATCH] scx200_acb: Fix resource name use after free

scx200_acb: Fix resource name use after free

We can't pass a string on the stack to request_region. As soon as we
leave the function that stack is gone and the string is lost. Let's
use the same string we identify the i2c_adapter with instead, it's
more simple, more consistent, and just works.

This is the second half of fix to bug #6445.

It was merged in 2.6.17-rc4:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b33d0798e6cfae1fcee75afc808fe5690a48a814

And 2.6.16.17:
http://www.kernel.org/git/?p=linux/kernel/git/stable/linux-2.6.16.y.git;a=commit;h=9a4a3539b356a8f4da8c6ace95bc4135314fed7e

Signed-off-by: Jean Delvare <khali@linux-fr.org>
18 years ago[NETFILTER]: Fix possible overflow in netfilters do_replace()
Kirill Korotaev [Mon, 29 May 2006 09:10:39 +0000 (02:10 -0700)]
[NETFILTER]: Fix possible overflow in netfilters do_replace()

netfilter's do_replace() can overflow on addition within SMP_ALIGN()
and/or on multiplication by NR_CPUS, resulting in a buffer overflow on
the copy_from_user().  In practice, the overflow on addition is
triggerable on all systems, whereas the multiplication one might require
much physical memory to be present due to the check above.  Either is
sufficient to overwrite arbitrary amounts of kernel memory.

I really hate adding the same check to all 4 versions of do_replace(),
but the code is duplicate...

Found by Solar Designer during security audit of OpenVZ.org

Signed-Off-By: Kirill Korotaev <dev@openvz.org>
Signed-Off-By: Solar Designer <solar@openwall.com>
Signed-off-by: Patrck McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Fix panic's when receiving fragmented SCTP control chunks. (CVE-2006-2272)
Sridhar Samudrala [Mon, 29 May 2006 06:33:47 +0000 (23:33 -0700)]
[SCTP]: Fix panic's when receiving fragmented SCTP control chunks. (CVE-2006-2272)

Use pskb_pull() to handle incoming COOKIE_ECHO and HEARTBEAT chunks that
are received as skb's with fragment list.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Prevent possible infinite recursion with multiple bundled DATA. (CVE-2006...
Vladislav Yasevich [Mon, 29 May 2006 06:32:14 +0000 (23:32 -0700)]
[SCTP]: Prevent possible infinite recursion with multiple bundled DATA. (CVE-2006-2274)

There is a rare situation that causes lksctp to go into infinite recursion
and crash the system.  The trigger is a packet that contains at least the
first two DATA fragments of a message bundled together. The recursion is
triggered when the user data buffer is smaller that the full data message.
The problem is that we clone the skb for every fragment in the message.
When reassembling the full message, we try to link skbs from the "first
fragment" clone using the frag_list. However, since the frag_list is shared
between two clones in this rare situation, we end up setting the frag_list
pointer of the second fragment to point to itself.  This causes
sctp_skb_pull() to potentially recurse indefinitely.

Proposed solution is to make a copy of the skb when attempting to link
things using frag_list.

Signed-off-by: Vladislav Yasevich <vladsilav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV4]: ip_route_input panic fix (CVE-2006-1525)
Stephen Hemminger [Mon, 29 May 2006 06:27:17 +0000 (23:27 -0700)]
[IPV4]: ip_route_input panic fix (CVE-2006-1525)

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=6388
The bug is caused by ip_route_input dereferencing skb->nh.protocol of
the dummy skb passed dow from inet_rtm_getroute (Thanks Thomas for seeing
it). It only happens if the route requested is for a multicast IP
address.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Fix state table entries for chunks received in CLOSED state. (CVE-2006-2271)
Sridhar Samudrala [Mon, 29 May 2006 06:20:42 +0000 (23:20 -0700)]
[SCTP]: Fix state table entries for chunks received in CLOSED state. (CVE-2006-2271)

Discard an unexpected chunk in CLOSED state rather can calling BUG().

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: dann frazier <dannf@debian.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PATCH] USB: Gadget RNDIS fix alloc bug. (buffer overflow)
Shaun Tancheff [Wed, 22 Feb 2006 23:47:34 +0000 (19:47 -0400)]
[PATCH] USB: Gadget RNDIS fix alloc bug. (buffer overflow)

Remote NDIS response to OID_GEN_SUPPORTED_LIST only allocated space
for the data attached to the reply, and not the reply structure
itself. This caused other kmalloc'd memory to be corrupted.

Signed-off-by: Shaun Tancheff <shaun@tancheff.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] Fix vfs_unlink issue introduced by link/unlink race correction
Marcelo Tosatti [Fri, 26 May 2006 19:41:06 +0000 (16:41 -0300)]
[PATCH] Fix vfs_unlink issue introduced by link/unlink race correction

may_delete() should be called before attempting to grab victim's
i_zombie.

Signed-off-by: Marcelo Tosatti <marcelo@kvack.org>
18 years ago[PATCH] JBD: avoid panic on corrupted journal superblock (from akpm)
Willy TARREAU [Sun, 21 May 2006 23:08:34 +0000 (19:08 -0400)]
[PATCH] JBD: avoid panic on corrupted journal superblock (from akpm)

Initial patch from Andrew Morton merged into 2.6 :
Don't panic if the journal superblock is wrecked: just fail the mount.

18 years ago[PATCH] Fix memory leak when the ext3's journal file is corrupted
Theodore Ts'o [Sun, 21 May 2006 23:08:34 +0000 (19:08 -0400)]
[PATCH] Fix memory leak when the ext3's journal file is corrupted

Fix memory leak when the ext3's journal file is corrupted

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 years ago[NETFILTER]: SNMP NAT: fix memory corruption
Patrick McHardy [Tue, 23 May 2006 08:05:41 +0000 (01:05 -0700)]
[NETFILTER]: SNMP NAT: fix memory corruption

Fix memory corruption caused by snmp_trap_decode:

- When snmp_trap_decode fails before the id and address are allocated,
  the pointers contain random memory, but are freed by the caller
  (snmp_parse_mangle).

- When snmp_trap_decode fails after allocating just the ID, it tries
  to free both address and ID, but the address pointer still contains
  random memory. The caller frees both ID and random memory again.

- When snmp_trap_decode fails after allocating both, it frees both,
  and the callers frees both again.

The corruption can be triggered remotely when the ip_nat_snmp_basic
module is loaded and traffic on port 161 or 162 is NATed.

Found by multiple testcases of the trap-app and trap-enc groups of the
PROTOS c06-snmpv1 testsuite.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PATCH] AMD Au1xx0: fix ethernet TX stats
Sergei Shtylyov [Sat, 8 Apr 2006 06:50:39 +0000 (10:50 +0400)]
[PATCH] AMD Au1xx0: fix ethernet TX stats

With Au1xx0 Ethernet driver, TX bytes/packets always remain zero.

The problem seems to be that when packet has been transmitted, the
length word in DMA buffer is zero.

Attached is a patch that updates the TX stats when a buffer is fed to
DMA.

The initial 2.4 patch was posted to linux-mips@linux-mips.org by
Thomas Lange 21 Jan 2005.

Signed-off-by: Thomas Lange <thomas@corelatus.se>
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
18 years agoVadim Egorov: ext3 link/unlink race
Marcelo Tosatti [Fri, 12 May 2006 18:02:33 +0000 (15:02 -0300)]
Vadim Egorov: ext3 link/unlink race

I found this issue with 2.4.27 kernel but I believe that other versions
are affected too.

The problem happens when link and unlink are invoked simultaneously on
the same inode on ext3 filesystem. In this case ext3_unlink may
decrement i_nlink to 0 and put this inode into the in-memory orphan
list, while ext3_link will increment i_nlink back to 1 having the inode
in the orphan list.

Thus the system ends up having an inode with i_nlink == 1 in the orphan
list.

When this inode gets unused later it the memory might get released to
the free pool and then be used for some other purpose, most likely some
other inode.

From this point on any operation on the orphan list may result in
modification of the list_head that could alredy be used to store some
other date.

18 years agoMerge branch 'updates'
Willy TARREAU [Sun, 7 May 2006 21:54:44 +0000 (23:54 +0200)]
Merge branch 'updates'

18 years ago[PATCH] ide: trying to enable DMA may cause an oops
Willy TARREAU [Sun, 7 May 2006 21:48:50 +0000 (23:48 +0200)]
[PATCH] ide: trying to enable DMA may cause an oops

If DMA is disabled on the interface at boot time, then later calling
config_drive_for_dma() to try to enable it will cause an oops because
hwif->ide_dma_off_quietly will be NULL. The workaround is to make those
*ide_dma* functions point to a dummy one when DMA is disabled.

Originally reported by Glenn Wurster, and been running on my systems since
2.4.23.

Signed-off-by: Willy Tarreau <willy@w.ods.org>
- Willy

18 years ago[PATCH] drm: gcc complains that print_heap() in radeon_mem.c is not used.
Willy TARREAU [Sun, 7 May 2006 21:42:20 +0000 (23:42 +0200)]
[PATCH] drm: gcc complains that print_heap() in radeon_mem.c is not used.

print_heap() is declared static but not used anywhere. It could be removed,
but might be useful to someone for debugging purposes. Surrounding it with

Signed-off-by: Willy Tarreau <willy@w.ods.org>
- Willy

18 years ago[PATCH] netdrv: b44 driver must ignore carrier lost errors
Willy TARREAU [Sun, 7 May 2006 21:38:01 +0000 (23:38 +0200)]
[PATCH] netdrv: b44 driver must ignore carrier lost errors

some (?) hardware seems to be buggy and is reporting bogus carrier lost
values. Both reference implementations from Broadcom indicate that this
counter is not reliable and therefore ignore it. We should do the same.
"Fixes" the carrier lost problem i've seen.

Signed-off-by: Florian Schirmer <jolt@tuxbox.org>
Note: This patch was merged in 2.6 in early 2005.

Signed-off-by: Willy Tarreau <willy@w.ods.org>
- Willy

18 years ago[PATCH] netdrv: fix b44 loading after bcm4400
Willy TARREAU [Sun, 7 May 2006 21:33:09 +0000 (23:33 +0200)]
[PATCH] netdrv: fix b44 loading after bcm4400

From Pekka Pietikain :

This patch makes the b44-after-bcm4400 scenario work for me. What
was happening is that the broadcom driver sets a "power off MAC"
bit, and we didn't remove that when initializing the chip. Also
added some (a bit ugly, I know  ) logic to clear up the address
filter stuff, which is what recent broadcom drivers do...

This fix was merged in 2.6 late in 2004, but did not receive any
echo for 2.4. At least it made the b44 driver usable on an Asus
Pundit for me.

Signed-off-by: Willy Tarreau <willy@w.ods.org>
- Willy

18 years ago[PATCH] 3c59x: reload EEPROM values at rmmod for needy cards
Willy TARREAU [Sun, 7 May 2006 21:19:26 +0000 (23:19 +0200)]
[PATCH] 3c59x: reload EEPROM values at rmmod for needy cards

John W. Linville has posted this patch twice in the past, but it was merged
only in 2.6 and eventually got lost.

3c905 cards need an additional bit unmasked in the reset at rmmod or
else they don't get reinitialized properly when the driver is reloaded.
3c900 Boomerang added to list of devices needing EEPROM_RESET.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Willy Tarreau <willy@w.ods.org>
- Willy

18 years ago[PATCH] fix mem-leak in netfilter
Jesper Juhl [Sun, 7 May 2006 02:26:10 +0000 (04:26 +0200)]
[PATCH] fix mem-leak in netfilter

The Coverity checker spotted that we may leak 'hold' in
net/ipv4/netfilter/ipt_recent.c::checkentry() when the following
is true :
  if (!curr_table->status_proc) {
    ...
    if(!curr_table) {
    ...
      return 0;  <-- here we leak.
Simply moving an existing vfree(hold); up a bit avoids the possible leak.

(please keep me on CC when replying since I'm not subscribed
 to netfilter-devel)

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
18 years ago[PATCH] scripts : ver_linux does not report recent binutils version
Willy TARREAU [Sun, 7 May 2006 19:53:31 +0000 (21:53 +0200)]
[PATCH] scripts : ver_linux does not report recent binutils version

The 'ver_linux' script expects 'ld' to output a line starting with
'BFD', while recent versions of 'ld' print 'GNU ld'. The effect is
that binutils version is not listed in reports based on ver_linux.

The following trivial fix makes it do the right thing as 2.6 does.
Initially reported by Joshua Kwan. Tested and works.

Signed-off-by: Willy Tarreau <willy@w.ods.org>
- Willy

18 years ago[PATCH] block: remove the annoying 'blk: queue %p I/O limit %luMb' messages
Willy TARREAU [Sun, 7 May 2006 19:44:36 +0000 (21:44 +0200)]
[PATCH] block: remove the annoying 'blk: queue %p I/O limit %luMb' messages

This patch initially suggested by Matt Domsch seems to have got lost
in the noise. Its intent was to remove this annoying message that all
block devices print at boot. It was pure debugging and people still
take it for errors.

Signed-off-by: Willy Tarreau <willy@w.ods.org>
- Willy

18 years ago[PATCH] bonding: remove a warning with gcc 3
Willy TARREAU [Sun, 7 May 2006 19:35:47 +0000 (21:35 +0200)]
[PATCH] bonding: remove a warning with gcc 3

GCC 3 emits a warning on bond_alb:1278 because of a deprecated way
to cast a pointer in an assignment. This trivial fix silents it.

Signed-off-by: Willy Tarreau <willy@w.ods.org>
- Willy

18 years ago[PATCH] ext2: update inode ctime on rename()
Willy TARREAU [Sun, 7 May 2006 19:33:23 +0000 (21:33 +0200)]
[PATCH] ext2: update inode ctime on rename()

The ext2fs filesystem on 2.2 and 2.6, as well as other filesystems
on 2.4 update the inode ctime on rename(). When this fix was applied
to 2.2.13, it was applied to the ext3 tree at the same time, but the
ext2 tree was forgotten. It was recently fixed in 2.6, but 2.4 was
forgotten again. Here's the fix.

First reported by Chris Siebenmann on 10 Jan 2004 !

Signed-off-by: Willy Tarreau <willy@w.ods.org>
- Willy

18 years ago[PATCH] Neighbour Cache (ARP) State machine bug Fixed
Pradeep Vincent [Mon, 28 Nov 2005 11:57:00 +0000 (12:57 +0100)]
[PATCH] Neighbour Cache (ARP) State machine bug Fixed

In 2.4.21, arp code uses gc_timer to check for stale arp cache
entries. In 2.6, each entry has its own timer to check for stale arp
cache. 2.4.29 to 2.4.32 kernels (atleast) use neither of these timers.
This causes problems in environments where IPs or MACs are reassigned
- saw this problem on load balancing router based networks that use
VMACs. Tested this code on load balancing router based networks as
well as peer-linux systems.

Let me know if I need to contact someone else about this,

Thanks,

Pradeep Vincent

18 years ago[PATCH] smbfs chroot issue (CVE-2006-1864)
Olaf Kirch [Fri, 5 May 2006 01:40:41 +0000 (18:40 -0700)]
[PATCH] smbfs chroot issue (CVE-2006-1864)

Mark Moseley reported that a chroot environment on a SMB share can be
left via "cd ..\\".  Similar to CVE-2006-1863 issue with cifs, this fix
is for smbfs.

Steven French <sfrench@us.ibm.com> wrote:

Looks fine to me.  This should catch the slash on lookup or equivalent,
which will be all obvious paths of interest.

Back-ported to 2.4 by Willy Tarreau.
Signed-off-by: Willy Tarreau <willy@w.ods.org>
18 years ago[PATCH] fix /proc/partitions display with USB-FDD geometry
Willy TARREAU [Thu, 20 Apr 2006 09:08:08 +0000 (11:08 +0200)]
[PATCH] fix /proc/partitions display with USB-FDD geometry

When an USB flash disk is formatted under as a floppy (without partitions),
random partitions appear in /proc/partitions depending on the code and data
used by the boot loader at the offset where the partition table is expected :

   8     0     128000 sda
   8     1  985184692 sda1
   8     2  271759162 sda2
   8     3 1093808825 sda3
   8     4      26721 sda4

Such layout appears when Windows is used to format the USB stick, or when
putting a boot-loader such as syslinux on an device.

A patch was introduced in 2.6 to fix this by ensuring that all 4 partitions
boot flags are either 0x00 or 0x80 before interpreting the boot sector as an
MBR.

This fix has been back-ported to 2.4 by Gilles Espinasse. The behaviour has
been carefully tested, and 2.4.32 with this patch now behaves as 2.6.16 in
that such USB sticks are correctly detected without partitions, while others
still work correctly :

   8     0     128000 sda   => 128 MB USB stick formatted under windows
   8     0     261216 sdb   => 256 MB USB stick which contains a real partition
   8     1     261040 sdb1

18 years agoMerge branch 'origin'
Willy TARREAU [Sun, 7 May 2006 07:23:35 +0000 (09:23 +0200)]
Merge branch 'origin'

18 years agoContact information update
Marcelo Tosatti [Thu, 4 May 2006 22:54:22 +0000 (19:54 -0300)]
Contact information update

18 years agoFix printk length modifier of NFS mmap consistency patch
Marcelo Tosatti [Mon, 1 May 2006 05:57:54 +0000 (02:57 -0300)]
Fix printk length modifier of NFS mmap consistency patch

18 years agoChange VERSION to v2.4.33-pre3
Marcelo Tosatti [Sun, 30 Apr 2006 17:41:33 +0000 (14:41 -0300)]
Change VERSION to v2.4.33-pre3

18 years ago[PATCH] via-rhine: zero pad short packets on Rhine I ethernet cards
Craig Brind [Mon, 24 Apr 2006 21:35:41 +0000 (23:35 +0200)]
[PATCH] via-rhine: zero pad short packets on Rhine I ethernet cards

Fixes Rhine I cards disclosing fragments of previously transmitted
frames in new transmissions.

Before transmission, any socket buffer (skb) shorter than the ethernet
minimum length of 60 bytes was zero-padded. On Rhine I cards the data
can later be copied into an aligned transmission buffer without copying
this padding. This resulted in the transmission of the frame with the
extra bytes beyond the provided content leaking the previous contents of
this buffer on to the network.

Now zero-padding is repeated in the local aligned buffer if one is used.

Following a suggestion from the via-rhine maintainer, no attempt is made
here to avoid the duplicated effort of padding the skb if it is known
that an aligned buffer will definitely be used. This is to make the
change "obviously correct" and allow it to be applied to a stable kernel
if necessary. There is no change to the flow of control and the changes
are only to the Rhine I code path.

Signed-off-by: Craig Brind <craigbrind@gmail.com>
Signed-off-by: Roger Luethi <rl@hellgate.ch>
18 years ago[PATCH] i386/x86-64: Fix x87 information leak between processes
Andi Kleen [Wed, 19 Apr 2006 08:22:07 +0000 (10:22 +0200)]
[PATCH] i386/x86-64: Fix x87 information leak between processes

AMD K7/K8 CPUs only save/restore the FOP/FIP/FDP x87 registers in FXSAVE
when an exception is pending.  This means the value leak through
context switches and allow processes to observe some x87 instruction
state of other processes.

This was actually documented by AMD, but nobody recognized it as
being different from Intel before.

The fix first adds an optimization: instead of unconditionally
calling FNCLEX after each FXSAVE test if ES is pending and skip
it when not needed. Then do a dummy x87 load to clear FOP/FIP/FDP.
This means other processes always will only see a constant value
defined by the kernel.

Then it does a ffree st(7) ; fild <l1 address>
This is executed unconditionally on FXSAVE capable systems, but has
been benchmarked on Intel systems to be reasonably fast.

I also had to move unlazy_fpu for 64bit to make sure the code
always executes with the data segment of the new process to prevent
leaking the old one.

Patch for both i386/x86-64.

The problem was discovered originally by Jan Beulich. Richard
Brunner provided the basic code for the workarounds with contributions
from Jan.

This is CVE-2006-1056

Signed-off-by: Andi Kleen <ak@suse.de>
18 years ago[PATCH] fix shm mprotect (CVE-2006-1524)
Hugh Dickins [Tue, 25 Apr 2006 19:05:59 +0000 (20:05 +0100)]
[PATCH] fix shm mprotect (CVE-2006-1524)

shmat stop mprotect from giving write permission to a readonly attachment.

Signed-off-by: Hugh Dickins <hugh@veritas.com>