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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 05 Sep 2008 22:04:14 +0400
From:	Sergei Shtylyov <sshtylyov@...mvista.com>
To:	Masoud Sharbiani <masouds@...gle.com>
Cc:	bzolnier@...il.com, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Fix pointer arithmetic in hpt3xx driver code

Masoud Sharbiani wrote:

> Hi there,
> git commit 74811f355f4f69a187fa74892dcf2a684b84ce99 causes crash at
> module load (or boot) time on my machine with a hpt374 controller.
> Sergei says this is due to the pointer arithmatic. This patch fixes that
> and makes my machine boot again.

> Signed-Off-By: Masoud Sharbiani <masouds@...gle.com>

> diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
> index eb107ee..f41f3fd 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(void *host_priv, struct device *hwif_dev, struct device *host_dev)

    Ugh, that's oversimplified and doesn't save much...
    I rather meant the following prototype:

static struct hpt_info *hpt3xx_get_info(struct pci_dev *dev)

In case it'll be too complex for you, I'll do it myself later.

> +{
> +	struct hpt_info *info = (struct hpt_info *)host_priv;

    Newline needed after the declaration block.

> +	if (hwif_dev == host_dev)
		return info + 1;
	else
		return info;

or

	return hwif_dev == host_dev ? info + 1 : info;

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