2.4.36-stable kernel tree
Revision | af89f1683cee628ed8f81c42c2d96ecb9d50c2c8 (tree) |
---|---|
Zeit | 2007-11-12 02:43:16 |
Autor | Willy Tarreau <w@1wt....> |
Commiter | Willy Tarreau |
[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>
@@ -257,6 +257,9 @@ static int arp_seq_open(struct inode *inode, struct file *file) | ||
257 | 257 | struct seq_file *seq; |
258 | 258 | int rc = -EAGAIN; |
259 | 259 | |
260 | + if (!clip_tbl_hook) | |
261 | + goto out; | |
262 | + | |
260 | 263 | state = kmalloc(sizeof(*state), GFP_KERNEL); |
261 | 264 | if (!state) { |
262 | 265 | rc = -ENOMEM; |