All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Send quota messages via netlink
Date: Wed, 29 Aug 2007 12:03:13 +0200	[thread overview]
Message-ID: <20070829100313.GA7814@duck.suse.cz> (raw)
In-Reply-To: <20070828215128.d8147a43.akpm@linux-foundation.org>

On Tue 28-08-07 21:51:28, Andrew Morton wrote:
> On Tue, 28 Aug 2007 16:13:18 +0200 Jan Kara <jack@suse.cz> wrote:
> 
> > +static void send_warning(const struct dquot *dquot, const char warntype)
> > +{
> > +	static unsigned long seq;
> > +	struct sk_buff *skb;
> > +	void *msg_head;
> > +	int ret;
> > +
> > +	skb = genlmsg_new(QUOTA_NL_MSG_SIZE, GFP_NOFS);
> > +	if (!skb) {
> > +		printk(KERN_ERR
> > +		  "VFS: Not enough memory to send quota warning.\n");
> > +		return;
> > +	}
> > +	msg_head = genlmsg_put(skb, 0, seq++, &quota_genl_family, 0, QUOTA_NL_C_WARNING);
> 
> The access to seq is racy, isn't it?
> 
> If so, that can be solved with a lock, or with atomic_add_return().
  You're right. I've made atomic_t from seq. Thanks for spotting this.

										Honza
-- 
Jan Kara <jack@suse.cz>
SuSE CR Labs

  reply	other threads:[~2007-08-29  9:44 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-28 14:13 [PATCH] Send quota messages via netlink Jan Kara
2007-08-29  4:13 ` Andrew Morton
2007-08-29  4:54   ` David Miller
2007-08-29  5:41   ` Eric W. Biederman
     [not found]   ` <20070828211335.37fce4c9.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2007-08-29  6:30     ` Balbir Singh
2007-08-29  6:30       ` Balbir Singh
2007-08-29 12:46       ` Jan Kara
2007-08-31  6:59         ` Balbir Singh
2007-09-03 10:18           ` Jan Kara
2007-08-29 12:26   ` Jan Kara
2007-08-29 15:57     ` Randy Dunlap
2007-08-29 18:31     ` Eric W. Biederman
     [not found]       ` <m1mywa42g7.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
2007-08-29 19:26         ` Jan Kara
2007-08-29 19:26           ` Jan Kara
2007-08-29 21:06           ` Eric W. Biederman
2007-08-29 21:19             ` Valdis.Kletnieks
2007-08-29 21:19               ` Valdis.Kletnieks
2007-08-30  9:25             ` Jan Kara
2007-08-30 17:33               ` Eric W. Biederman
2007-08-30 18:54                 ` Serge E. Hallyn
2007-08-30 19:18                 ` Serge E. Hallyn
2007-08-30 19:10               ` Serge E. Hallyn
2007-08-30 22:18                 ` Jan Kara
2007-08-30 22:14                   ` Serge E. Hallyn
2007-09-03 14:21                     ` Jan Kara
2007-09-04 21:32                       ` Serge E. Hallyn
2007-09-04 22:49                         ` Jan Kara
2007-09-04 23:48                           ` Serge E. Hallyn
2007-09-05 13:32                             ` Jan Kara
2007-09-05 14:28                               ` Serge E. Hallyn
2007-08-29  4:51 ` Andrew Morton
2007-08-29 10:03   ` Jan Kara [this message]
2007-09-03 14:43   ` Jan Kara
2007-09-03 17:12     ` Randy Dunlap
2007-09-03 17:48       ` Jan Kara
2007-09-03 18:41         ` Andrew Morton

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=20070829100313.GA7814@duck.suse.cz \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.