lkml.org 
[lkml]   [2000]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.3.41: kmalloc: Size (33554432) too large.
Hi Patrick,

You wrote:

+ fds = (struct pollfd **)kmalloc(nfds * sizeof(struct pollfd *),
GFP_KERNEL);

You knew that I put that calculation in and yet didn't even bother cc'me
in your mail. If you did, I would have told you in private that your
patch is completely wrong.

Why is it wrong? Let's assume we have nfds=1024, then since sizeof(struct
pollfd) = 8 we need 8192 bytes i.e. 2 pages to store all struct pollfd.
This means two full "chunks", fds[0] and fds[1] (nchunks=1), i.e. just two
pointers. And how many pointers does your patch allocate? It allocates
1024 pointers, quite a lot more than needed, no wonder it works for you :)

Anyway, I will have a look at what's going on here as soon as I get a
chance. Can you supply a bit more info, e.g. are sure it is done on 1024
descriptors? Can you duplicate the problem with a simple testcase instead
of squid? (strace'ing the squid may give enough hints as to what
arguments to pass to poll(2) to trigger the bug)

Regards,
------
Tigran A. Aivazian | http://www.sco.com
Escalations Research Group | tel: +44-(0)1923-813796
Santa Cruz Operation Ltd | http://www.ocston.org/~tigran






-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.036 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site