• R/O
  • HTTP
  • SSH
  • HTTPS

linux-2.4.36: Commit

2.4.36-stable kernel tree


Commit MetaInfo

Revisionaf89f1683cee628ed8f81c42c2d96ecb9d50c2c8 (tree)
Zeit2007-11-12 02:43:16
AutorWilly Tarreau <w@1wt....>
CommiterWilly Tarreau

Log Message

[PATCH] ATM: avoid kernel panic upon access to /proc/net/atm/arp

Gilles Espinasse reported that if one user tried to read
/proc/net/atm/arp with the atm.o module loaded but without
clip.o, then the kernel would panic.

This is caused by a neighbour table which is NULL when the
CLIP module is not loaded. 2.6 has fixed this by managing
the "arp" entry within clip.o. Here, a less intrusive workaround
consists in returning -EAGAIN to open() if CLIP is not loaded.

Signed-off-by: Willy Tarreau <w@1wt.eu>

Ändern Zusammenfassung

Diff

--- a/net/atm/proc.c
+++ b/net/atm/proc.c
@@ -257,6 +257,9 @@ static int arp_seq_open(struct inode *inode, struct file *file)
257257 struct seq_file *seq;
258258 int rc = -EAGAIN;
259259
260+ if (!clip_tbl_hook)
261+ goto out;
262+
260263 state = kmalloc(sizeof(*state), GFP_KERNEL);
261264 if (!state) {
262265 rc = -ENOMEM;
Show on old repository browser