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:   Wed, 19 Apr 2017 14:14:36 +0000
From:   "Mintz, Yuval" <Yuval.Mintz@...ium.com>
To:     Lance Richardson <lrichard@...hat.com>,
        "Kalluru, Sudarsana" <Sudarsana.Kalluru@...ium.com>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH net 3/4] qed: Fix possible system hang in the
 dcbnl-getdcbx() path.

> > qed_dcbnl_get_dcbx() API uses kmalloc in GFT_KERNEL mode. The API gets
> > invoked in the interrupt context by qed_dcbnl_getdcbx callback. Need
> > to invoke this kmalloc in atomic mode.
> >
> > Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@...ium.com>
> > Signed-off-by: Yuval Mintz <Yuval.Mintz@...ium.com>
> > ---
> >  drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
> > b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
> > index ff058a3..8f0783a 100644
> > --- a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
> > +++ b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
> > @@ -1264,7 +1264,7 @@ static struct qed_dcbx_get
> > *qed_dcbnl_get_dcbx(struct qed_hwfn *hwfn,  {
> >  	struct qed_dcbx_get *dcbx_info;
> >
> > -	dcbx_info = kzalloc(sizeof(*dcbx_info), GFP_KERNEL);
> > +	dcbx_info = kmalloc(sizeof(*dcbx_info), GFP_ATOMIC);
> 
> You are changing a kzalloc to kmalloc, was that intentional?

Not really. Apparently the confusion resulted from the fact that
immediately after the next condition we're memsetting dcbx_info
to zero [so current code zeros the memory twice], which also
means there's no functional problem with this change.

Dave, do you want us to re-spin this [even though change isn't
functionally broken]?
Notice this is a recurrent pattern, so in future we'd have to send
a cleanup for these kind of stuff, regardless of whether we re-spin
now or not.

> 
> >  	if (!dcbx_info)
> >  		return NULL;
> >
> > --
> > 1.8.3.1
> >
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ