Subject : NULL pointer derefence since 2.6.27 in (e)poll Submitter : "Ben Castricum" <lk0810@bencastricum.nl> Date : 2008-10-19 11:02 References : http://marc.info/?l=linux-kernel&m=122441506419398&w=4 Handled-By : Davide Libenzi <davidel@xmailserver.org> Patch : http://marc.info/?l=linux-kernel&m=122428548613067&w=2 This entry is being used for tracking a regression from 2.6.26. Please don't close it until the problem is fixed in the mainline.
static unsigned int sock_poll(struct file *file, poll_table *wait) { struct socket *sock; /* * We can't return errors to poll, so it's either yes or no. */ sock = file->private_data; return sock->ops->poll(file, sock, wait); } sock->ops is NULL
A patch has already been sent to Andrew: http://lkml.org/lkml/2008/10/17/491
I've been running the patch for some time now and the bug hasn't appeared anymore. The patch seems to fix it.
References : http://www.kerneloops.org/searchweek.php?search=ep_poll_callback
Fixed by: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9ce209d64d820a6d5ed6b952e2c0f917faad6031