lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 27 Jan 2011 17:48:01 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Sunil Mushran <sunil.mushran@...cle.com>
Cc:	dsterba@...e.cz, mfasheh@...e.com, linux-kernel@...r.kernel.org,
	ocfs2-devel@....oracle.com
Subject: Re: [Ocfs2-devel] fs/ocfs2/dlm: Use GFP_ATOMIC under spin_lock

On Thu, 27 Jan 2011 17:28:53 -0800 Sunil Mushran <sunil.mushran@...cle.com> wrote:

> >   	return status;
> >   }
> >
> > @@ -1077,6 +1069,7 @@ static int dlm_query_region_handler(stru
> >   	struct dlm_ctxt *dlm = NULL;
> >   	int status = 0;
> >   	int locked = 0;
> > +	static u8 local[sizeof(qr->qr_regions)]; /* locked by dlm_domain_lock */
> >
> >   	qr = (struct dlm_query_region *) msg->buf;
> >
> > @@ -1112,7 +1105,7 @@ static int dlm_query_region_handler(stru
> >   		goto bail;
> >   	}
> >
> > -	status = dlm_match_regions(dlm, qr);
> > +	status = dlm_match_regions(dlm, qr, local);
> >
> >   bail:
> >   	if (locked)
> 
> That sizeof() is 1K. It maybe better if we moved the kmalloc() here.

That would work too.  As it's only called at mount time, the
speed/space tradeoff favours kmalloc().

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ