From: Andrew Morton <akpm@linux-foundation.org>
To: David Altobelli <david.altobelli@hp.com>
Cc: linux-kernel@vger.kernel.org, greg@kroah.com, tony.camuso@hp.com
Subject: Re: [PATCH][v5] HP iLO driver
Date: Wed, 9 Jul 2008 18:18:57 -0700 [thread overview]
Message-ID: <20080709181857.4a38b920.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080702153853.GA18049@ldl.fc.hp.com>
On Wed, 2 Jul 2008 09:38:53 -0600 David Altobelli <david.altobelli@hp.com> wrote:
> A driver for the HP iLO/iLO2 management processor, which allows userspace
> programs to query the management processor. Programs can open a channel
> to the device (/dev/hpilo/dXccbN), and use this to send/receive queries.
> The O_EXCL open flag is used to indicate that a particular channel cannot
> be shared between processes. This driver will replace various packages
> HP has shipped, including hprsm and hp-ilo.
>
> v4 -> v5
> Converted more macros to inline functions
> Reorganized to remove kzalloc under spinlock
>
> v3 -> v4
> Removed an upper case variable and some extra parens
> Converted some macros to inline functions
>
> v2 -> v3
> Moved code from drivers/char to drivers/misc
>
> v1 -> v2
> Changed device path to /dev/hpilo/dXccbN.
> Removed a volatile from fifobar variable.
> Changed ILO_NAME to remove spaces.
>
>
> ...
>
> +static ssize_t ilo_write(struct file *fp, const char __user *buf,
> + size_t len, loff_t *off)
> +{
> + int err, pkt_id, pkt_len;
> + struct ccb_data *data;
> + struct ccb *driver_ccb;
> + struct ilo_hwinfo *hw;
> + void *pkt;
> +
> + data = fp->private_data;
> + driver_ccb = &data->driver_ccb;
> + hw = data->ilo_hw;
> +
> + if (is_device_reset(hw) || is_channel_reset(driver_ccb)) {
> + /*
> + * If the device has been reset, applications
> + * need to close and reopen all ccbs.
> + */
> + ilo_reset(hw);
> + return -ENODEV;
> + }
Can multiple processes open and write to this "device"? If so, the above
looks awfully racy. Perhaps vfs-level i_mutex coverage will save us on the
write-versus-write side, but not on write-versus-read.
next prev parent reply other threads:[~2008-07-10 1:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-02 15:38 David Altobelli
2008-07-08 14:41 ` Pavel Machek
2008-07-10 1:18 ` Andrew Morton [this message]
2008-07-10 15:46 ` Altobelli, David
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=20080709181857.4a38b920.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=david.altobelli@hp.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.camuso@hp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®