All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan <alan@lxorguk.ukuu.org.uk>
To: netdev@vger.kernel.org, sjur.brandeland@stericsson.com
Subject: CAIF device
Date: Thu, 1 Apr 2010 16:09:16 +0100	[thread overview]
Message-ID: <20100401160916.2a2574f4@lxorguk.ukuu.org.uk> (raw)

I was reading through the CAIF code and I noticed a couple of bugs

Doesn't check there is a write method so set on a read only
device it's not good news (doubly so as there seem to be no
permission checks ?) plus no permissions checks and also the
following which looks unsafe

        dev_close(ser->dev);
        unregister_netdevice(ser->dev);
        list_del(&ser->node);
        debugfs_deinit(ser);

Now ser is the netdev private data so what stops it going away when
unregister_netdev is called ?

Secondly tty devices are ref counted and this for some reason didn't get
fixed in the driver yet.

[Patches to follow for the write and kref bugs, the others need the
authors and someone who knows the netdev code these days to fix]

             reply	other threads:[~2010-04-01 15:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-01 15:09 Alan [this message]
2010-04-05 11:19 ` CAIF device Sjur BRENDELAND
2010-04-07 13:13   ` [PATCH] Caif: Ref counting Alan Cox
2010-04-07 23:50     ` David Miller
2010-04-07 13:17   ` [PATCH] CAIF: write check Alan Cox
2010-04-07 23:49     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100401160916.2a2574f4@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=sjur.brandeland@stericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.