Re: [PATCH] f_op->poll() without lock_kernel()

From: David S. Miller (davem@redhat.com)
Date: Fri Apr 21 2000 - 15:36:54 EST


   Date: Fri, 21 Apr 2000 20:42:54 +0100 (BST)
   From: Alan Cox <alan@lxorguk.ukuu.org.uk>

   This is not a good idea if we are trying to stabilise 2.4.

I completely disagree.

   I for one am not in favour of making further changes now that
   require we reaudit every damned block and char device again. Which
   btw is what your change requires. Do this after 2.4. Yes its a
   contention issue, no its not as trivial as your little fix implies

If a poll method breaks due to removal of the kernel lock, we'd
better find out now. Nearly all of these methods report poll
status based upon state which is changed by asynchronous events,
which means they must already have some other method of synchronizing
things.

If it _really_ bothers you Alan, here is a full list of every POLL
method in the kernel as of right now, go through this list and add
the {un,}lock_kernel calls as you see fit.

drivers/char/bttv.c:static unsigned int vbi_poll(struct video_device *dev, struct file *file,
drivers/char/busmouse.c:static unsigned int busmouse_poll(struct file *file, poll_table *wait)
drivers/char/dsp56k.c:static unsigned int dsp56k_poll(struct file *file, poll_table *wait)
drivers/char/dtlk.c:static unsigned int dtlk_poll(struct file *file, poll_table * wait)
drivers/char/tty_io.c:static unsigned int hung_up_tty_poll(struct file * filp, poll_table * wait)
drivers/char/tty_io.c:static unsigned int tty_poll(struct file * filp, poll_table * wait)
drivers/char/n_hdlc.c:static unsigned int n_hdlc_tty_poll (struct tty_struct *tty,
drivers/char/n_tty.c:static unsigned int normal_poll(struct tty_struct * tty, struct file * file, poll_table *wait)
drivers/char/ppdev.c:static unsigned int pp_poll (struct file * file, poll_table * wait)
drivers/char/pc110pad.c:static unsigned int pad_poll(struct file *file, poll_table * wait)
drivers/char/pc_keyb.c:static unsigned int aux_poll(struct file *file, poll_table * wait)
drivers/char/random.c:random_poll(struct file *file, poll_table * wait)
drivers/char/rtc.c:static unsigned int rtc_poll(struct file *file, poll_table *wait)
drivers/char/videodev.c:static unsigned int video_poll(struct file *file, poll_table * wait)
drivers/char/joystick/joystick.c:static unsigned int js_poll(struct file *file, poll_table *wait)
drivers/char/n_r3964.c:static unsigned int r3964_poll(struct tty_struct * tty, struct file * file,
drivers/char/drm/fops.c:unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait)
drivers/char/zr36120.c:unsigned int zoran_poll(struct video_device *dev, struct file *file, poll_table *wait)
drivers/char/zr36120.c:unsigned int vbi_poll(struct video_device *dev, struct file *file, poll_table *wait)
drivers/isdn/isdn_common.c:isdn_poll(struct file *file, poll_table * wait)
drivers/isdn/isdn_ppp.c:isdn_ppp_poll(struct file *file, poll_table * wait)
drivers/isdn/hysdn/hysdn_procfs.c:hysdn_log_poll(struct file *file, poll_table * wait)
drivers/isdn/hysdn/hysdn_proclog.c:hysdn_log_poll(struct file *file, poll_table * wait)
drivers/isdn/avmb1/capi.c:capi_poll(struct file *file, poll_table * wait)
drivers/isdn/avmb1/capi.c:capinc_raw_poll(struct file *file, poll_table * wait)
drivers/isdn/divert/divert_procfs.c:isdn_divert_poll(struct file *file, poll_table * wait)
drivers/net/wan/cosa.c:static unsigned int cosa_poll(struct file *file, poll_table *poll)
drivers/net/ppp_async.c:ppp_asynctty_poll(struct tty_struct *tty, struct file *file, poll_table *wait)
drivers/net/ppp_generic.c:static unsigned int ppp_poll(struct file *file, poll_table *wait)
drivers/net/ppp_generic.c:ppp_channel_poll(struct ppp_channel *chan, struct file *file, poll_table *wait)
drivers/net/ppp_synctty.c:ppp_sync_poll(struct tty_struct *tty, struct file *file, poll_table *wait)
drivers/pnp/isapnp_proc.c:static unsigned int isapnp_info_entry_poll(struct file *file, poll_table * wait)
drivers/sbus/audio/audio.c:static unsigned int sparcaudio_poll(struct file *file, poll_table * wait)
drivers/sbus/char/pcikbd.c:static unsigned int aux_poll(struct file *file, poll_table * wait)
drivers/sbus/char/sunkbd.c:static unsigned int kbd_poll (struct file *f, poll_table *wait)
drivers/sbus/char/sunmouse.c:static unsigned int sun_mouse_poll(struct file *file, poll_table *wait)
drivers/scsi/sg.c:static unsigned int sg_poll(struct file * filp, poll_table * wait)
drivers/sgi/char/ds1286.c:static unsigned int ds1286_poll(struct file *file, poll_table *wait)
drivers/sgi/char/shmiq.c:shmiq_qcntl_poll (struct file *filp, poll_table *wait)
drivers/sgi/char/usema.c:sgi_usemaclone_poll(struct file *filp, poll_table *wait)
drivers/sound/dmabuf.c:unsigned int DMAbuf_poll(struct file * file, int dev, poll_table *wait)
drivers/sound/i810_audio.c:static unsigned int i810_poll(struct file *file, struct poll_table_struct *wait)
drivers/sound/maestro.c:static unsigned int ess_poll(struct file *file, struct poll_table_struct *wait)
drivers/sound/es1370.c:static unsigned int es1370_poll(struct file *file, struct poll_table_struct *wait)
drivers/sound/es1370.c:static unsigned int es1370_poll_dac(struct file *file, struct poll_table_struct *wait)
drivers/sound/es1370.c:static unsigned int es1370_midi_poll(struct file *file, struct poll_table_struct *wait)
drivers/sound/es1371.c:static unsigned int es1371_poll(struct file *file, struct poll_table_struct *wait)
drivers/sound/es1371.c:static unsigned int es1371_poll_dac(struct file *file, struct poll_table_struct *wait)
drivers/sound/es1371.c:static unsigned int es1371_midi_poll(struct file *file, struct poll_table_struct *wait)
drivers/sound/midibuf.c:unsigned int MIDIbuf_poll(int dev, struct file *file, poll_table * wait)
drivers/sound/sequencer.c:unsigned int sequencer_poll(int dev, struct file *file, poll_table * wait)
drivers/sound/soundcard.c:static unsigned int sound_poll(struct file *file, poll_table * wait)
drivers/sound/sonicvibes.c:static unsigned int sv_poll(struct file *file, struct poll_table_struct *wait)
drivers/sound/sonicvibes.c:static unsigned int sv_midi_poll(struct file *file, struct poll_table_struct *wait)
drivers/sound/trident.c:static unsigned int trident_poll(struct file *file, struct poll_table_struct *wait)
drivers/sound/esssolo1.c:static unsigned int solo1_poll(struct file *file, struct poll_table_struct *wait)
drivers/sound/esssolo1.c:static unsigned int solo1_midi_poll(struct file *file, struct poll_table_struct *wait)
drivers/sound/cmpci.c:static unsigned int cm_poll(struct file *file, struct poll_table_struct *wait)
drivers/sound/cmpci.c:static unsigned int cm_midi_poll(struct file *file, struct poll_table_struct *wait)
drivers/sound/vwsnd.c:static unsigned int vwsnd_audio_poll(struct file *file,
drivers/usb/audio.c:static unsigned int usb_audio_poll(struct file *file, struct poll_table_struct *wait)
drivers/usb/mousedev.c:static unsigned int mousedev_poll(struct file *file, poll_table *wait)
drivers/usb/devio.c:static unsigned int usbdev_poll(struct file *file, struct poll_table_struct *wait)
drivers/usb/printer.c:static unsigned int usblp_poll(struct file *file, struct poll_table_struct *wait)
drivers/usb/joydev.c:static unsigned int joydev_poll(struct file *file, poll_table *wait)
drivers/usb/evdev.c:static unsigned int evdev_poll(struct file *file, poll_table *wait)
drivers/usb/devices.c:static unsigned int usb_device_poll(struct file *file, struct poll_table_struct *wait)
drivers/usb/serial/keyspan_pda.c: n_tty.c:normal_poll() ) that we're not writeable. */
drivers/pcmcia/ds.c:static u_int ds_poll(struct file *file, poll_table *wait)
drivers/telephony/ixj.c:static unsigned int ixj_poll(struct file *file_p, poll_table * wait)
drivers/ieee1394/pcilynx.c:static unsigned int aux_poll(struct file *file, poll_table *pt)
drivers/ieee1394/raw1394.c:static unsigned int dev_poll(struct file *file, poll_table *pt)
fs/pipe.c:pipe_poll(struct file *filp, poll_table *wait)
fs/coda/psdev.c:static unsigned int coda_psdev_poll(struct file *file, poll_table * wait)
fs/proc/kmsg.c:static unsigned int kmsg_poll(struct file *file, poll_table * wait)
net/socket.c:static unsigned int sock_poll(struct file *file, poll_table * wait)
net/core/datagram.c:unsigned int datagram_poll(struct file * file, struct socket *sock, poll_table *wait)
net/core/sock.c:unsigned int sock_no_poll(struct file * file, struct socket *sock, poll_table *pt)
net/decnet/af_decnet.c:static unsigned int dn_poll(struct file *file, struct socket *sock, poll_table *wait)
net/ipv4/tcp.c:static __inline__ unsigned int tcp_listen_poll(struct sock *sk, poll_table *wait)
net/ipv4/tcp.c:unsigned int tcp_poll(struct file * file, struct socket *sock, poll_table *wait)
net/ipx/af_spx.c:static unsigned int spx_datagram_poll(struct file * file, struct socket *sock, poll_table *wait)
net/irda/af_irda.c:static unsigned int irda_poll(struct file * file, struct socket *sock,
net/irda/irmod.c:static u_int irda_poll(struct file *file, poll_table *wait)
net/netlink/netlink_dev.c:static unsigned int netlink_poll(struct file *file, poll_table * wait)
net/packet/af_packet.c:#define packet_poll datagram_poll
net/packet/af_packet.c:unsigned int packet_poll(struct file * file, struct socket *sock, poll_table *wait)
net/unix/af_unix.c:static unsigned int unix_poll(struct file * file, struct socket *sock, poll_table *wait)
net/atm/common.c:unsigned int atm_poll(struct file *file,struct socket *sock,poll_table *wait)

-
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/



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:19 EST