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] [day] [month] [year] [list]
Message-ID: <1368841597-8mnfve1j-mutt-n-horiguchi@ah.jp.nec.com>
Date:	Fri, 17 May 2013 21:46:37 -0400
From:	Naoya Horiguchi <n-horiguchi@...jp.nec.com>
To:	KOSAKI Motohiro <kosaki.motohiro@...il.com>
Cc:	Borislav Petkov <bp@...en8.de>,
	lkml <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org
Subject: Re: [PATCH] ipc/shm.c: don't use auto variable hs in newseg()

On Fri, May 17, 2013 at 04:31:52PM -0400, KOSAKI Motohiro wrote:
> > From: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
> > Date: Wed, 8 May 2013 11:48:01 -0400
> > Subject: [PATCH] ipc/shm.c: don't use auto variable hs in newseg()
> > 
> > This patch fixes "warning: unused variable 'hs'" when !CONFIG_HUGETLB_PAGE
> > introduced by commit af73e4d9506d "hugetlbfs: fix mmap failure in unaligned
> > size request".
> > 
> > Reported-by: Borislav Petkov <bp@...en8.de>
> > Signed-off-by: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
> > ---
> >  ipc/shm.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> > 
> > diff --git a/ipc/shm.c b/ipc/shm.c
> > index e316cb9..9ff741a 100644
> > --- a/ipc/shm.c
> > +++ b/ipc/shm.c
> > @@ -491,9 +491,8 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
> >  
> >  	sprintf (name, "SYSV%08x", key);
> >  	if (shmflg & SHM_HUGETLB) {
> > -		struct hstate *hs = hstate_sizelog((shmflg >> SHM_HUGE_SHIFT)
> > -						& SHM_HUGE_MASK);
> > -		size_t hugesize = ALIGN(size, huge_page_size(hs));
> > +		size_t hugesize = ALIGN(size, huge_page_size(hstate_sizelog(
> > +				(shmflg >> SHM_HUGE_SHIFT) & SHM_HUGE_MASK)));
> 
> NAK. This is uglier than before.
> You should change !CONFIG_HUGETLB_PAGE specific code instead.

This patch was dropped and replaced with Li Zefan's one which is
available in current upstream.

  commit 091d0d55b286c9340201b4ed4470be87fc568228
  Author: Li Zefan <lizefan@...wei.com>
  Date:   Thu May 9 15:08:15 2013 +0800

Thanks,
Naoya Horiguchi
--
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