2.1.74 Patches (coredumping, ide-probe, ide-proc, ipfw, ksyms)

Jani Hakala (jahakala@cc.jyu.fi)
Sat, 20 Dec 1997 08:42:11 +0200


--TB36FDmn/VVEgNH/
Content-Type: text/plain; charset=us-ascii

Could somebody verify if these patches are (still) ok ?

Fix for bad core dumps (for 2.0.72 by Andreas Schwab ... seems to be
ok for 2.1.7[34])
linux/fs/binfmt_elf.c
linux/include/linux/elfcore.h

This just looked ugly:
linux/net/ipv4/ip_forward.c

Fix for an oops when trying to do something like
'cat /proc/ide/ide0/hda/capacity' when no ide-driver was loaded.
linux/drivers/block/ide-proc.c

ide.c needs the max_readahead symbol, but this isn't exported
ide-probe.c uses the ideprobe_init routine before it is declared
(for 2.1.73 by Henrik Storner)
linux/kernel/ksyms.c
linux/drivers/block/ide-probe.c
--TB36FDmn/VVEgNH/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="2.1.74-fixes.diff"

--- linux/fs/binfmt_elf.c.fix74 Mon Dec 1 20:34:11 1997
+++ linux/fs/binfmt_elf.c Sat Dec 20 05:55:17 1997
@@ -1150,8 +1150,8 @@
notes[0].datasz = sizeof(prstatus);
notes[0].data = &prstatus;
prstatus.pr_info.si_signo = prstatus.pr_cursig = signr;
- prstatus.pr_sigpend = current->signal;
- prstatus.pr_sighold = current->blocked;
+ prstatus.pr_sigpend = current->signal.sig[0];
+ prstatus.pr_sighold = current->blocked.sig[0];
psinfo.pr_pid = prstatus.pr_pid = current->pid;
psinfo.pr_ppid = prstatus.pr_ppid = current->p_pptr->pid;
psinfo.pr_pgrp = prstatus.pr_pgrp = current->pgrp;
--- linux/kernel/ksyms.c.fix74 Wed Dec 17 21:11:17 1997
+++ linux/kernel/ksyms.c Sat Dec 20 05:55:17 1997
@@ -241,6 +241,7 @@
EXPORT_SYMBOL(efind_buffer);
EXPORT_SYMBOL(init_buffer);
EXPORT_SYMBOL(max_sectors);
+EXPORT_SYMBOL(max_readahead);

/* tty routines */
EXPORT_SYMBOL(tty_hangup);
--- linux/include/linux/elfcore.h.fix74 Wed Dec 10 21:40:14 1997
+++ linux/include/linux/elfcore.h Sat Dec 20 05:55:17 1997
@@ -41,8 +41,8 @@
#endif
struct elf_siginfo pr_info; /* Info associated with signal */
short pr_cursig; /* Current signal */
- sigset_t pr_sigpend; /* Set of pending signals */
- sigset_t pr_sighold; /* Set of held signals */
+ unsigned long pr_sigpend; /* Set of pending signals */
+ unsigned long pr_sighold; /* Set of held signals */
#if 0
struct sigaltstack pr_altstack; /* Alternate stack info */
struct sigaction pr_action; /* Signal action for current sig */
--- linux/net/ipv4/ip_forward.c.fix74 Wed Dec 10 19:45:16 1997
+++ linux/net/ipv4/ip_forward.c Sat Dec 20 05:55:17 1997
@@ -184,7 +184,7 @@
{
#endif
maddr = inet_select_addr(dev2, rt->rt_gateway, RT_SCOPE_UNIVERSE);
- if (fw_res = ip_fw_masq_icmp(&skb, maddr) < 0) {
+ if ((fw_res = ip_fw_masq_icmp(&skb, maddr)) < 0) {
kfree_skb(skb, FREE_READ);
return -1;
}
--- linux/drivers/block/ide-probe.c.fix74 Wed Dec 17 21:11:16 1997
+++ linux/drivers/block/ide-probe.c Sat Dec 20 05:55:17 1997
@@ -674,6 +674,10 @@
return hwif->present;
}

+
+int ideprobe_init(void);
+
+
static ide_module_t ideprobe_module = {
IDE_PROBE_MODULE,
ideprobe_init,
--- linux/drivers/block/ide-proc.c.fix74 Sat Dec 20 06:48:55 1997
+++ linux/drivers/block/ide-proc.c Sat Dec 20 07:50:55 1997
@@ -329,9 +329,13 @@
(char *page, char **start, off_t off, int count, int *eof, void *data)
{
ide_drive_t *drive = (ide_drive_t *) data;
+ ide_driver_t *driver = (ide_driver_t *) drive->driver;
int len;

- len = sprintf(page,"%li\n", ((ide_driver_t *)drive->driver)->capacity(drive));
+ if (!driver)
+ len = sprintf(page, "(none)\n");
+ else
+ len = sprintf(page,"%li\n", ((ide_driver_t *)drive->driver)->capacity(drive));
PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
}

--TB36FDmn/VVEgNH/--