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]
Date:	Mon, 8 Sep 2008 10:21:11 -0700
From:	masouds@...gle.com (Masoud Sharbiani)
To:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
Cc:	Sergei Shtylyov <sshtylyov@...mvista.com>,
	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	linux-ide@...r.kernel.org
Subject: Re: [PATCH] Fix pointer arithmetic in hpt3xx driver code (3rd try)

On Sun, Sep 07, 2008 at 08:10:03PM +0200, Bartlomiej Zolnierkiewicz wrote:
> 
> Hi,
> 
> Masoud/Sergei: sorry for the bug and thanks for fixing it.
> 
> On Sunday 07 September 2008, Sergei Shtylyov wrote:
> > Hello, I wrote:
> > >> diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
> > >> index eb107ee..4eae284 100644
> > >> --- a/drivers/ide/pci/hpt366.c
> > >> +++ b/drivers/ide/pci/hpt366.c
> > >> @@ -613,6 +613,14 @@ static int check_in_drive_list(ide_drive_t 
> > >> *drive, const char **list)
> > >>      return 0;
> > >>  }
> > >>  
> > >> +static struct hpt_info *hpt3xx_get_info(struct device *dev)
> > >> +{
> > >> +    struct ide_host *host    = pci_get_drvdata(to_pci_dev(pci_dev));
> > >>   
> > >
> > >   Oops, this just won't compile. :-/
> > 
> >    BTW, there's no need to invoke to_pci_dev() at all since 
> > pci_get_drvdata(dev) boils down to dev_get_drvdata(&dev->dev) call. So, 
> > in order not to waste time on useless pointer tricks, we should just 
> > invoke the latter here.
> 
> I corrected this and applied the patch.

Thanks!

Masoud
--
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