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-next>] [day] [month] [year] [list]
Message-ID: <20080523090616.68380@gmx.net>
Date:	Fri, 23 May 2008 11:06:16 +0200
From:	"Randolf Pohl" <randolf.pohl@....de>
To:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] lcd: Push the BKL down into the driver ioctl handler


unlock_kernel() before return:

> Signed-off-by: Alan Cox <alan@...hat.com>
> 
> diff --git a/drivers/char/lcd.c b/drivers/char/lcd.c
> index 4fe9206..1690cfb 100644
> --- a/drivers/char/lcd.c
> +++ b/drivers/char/lcd.c

[...]

> @@ -399,17 +408,15 @@ static int lcd_ioctl(struct inode *inode, struct file *file,
> 			if (__copy_to_user
> 			    ((struct lcd_display *) arg, &button_display,
> 			     sizeof(struct lcd_display)))
> -			      return -EFAULT;
> +			      ret = -EFAULT;
> 			break;
> 		}
>  
> 	default:
> -	      return -EINVAL;
> -
> +	      ret = -ENOTTY;
> 	}
> -
> -       return 0;
> -
> +       lock_kernel();

Shouldn't this be unlock_kernel();

> +       return ret;
>  }
>  
>  static int lcd_open(struct inode *inode, struct file *file)
> @@ -462,7 +469,7 @@ static ssize_t lcd_read(struct file *file, char *buf,
>  
>  static const struct file_operations lcd_fops = {
> 	.read = lcd_read,
> -       .ioctl = lcd_ioctl,
> +       .unlocked_ioctl = lcd_ioctl,
> 	.open = lcd_open,
>  };


Cheers,

R.
-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx
--
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